pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: COSDocument returns incorrect version from header string
Date Thu, 18 Feb 2016 16:28:07 GMT


Am 18.02.2016 um 09:30 schrieb Petras Petkus:
> Hello,
>
>   
>
> We are using the latest v1.8.12-SNAPSHOT and we noticed, that
> COSDocument#getHeaderString() method does not return the version indicated
> in PDF header string, but the version set document catalog (see
> COSDocument#serVersion() which updates header string). Is such side effect
> behavior intentional?


Yes.

See 7.5.2 File Header in the "32000" specification:

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.


Tilman


>
>   
>
> We have validation scenarios (national PDF-based document specification),
> where version of the header string is checked. In present situation we fail
> to correctly validate, if header string version is overridden by value in
> catalog.
>
>   
>
> Petras
>
>   
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message