• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Customizing NSPrintPanel by removing features, not adding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Customizing NSPrintPanel by removing features, not adding


  • Subject: Customizing NSPrintPanel by removing features, not adding
  • From: Flavio Donadio <email@hidden>
  • Date: Tue, 17 Oct 2017 11:52:27 -0200

Hello, all!


I have been searching the web and mailing-list archives for the last few days,
since Apple’s documentation on the subject is almost non-existant.

I created this app that prints to Zebra label printers in their own printing
language (ZPL). I am currently using Core Printing to print a temporary file
with the raw code through the PMPrinterPrintWithFile(…) function. Works like a
charm!

The app shows a standard NSPrintPanel, where the user can select the number of
copies and set printer features, which I sure like to have. But, since the user
doesn’t have any control over the layout of the label, I would like to hide
some stuff that shouldn’t be messed with:

• Layout (pages per sheet, border, flip horizontally, etc.);
• Paper Handling (collate, print range, page order, etc.);
• Cover Page;
• and the PDF menu button.

It would also be great if the Printer pop-up menu would list only
ZPL-compatible printers, as other printers won’t interpret that code correctly.

Like I said, I like the fact that I can have the Printer Features interface in
the NSPrintPanel — that comes from the printer driver, I guess — and that’s a
good reason for not using NSPrintOperation's -setShowsPrintPanel: to skip it
altogether.

Through debugging, I have found out about PMPrintWindowController, but there is
no information about it at all! Maybe I’m gonna need to create my NSPrintPanel
subclass from scratch, but I can't find information on that either.

Any pointers would be appreciated, except for void *. ;-)


Regards,
Flavio
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Customizing NSPrintPanel by removing features, not adding
      • From: "St John, David R" <email@hidden>
  • Prev by Date: Re: bare bones app crashing, is it a code signing issue?
  • Next by Date: Re: Customizing NSPrintPanel by removing features, not adding
  • Previous by thread: Re: bare bones app crashing, is it a code signing issue?
  • Next by thread: Re: Customizing NSPrintPanel by removing features, not adding
  • Index(es):
    • Date
    • Thread