Aleksander Blomskøld created PDFBOX-3154:
--------------------------------------------

             Summary: 
PDDocumentCatalog.getDocumentCatalog().getPages().getCount() returns 0 - first 
page is -1
                 Key: PDFBOX-3154
                 URL: https://issues.apache.org/jira/browse/PDFBOX-3154
             Project: PDFBox
          Issue Type: Bug
    Affects Versions: 2.0.0
            Reporter: Aleksander Blomskøld
         Attachments: siba.pdf

The attached PDF opens fine in the readers I have checked, but PDFBox has some 
issues with it. It apparently has 0 pages, but it is possible to get the first 
page by asking for page number -1.

Code:

       PDDocument pdDocument = PDDocument.load(inputStream);
       int pages = pdDocument.getDocumentCatalog().getPages().getCount();
       //pages == 0
       PDPage page = pdDocument.getDocumentCatalog().getPages().get(-1);
   //page != null

This behaviour exists on version 2.0.0.rc2 and on trunk.




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

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

Reply via email to