Dear PDFBox developers,
Please find below a bug report regarding PDF to PNG conversion.
Describe the bug
When converting a PDF document to PNG images, checkboxes are displayed as empty
squares (□) and the checkmarks inside checked checkboxes are not shown. The
original PDF contains properly rendered checkmarks (e.g., ☑) or filled
checkboxes, but after conversion, they all appear as empty squares.
Sample Code
PDDocument document = PDDocument.load(new File("sample.pdf")); PDFRenderer
renderer = new PDFRenderer(document); BufferedImage image =
renderer.renderImage(0, 2.0f); ImageIO.write(image, "PNG", new
File("output.png"));
Expected behavior
Checked checkboxes should be rendered as filled squares or squares containing a
checkmark (e.g., ☑). Unchecked checkboxes may remain as empty squares (□). The
visual state should match what is seen when opening the PDF in Adobe Acrobat or
a standard PDF viewer.
- OS: window10
- version:3.0.7
Attached files:
Problem document (copy.pdf)
Screenshots (copy.png)
杨喆
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]