pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ross Johnson (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PDFBOX-4283) Allowing Rectangles with additional elements
Date Wed, 01 Aug 2018 19:00:00 GMT
Ross Johnson created PDFBOX-4283:

             Summary: Allowing Rectangles with additional elements
                 Key: PDFBOX-4283
                 URL: https://issues.apache.org/jira/browse/PDFBOX-4283
             Project: PDFBox
          Issue Type: Improvement
          Components: PDModel
    Affects Versions: 2.0.11
            Reporter: Ross Johnson

I've come across some pages in a large PDF that have some additional, non-numerical elements
at the end of the MediaBox rectangle array, e.g. 
/MediaBox [0 0 612 792 5 0 R 6 0 R]
Trying to read such a structure with PDPage.getMediaBox() throws an exception trying to construct
the PDRectangle at [this line|[https://github.com/apache/pdfbox/blob/6f18d7c4bef4d23a22dcf14c804d737d43908deb/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDRectangle.java#L131].]

I'm not sure if this strange case should be treated as a file issue, or if should be supported
by slicing / shortening the COSArray prior to trying to convert to floats. Acrobat Reader
shows the pages without complaint.

The original PDF was produced by Foxit PhantomPDF Printer Version

This message was sent by Atlassian JIRA

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

View raw message