Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Bug
-
2.0.9
-
None
-
None
Description
Some feature of the given JPEG leads to erroneous results, when adding (drawing) it to a PDPageContentStream.
The document itself is created just fine and the page is displayable in the "PDF Debugger" application, but for example the Adobe Reader is reporting an "internal Error", when opening the created PDF.
Reproducable via:
try(PDDocument document = new PDDocument()){ PDPage page = new PDPage(); try(PDPageContentStream pcs = new PDPageContentStream(document, page)){ PDImageXObject pdImage = PDImageXObject.createFromFile("path to jpeg", document); pcs.drawImage(pdImage, 30, 30); } document.addPage(page); document.save(new File("output file")); }