On 21.04.2009, at 12:08, sandeep chaudhary wrote:
I am using the Objective-C for my application. In my application I use the NSPrintPanel to print the document. In the NSPrintPanel user can save the document using the "Save as pdf" option of NSPrintPanel, and a new dialog is open to save the document. In this dialog user can choose any path to save the file. So i want to get this path selected by user . I have go through the NSPrintPanel API's but could not get any api who can give me the saved path. Sp please tell me in details how can i get this saved path from NSPrintPanel.
Short answer: You don't. All that is handled by the print panel for you. The print panel is supposed to produce output that looks the same as if it was printed. So what it does is it asks your app to do the drawing for printing, but gives you a PDF graphics context to draw into. You just do the same as when printing to paper.
If you want to do your own custom PDF export, add that to the "Save as..." menu item and use PDFKit or similar to set up a PDF the way you want and draw to it.
Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
