I see that the FlattenAllFields method can be used to flatten all the fields of a PDF. However, is there any way to flatten a layered PDF?
Hi Paul,
Hi Paul,
Sample files are attached. Thanks!
Hi Paul,
I am afraid the requested feature is
currently not supported but for the sake of implementation, I have logged this
requirement in our issue tracking system under New Features list as PDFNEWNET-35955.
We will further investigate this requirement in details and will keep you
updated on the status of a correction. <o:p></o:p>
We apologize for your inconvenience.
The following post discusses an issue where layers were flattened upon concatening PDF files:
https://forum.aspose.com/t/94054
I'm wondering if we could use this issue as a workaround to meet our requirement of flattening PDFs. We could have a static PDF that we concatenate to any PDF that needs flattening, and then split the PDFs so the result is only the unflattened original PDF.
I see that the issue was resolved in Aspose.Pdf for .NET 7.7.0, so I'm assuming this workaround will not work (we are running 7.7). Can you confirm, and think if there is anything similar we could do that would result in flattening?
Hi Paul,
Has this feature (combining multiple layers of a PDF into one layer) been implemented yet? Thanks.
The issue discussed and linked here was resolved and it was about deletion of the Layers during PDF conversion. Are you also converting the PDF into PDF/A or only flattening the PDF?
@asad.ali No if you read the whole thread you’ll see it’s about merging layers (PDFNEWNET-35955), the deletion of layers was introduced later. I am trying to combine/merge all layers in a PDF into one in the hope that the PDF will load more quickly. Thanks
The issue was about flattening the layers which ultimately remove them and merge all the content into single layer in the resultant PDF. Therefore, you can say that layers can now be merged/combined by flattening the PDF document.
Sadly, no specific method or property was added in the API to flatten or merge the PDF Layers. However, if you want to achieve it, you can convert your PDF into PDF/A format which will merge all the present layers into single one