You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Aleksander Blomskøld (JIRA)" <ji...@apache.org> on 2015/12/07 10:44:11 UTC
[jira] [Updated] (PDFBOX-3154)
PDDocumentCatalog.getDocumentCatalog().getPages().getCount() returns 0 -
first page is -1
[ https://issues.apache.org/jira/browse/PDFBOX-3154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksander Blomskøld updated PDFBOX-3154:
-----------------------------------------
Attachment: siba.pdf
> 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-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org