Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying pre-saved PDF in Document package



I can propose 3 solutions:

1) if you can, make your PDF file saved with the name "Preview.pdf" inside a folder named QuickLook inside your document bundle
2) or use a relative symlink
3) if you really can't change how your document bundle is layed out (or if you have to support some already produced document), use QLPreviewRequestSetDataRepresentation() using your PDF data read on disk, and file a bug to add a public API QLRequestSetURLRepresentation()


--
Julien

On 21 févr. 08, at 15:59, email@hidden wrote:

Hi,
I have an application that saves multi-paged documents that contain images and text. I am trying to write a QuickLook-plugin for my documents. My documents are saved as packages that contain all necessary data for my documents. Luckily (at least I think so), I am coincidentally also saving a PDF of the document inside the document- package.


Now I would assume, that I would simply tell my QuickLook-plugin the location of that PDF inside the package and QuickLook could display that PDF. But I don't know how to do that.

The only solution I got working so far was loading in the PDF as CGPDFDocument and drawing each page into a CGContext via CGContextDrawPDFPage. It works, but it takes about 5 seconds.

Now I'm hoping that there's an easier way of simply telling QuickLook "Just display this PDF" instead of copying the PDF page-by- page manually.

Best regards,
Michael

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quicklook-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicklook-dev/jjalon %40apple.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Quicklook-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quicklook-dev/email@hidden

This email sent to email@hidden
References: 
 >Displaying pre-saved PDF in Document package (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.