[ 
https://issues.apache.org/jira/browse/PDFBOX-3241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15155039#comment-15155039
 ] 

ASF subversion and git services commented on PDFBOX-3241:
---------------------------------------------------------

Commit 1731305 from [~tilman] in branch 'pdfbox/branches/1.8'
[ https://svn.apache.org/r1731305 ]

PDFBOX-3241: return original header string

> return original PDF Header
> --------------------------
>
>                 Key: PDFBOX-3241
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3241
>             Project: PDFBox
>          Issue Type: Wish
>          Components: Parsing
>    Affects Versions: 1.8.11
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>             Fix For: 1.8.12
>
>
> Wish by [~abyss] presented in the mailing list
> {quote}
> Yes, I know, that the version in catalog shall be used to determine version
> and therefore the version COSDocument#getVersion() method result is expected
> to reflect that. But I ask the header string. And it's result differs from
> the actual header string in the file after PDFParser finishes its job.
> Please, bear also in mind that Extensions Dictionary (see ISO 32000-1
> chapter 7.12) validation should consider the values both in document catalog
> and header:
> "The value of BaseVersion, when treated as a version number, shall be less
> than or equal to the PDF version, both in the document header (see 7.5.2,
> "File Header") and the catalog Version key value, if present."
> As it says "both", that means BaseVersion may not exceed the value neither
> in header nor in catalog, therefore we need to validate that. 
> {quote}
> my answer:
> How about something like this:
> {code}
> private String originalHeaderString = null;
> public void setOriginalHeaderString(String header)
>     {
>         if (originalHeaderString != null)
>               throw bad state exception blah blah
>         originalHeaderString = header;
>     }
> public String getOriginalHeaderString()
> {
>     return originalHeaderString ;
> }
> {code}
> The setter should be called only once by parseHeader().
> This was accepted, so I'll implement it (for 1.8 only)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to