Skip to content

3.0.3

Latest

Choose a tag to compare

@ainceborn ainceborn released this 15 Jul 12:38
a9a3e3f

What's Changed

Image rendering: checkboxes and small images with soft masks no longer disappear.

Small images with an /SMask (soft mask) — commonly used to render checkboxes, form widgets, and icons in PDF forms — were not being drawn on the page starting from version 3.0.1.

Root cause: the new drawBufferedImageV2() code path (introduced in 3.0.1) included a downscaling optimization that reset the Canvas transformation matrix via canvas.setMatrix(new Matrix()) and attempted to reconstruct positioning from the CTM only. Because the DPI/flip transform applied in PageDrawer.drawPage() was not taken into account, the images ended up being drawn in the wrong coordinate space (typically outside the visible canvas), so nothing appeared on the rendered page.

Fix: non-stencil images (regular XObject images, including those with soft masks such as checkboxes) are now drawn via drawBitmap() again — the same simple, correct path used in 3.0.0. Stencil images with patterns still use the newer code path where it is needed for correct pattern masking.

Additional Changes

[PDFBOX-4076] - PDFBox cannot properly handle PDF Name objects containing bytes with values outside the US_ASCII range
[PDFBOX-6150] - PDComboBox constructAppearances wrong text
[PDFBOX-6173] - NullPointerException while merging PDFs with output intents
[PDFBOX-6176] - reported number of objects (7412) is not one plus the highest object number (7410)
[PDFBOX-6178] - PdfBox renames RadioButton with Umlaut
[PDFBOX-6179] - Removing fields not possible
[PDFBOX-6186] - IllegalArgumentException when calling PDDocumentCatalog.setThreads(null)
[PDFBOX-6187] - NullPointerException in AppearanceGeneratorHelper when PDFont.getName() returns null
[PDFBOX-6189] - Usage of PDF Controlled dimension may cause OOM
[PDFBOX-6191] - Print border doesn't work if using rastering
[PDFBOX-6193] - TrueTypeEmbedder.getTag() throws StringIndexOutOfBoundsException for negative Map.hashCode()
[PDFBOX-6194] - COSStream becomes COSDictionary after save — shared XObject reference replaced by Font
[PDFBOX-6202] - Possible regression when combining multiple PDFs
[PDFBOX-6203] - Splitter.split() corrupts result PDFs
[PDFBOX-6204] - PDType1FontEmbedder sets /Length to uncompressed PFB size
[PDFBOX-6206] - Rendering fails when bad annotations array
[PDFBOX-6209] - Regression in v3.0.7 causes Splitter to extract pages with text converted to symbols
[PDFBOX-6210] - Incorrect CJK Character Extraction for Shared Glyphs
[PDFBOX-6214] - PDDocument static AWT warm-up fails hard when AWT native libs are unavailable (GraalVM native-image)
[PDFBOX-6216] - Reject OpenType fonts using CFF2 outlines

Full Changelog: 3.0.2...3.0.3