Flatten PDF layers

Need to flatten PDF layers as part of redacting files to assure that the redacted info is no longer available. I have not found the functionality in the documentation. Is it possible?

Hi Jimmy,


Thanks for your inquiry. I am afraid currently Aspose.Pdf does not support to flatted PDF layers. However we have already logged a feature request PDFNEWNET-35955 in our issue tracking system for same. We have linked your request to issue, we will notify you as soon as it is implemented.

We are sorry for the inconvenience caused.

Best Regard,

Hi Jimmy,


Thanks for contacting support.

Adding more to Tilal’s comments, can you please share some sample layered PDF file as it will help us in better understanding the requirement.

was this feature ever implemented?
i need to flatten the layers in my pdfs but cannot find any function to do this.
thanks

@gavinduffy

We do not offer any separate functionality to flatten the layers in PDF. The layers are automatically flattened in PDFA format. You can convert your PDF into PDFA in order to obtain flattened layer PDF:

Document doc = new Document("35955-1.pdf");
doc.Convert(new MemoryStream(), PdfFormat.PDF_A_1A, ConvertErrorAction.Delete);
doc.Save("35955-1.pdf");