Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Different behaviors of CGPDFDocumentCreateWithURL on Mac OS X 10.2.8 and 10.3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Different behaviors of CGPDFDocumentCreateWithURL on Mac OS X 10.2.8 and 10.3



Even if I parse the PDF file myself to determine its version number,
how do I know what is supported by Quartz APIs on Mac OS X 10.2 or
10.3? I have to know what version of PDF is supported on which version
of Mac OS X, in order to determine what to do when encountering
certain PDF file on certain Mac OS.

On Apr 11, 2005 9:53 PM, Scott Thompson <email@hidden> wrote:
>
> On Apr 11, 2005, at 5:04 AM, Liang Yu wrote:
>
> > Regarding my question below, I can check the version of a PDF file
> > befere trying to draw it. But there are two problems for this
> > solution:
> >
> > First, there are several version of Adobe PDF, v1.4, 1.5, and 1.6. So
> > is there a clear definition of which version of PDF is supported by
> > 10.2, or which version is supported by 10.3. According to the previous
> > replies, it seems there is no clear separation of which version is
> > supported. So, checking by PDF version number might not be a good
> > solution.
> >
> > Second, as stated in 3.4.1 PDF reference, a PDF version number is
> > specified at the file header, and it may also be overwritten in
> > Version in document catalog. But we can only get the document catalog
> > of a PDF file by CGPDFDocumentGetCatalog, which is supported on 10.3
> > or later. So, on 10.2, we have no way to find the latest PDF version
> > number, if there is one in the Version entry.
> >
> > Any way to solve the problem? Thanks!
>
> In my experience, the PDF support in Quartz works well as a metafile
> format for the drawing engine, but it does not serve as well as a
> generalized tool for parsing and drawing all kinds of PDF files.  The
> best solution to your problem is going to be parsing the PDF (at least
> partially) to determine the information you need.
>
> Finding and parsing the catalog yourself is not too onerous a task.
> After doing so, you should be able to check the PDF version easily.
> The only other option to determine what compression schemes used in the
> document would be to examine the document yourself and look at the
> dictionaries.
>
> It is the case that Mac OS X should not crash upon receiving an unknown
> compression scheme, but in terms of making your application more robust
> in the face of every type of PDF possible, I'm afraid that you are
> going to have to take some of the responsibility for parsing the PDF on
> yourself.
>
> Scott
>
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Different behaviors of CGPDFDocumentCreateWithURL on Mac OS X 10.2.8 and 10.3 (From: Liang Yu <email@hidden>)
 >Re: Different behaviors of CGPDFDocumentCreateWithURL on Mac OS X 10.2.8 and 10.3 (From: Haroon Sheikh <email@hidden>)
 >Re: Different behaviors of CGPDFDocumentCreateWithURL on Mac OS X 10.2.8 and 10.3 (From: Derek Clegg <email@hidden>)
 >Re: Different behaviors of CGPDFDocumentCreateWithURL on Mac OS X 10.2.8 and 10.3 (From: Liang Yu <email@hidden>)
 >Re: Different behaviors of CGPDFDocumentCreateWithURL on Mac OS X 10.2.8 and 10.3 (From: Liang Yu <email@hidden>)
 >Re: Different behaviors of CGPDFDocumentCreateWithURL on Mac OS X 10.2.8 and 10.3 (From: Scott Thompson <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.