Release date: October 25, 2022
New for this release of our iText 7 add-on to reduce the file size of PDFs is the addition of support for the Decode array when processing images. As noted in Table 89 of the PDF 1.7 specification, the Decode array is an optional entry for an Image Dictionary which defines how to map image samples into the range of values appropriate for the image’s color space. This meant that if a PDF containing images with this entry in the Image Dictionary was processed by pdfOptimizer, then an error could be reported when subsequently opening the file in a PDF viewer.
A workaround to this issue would be to simply remove such Decode entries before optimizing the PDF. However, pdfOptimizer will now take into account Decode array entries when processing images with the
com.itextpdf.pdfoptimizer.handlers.imagequality.processors.BitmapDeindexer (Java/.NET) class.
- Added support for optional Decode array entries in Image Dictionaries
Examples (latest ones)