This is correct.  (Catalog overrides header)

And the version in the Catalog should always be greater than the one in the 
header.

Also, you might want to also add support for reading the /Extensions dictionary 
as defined in ISO 32000-1, where developers can declare the use of features 
that EXTEND 32K. This is how Adobe tags files using Acrobat 9 features.

Leonard

-----Original Message-----
From: Dominik Seichter [mailto:[email protected]] 
Sent: Tuesday, February 23, 2010 5:34 AM
To: [email protected]
Cc: EXTERNAL Loch Sebastian (Firma Ferchau; BhP/TEF17)
Subject: Re: [Podofo-users] Determination of correct Pdf version

Hi,

I commited a patch so that PdfParser will try to read the /Version key if 
available and update the version accordingly. The current behaviour is that the 
version from the document catalog will always overule the version found in the 
header.

I hope this change will solve your problem.

Best regards,
        Dom

Am Dienstag 23 Februar 2010 schrieb EXTERNAL Loch Sebastian (Firma Ferchau;
BhP/TEF17):
> Hi all,
> 
> I have to come back to an older topic from January 2010 concerning the 
> pdf version.
> 
> In section 7.5.2 of the pdf spec you find the following:
> ...
> "Beginning with PDF 1.4, the Version entry in the document's catalog  
> dictionary (located via the Root entry in  the file's trailer, as  
> described in 7.5.5, "File Trailer"), if present, shall be used instead 
> of  the version specified in the Header." ...
> 
> When you update an old pdf with the actual Acrobat version, Acrobat 
> moves  the file trailer to the Xref stream dictionary and updates the 
> pdf version  from 1.2 to 1.5 but only in the root entry of the file 
> trailer and not at  the beginning of the file.
> 
> Acrobat shows the correct version 1.5 in the properties, but Foxit for  
> example shows 1.3 like PoDoFo too!
> 
> I checked how PoDoFo determines the Pdf version ( 
> PdfParser::IsPdfFile() ),  it uses the pdf version from the beginning 
> of the file however beginning  with Pdf 1.4 it should use the version 
> from the file trailer in the Xref  stream dictionary when existing 
> instead of the entry at the beginning of  the file.
> 
> What about the situation when the pdf versions differs, does PoDoFo 
> should  always use the bigger version or always the version from Xref 
> dictionary  even if the version is smaller?
> 
> Is it planned to determine the pdf version from the Xref dictionary?
> 
> Best Regards
> Sebastian
> ----------------------------------------------------------------------
> -----
> --- Download Intel® Parallel Studio Eval Try the new software 
> tools for yourself. Speed compiling, find bugs proactively, and 
> fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Podofo-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/podofo-users
> 


--
**********************************************************************
Dominik Seichter - [email protected]
KRename  - http://www.krename.net  - Powerful batch renamer for KDE KBarcode - 
http://www.kbarcode.net - Barcode and label printing PoDoFo - 
http://podofo.sf.net - PDF generation and parsing library SchafKopf - 
http://schafkopf.berlios.de - Schafkopf, a card game,  for KDE Alan - 
http://alan.sf.net - A Turing Machine in Java
**********************************************************************

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to