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

Tilman Hausherr commented on PDFBOX-3041:
-----------------------------------------

[~torakiki] is the code change what you had in mind? I don't have a test file 
so I created one. Sadly it isn't really testable because we have so many repair 
mechanisms, i.e. it also opens without the change.

> Wrong default type in Xref stream W0 element
> --------------------------------------------
>
>                 Key: PDFBOX-3041
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3041
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 2.0.0
>            Reporter: Andrea Vacondio
>         Attachments: PDFA-XRefUncompressed-W0_2_0.pdf
>
>
> According to the spec, when parsing a cross reference stream and the W array 
> has a 0 as first element (something like [0 4 1]). this should happen:
> "If the first element is zero, the type field shall not be present, and shall 
> default to type 1".
> So entries read in this scenario should have type 1, in use.
> From org.apache.pdfbox.pdfparser.PDFXrefStreamParser::parse line 115-123 the 
> default type assigned by PDFBox in this scenario is 0, free.



--
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