Issues with document flattening with annotations

Aspose library:
Aspose.pdf -> 21.9 (DotNet version) (We have recently upgraded from 20.3 as per your support recommendation)

Issues:
• Document flattening doesn’t work for documents with more than 50 pages [SupportTicket].
• Annotation flattening for Highlight is inconsistent.

        Basically we are trying to create a pdf document with Aspose annotations applied on them. So we are creating an Annotation object and adding it on to annotations collection on a page object and perform annotation flattening.
        Code snippet below. With this, the Highlight annotation doesn’t get rendered correctly.

                    Eg.    var Annotation = AnnotatePage(pageSelected, clr, opacity, type, title, createdDate, subcoords);
                pageSelected.Annotations.Add(Annotation);
                Annotation.Flatten();

And while trying other workaround, we observed that performing a Document flattening instead of Annotation flattening, renders the Highlight annotation as expected.
But this introduced another limitation, where if the document is more than 50 pages none of the annotations are being flattened on the document. It works fine for documents with less than 50 pages.

Original doc with Highlight annotation:
Snippet1.jpg (13.8 KB)

        Annotation.flatten() document:

o Highlight is not being applied
o Right section indicates there are no unflatten annotations
Snippet2.jpg (19.2 KB)

        Document.flatten() document:

o Annotations are retained, but none of them are flattened, as seen on the right comments section.
Snippet3.jpg (36.5 KB)

Expected result:
We expect all the annotation to be flattened on the document without any inconsistency, irrespective of number of pages on the document.

Additional Notes:
We were informed that these issues were addressed in the 21.9 version of Aspose libraries. Hence we have got it upgraded. But it still doesn’t seem to work. Please help.

@chirag76

Would you please share the sample PDF for our reference so that we can test the scenario in our environment and address it accordingly? Also, please share the ticket ID which was resolved in 21.9 version.

On the document (Doc_HighlightIssue.pdf), we have added some highlight annotation on first page, and when we did Annotation.Flatten(). Notice the highlights doesn’t show up after flattening (Doc_HighlightIssueFlattened.pdf).

On the document (Doc_50PlusPage.pdf), we have added some annotations on page number 101, and when we do Doc.Faltten(), none of the annotations are flattened and can be seen in comment section of adobe reader (Doc_50PlusPageFlattened.pdf).

Original docs are attached as well.

Doc_50PlusPage.pdf (64.0 KB)
Doc_50PlusPageFlattened.pdf (63.9 KB)
Doc_HighlightIssue.pdf (292.6 KB)
Doc_HighlightIssueFlattened.pdf (294.4 KB)
Original_Doc_50PlusPage.pdf (85.8 KB)
Original_Doc_HighlightIssue.pdf (290.2 KB)

I do not have the ticket id referencing the fix done in 21.9 release. I had looked up on one of the support page, which had mentioned as this issue was fixed. But unfortunately, I am unable to find the page again. Below are some of the historic tickets created for the same issue, looks like the issue hasn’t been addressed yet.

@chirag76

We were able to notice the similar issue in our environment while testing the case with Aspose.PDF for .NET 21.10. Therefore, a ticket as PDFNET-50822 has been logged in our issue management system for the sake of correction. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hi @asad.ali, Do we have any update on PDFNET-50822 issue?

@chirag76

We are afraid that the earlier logged ticket is not yet resolved due to other issues in the queue. We will definitely investigate and resolve it on a first come first serve basis and let you know as soon as some significant progress is made towards its fix. Please spare us some time.

We apologize for the inconvenience.

Hi @asad.ali , Could you please provide us an update on PDFNET-50822 issue?

@chirag76

We are afraid that no updates are available at the moment about ticket resolution. However, we will surely let you know as soon as we make some certain progress towards issue fix. Please spare us some time.

We are sorry for the inconvenience.

@asad.ali, could you please give a tentative date for the same ? We have been awaiting a resolution to this for more than a year now !

@chirag76

We are afraid that the investigation of the ticket could not get completed due to other pending issues in the queue. Nevertheless, your concerns have already been recorded and as soon as we are in a position to share some reliable ETA, we will be updating you via this forum thread. Please spare us some time.

We apologize for the inconvenience.

@asad.ali, could you please provide an update on this ticket. Its been a blocker for some of our feature implementations for quite some time.

@chirag76

We have already recorded your concerns and have escalated the ticket to the next level of the priority. Please note that a ticket can only be at its highest priority when posted in our priority/paid support forum. You can please check that as well in case this issue is a blocker for you. Meanwhile, we will surely inform you once we make some progress towards ticket resolution.

We apologize for your inconvenience.

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