Compress PDF: PDF/A compliance gets lost
Hello
I compress various types of pdf using this code:
com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document(input);
OptimizationOptions optimizationOptions = new OptimizationOptions();
optimizationOptions.setRemoveUnusedObjects(true);
optimizationOptions.setRemoveUnusedStreams(true);
optimizationOptions.setAllowReusePageContent(true);
pdfDocument.optimizeResources(optimizationOptions);
ByteArrayOutputStream output = new ByteArrayOutputStream();
pdfDocument.save(output);
In the attached file
input.pdf (303.4 KB), the PDF/A compliance gets lost after optimization:
output.pdf (300.7 KB)
I know I could convert it again to PDF/A, but this problem does not happen in most cases, so I would like to avoid an extra conversion.
Kind regards