pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Navdeep (Jira)" <j...@apache.org>
Subject [jira] [Created] (PDFBOX-4663) Bad characters in PDF
Date Thu, 03 Oct 2019 20:34:00 GMT
Navdeep created PDFBOX-4663:
-------------------------------

             Summary: 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: Production
            Reporter: Navdeep
             Fix For: 2.0.15
         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: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Mime
View raw message