We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PDF Annotation Flattening

I have a PDF below with a couple of annotations. It is possible to flatten the annotations onto the PDF?

I have tried the below code segment, but it's not working well. I didn't find much information on Flatten(), please tell me if I'm using it incorrectly.

I have attached two documents:
Original_SAMPLE.pdf - the original PDF with annotations
FLATTENED_SAMPLE.pdf- what I hope to do.

            string pdfPath = inputpath;
            Document doc = new Document(pdfPath);
            for (int i = 1; i < doc.Pages.Count && i < 5; i++)
                Page page = doc.Pages[i];
                List<Annotation> annotations = new List<Annotation>();
                for (int j = 1; j <= page.Annotations.Count; j++)
                foreach (Annotation annot in annotations)

Hi Duncan,

for using our products.

have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as
PDFNEWNET-34277. We will investigate this
issue in details and will keep you updated on the status of a correction.

We apologize for your inconvenience.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan

The issues you have found earlier (filed as PDFNET-34277) have been fixed in Aspose.PDF for .NET 21.9.