Sunset_PDFX1A.pdf (990.4 KB)
Sunset_Original.pdf (216.7 KB)
The output quality of the PDF X1A Conversion of Pdfs with Embedded Images is unfortunately of too low quality to be useable currently. The output result is the same even on the latest version of the jar.
There is a conversion to CMYK which i am aware of but the conversion works with ghostscript without loss of quality. Maybe i am missing some setting that is causing these issues. I already tried to ensure no loss in quality with the following settings for the loaded original pdf but not luck.
Current Sample Code is as follows:
Document pdfDocument = new Document("D:\\Sunset_Original.pdf"); OptimizationOptions optOptions = new OptimizationOptions(); int quality = 100; optOptions.getImageCompressionOptions().setCompressImages(false); optOptions.getImageCompressionOptions().setImageQuality(quality); optOptions.getImageCompressionOptions().setResizeImages(false); pdfDocument.optimizeResources(optOptions); pdfDocument.convert("D:\\Sunset.log", PdfFormat.PDF_X_1A, ConvertErrorAction.None); // Save output document pdfDocument.save("D:\\Sunset_PDFX1A.pdf"); pdfDocument.close();