Re: Seamlessly converting any type of document to PDF?
Re: Seamlessly converting any type of document to PDF?
- Subject: Re: Seamlessly converting any type of document to PDF?
- From: Martin Wierschin <email@hidden>
- Date: Tue, 13 Jan 2009 17:36:21 -0800
I'm looking for suggestions on how to convert any type of document
to PDF.
I've never used it, but the QuickLook API seems to indicate this
functionality may be available if the document QuickLook generator
cooperates:
"If your application has documents that (potentially) have more than
one page of vector graphics, you should consider using the
QLPreviewRequestCreatePDFContext function to create the graphics
context for drawing the preview in. This function returns a graphics
context suited for PDF content."
Unfortunately it would be up to the QuickLook generator to decide the
difference between a "preview" and a full print. Although, looking at
the API I don't even see a way for clients to specifically request
multi-page previews, so you may be completely out of luck there.
Ideally without the user input but I'm mostly interested in getting
it to work.
You might be able to put together some AppleScript or Accessibility
API code that opens the file in the default application and
manipulates the Print dialogue to save off a PDF. It would likely be
ugly work to support applications that have custom print options/
dialogs.
~Martin
_______________________________________________
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