MiuMiu
MiuMiu

Reputation: 1925

Mac - Displaying a modal window on tap of Print button in Print Dialog Extension

Is it possible to perform a custom action when the user taps the Print button? For example, can I display an Authentication dialog box before printing?

I am a newbie in Mac Printer Development. Any help will be greatly appreciated. Thanks!

Upvotes: 1

Views: 145

Answers (1)

MiuMiu
MiuMiu

Reputation: 1925

In the PDE, I intercepted the print action in the following method:

- (void)shouldPrint

I displayed an NSWindow modally before returning YES or NO in that method.
(The execution of "shouldPrint" method is stopped when NSWindow is modally displayed.)

Upvotes: 1

Related Questions