[
https://issues.apache.org/jira/browse/PDFBOX-2953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14726765#comment-14726765
]
Tilman Hausherr commented on PDFBOX-2953:
-----------------------------------------
I suspect you have logs disabled.
Anyway, the file is encrypted and a message should come up. What you should do
is either:
- do this after load()
{code}
if (doc.isEncrypted())
{
StandardDecryptionMaterial sdm = new
StandardDecryptionMaterial(PDF_USER_PASSWORD);
doc.openProtection("");
}
{code}
- or make your life even easier, by using {{loadNonSeq(new File(...), null);}}
no call to openProtection is needed then.
The current version is 1.8.10.
> PDFBox shows the wrong page number
> ----------------------------------
>
> Key: PDFBOX-2953
> URL: https://issues.apache.org/jira/browse/PDFBOX-2953
> Project: PDFBox
> Issue Type: Bug
> Reporter: RuhongCai
> Attachments: ms12_TIM.pdf
>
>
> The following code could prove that there is a bug in getting the number of
> the pages
> PDDocument pdf1 = PDDocument.load("C:\\ms12_TIM.pdf");
> int count = pdf1.getNumberOfPages();
> count return “0” , the file has a page.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]