[
https://issues.apache.org/jira/browse/PDFBOX-4663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16946456#comment-16946456
]
Tilman Hausherr commented on PDFBOX-4663:
-----------------------------------------
I don't know if it is a bug at all. You could test manually whether it works
with 2.0.17. Also read the FAQ on text extraction:
https://pdfbox.apache.org/2.0/faq.html#text-extraction
> Bad characters in PDF
> ---------------------
>
> Key: PDFBOX-4663
> URL: https://issues.apache.org/jira/browse/PDFBOX-4663
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 2.0.15
> Environment: Open JDK 11.0.4.11.1
> Reporter: Navdeep
> Priority: Major
> Attachments: PastedGraphic-1-4.png
>
>
> Our application uses PDFBox 2.0.15 for PDF processing. We have recently
> upgrade PDFBox version and Java 8. Now, we are using Open JDK 11.0.4.11.1.
> The application flow is when we receive the PDF, we add the blank page in the
> end of the PDF and save it. (This is simple use case).
> We have observed two times this issue in last one month, The text of the PDF
> get change to alphanumeric numbers as shown in the attached picture.
>
> Kindly assist.
>
> Here is the sample code that we are using -
> String fileName = "84413_196751_0.pdf";
> PDDocument pdDocument = PDDocument._load_(*new* File(fileName));
> File file = *new* File(fileName);
> *try* {
> // Add Page into PDF
> PDPage newPage = *new* PDPage();
> pdDocument.addPage(newPage);
> File preparedFile = DocumentUtil._getPreparedFile_(*new* File(fileName));
> pdDocument.save(preparedFile);
> } *catch* (Exception e) {
> System.*_out_*.println("Error in preparing document ");
> }
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]