[
https://issues.apache.org/jira/browse/PDFBOX-2567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14275513#comment-14275513
]
Tilman Hausherr commented on PDFBOX-2567:
-----------------------------------------
[~sgoeschl] please try these exact commands, and this exact code in a
stand-alone java program and tell what happened. To be sure, download [the
1.8.8 pdfbox-app jar|https://pdfbox.apache.org/download.cgi#recent] again.
{code}
java -jar pdfbox-app-1.8.8-SNAPSHOT.jar PDFReader first-page-lost-01.pdf
{code}
shows one page
{code}
java -jar pdfbox-app-1.8.8-SNAPSHOT.jar PDFReader -nonSeq first-page-lost-01.pdf
{code}
shows two pages (use "+" to go forward, but you should see a different page 1
anyway)
Then try this code with 1.8.8:
{code}
PDDocument doc1 = PDDocument.load("first-page-lost-01.pdf");
System.out.println("pages1: " + doc1.getDocumentCatalog().getAllPages().size());
doc1.close();
PDDocument doc2 = PDDocument.loadNonSeq(new File("first-page-lost-01.pdf"),
null);
System.out.println("pages2: " + doc2.getDocumentCatalog().getAllPages().size());
doc2.close();
{code}
This output should be:
{code}
pages1: 1
pages2: 2
{code}
> Only one page found while the document actually contains two pages
> ------------------------------------------------------------------
>
> Key: PDFBOX-2567
> URL: https://issues.apache.org/jira/browse/PDFBOX-2567
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 1.8.7
> Reporter: Siegfried Goeschl
> Attachments: first-page-lost-01.pdf
>
>
> I'm currently converting a lot of PDF documents to images - for this
> particular document I'm only able to extract one page
> {noformat}
> List<PDPage> pages = pdDocument.getDocumentCatalog().getAllPages();
> {noformat}
> Using Mac OS Preview I see that the document contains actually two pages.
> Please note that I have permission from my customer to upload the document
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)