• 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
Re: how to get the save File path from NSPrintpanel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to get the save File path from NSPrintpanel


  • Subject: Re: how to get the save File path from NSPrintpanel
  • From: Uli Kusterer <email@hidden>
  • Date: Wed, 22 Apr 2009 09:33:59 +0200

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@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


References: 
 >how to get the save File path from NSPrintpanel (From: sandeep chaudhary <email@hidden>)

  • Prev by Date: Re: Drag and drop display image and file path?
  • Next by Date: Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness
  • Previous by thread: how to get the save File path from NSPrintpanel
  • Next by thread: Getting the message text of a mail
  • Index(es):
    • Date
    • Thread