Copy Annotations in PDF without using XFDF - Aspose.PDF

Hi @asad.ali

Any news about this ticket?

Thx,

Nicolas

@nparisse

We are afraid that the earlier logged ticket is not resolved due to other issues in the queue logged prior to it. We will surely provide an update in this forum thread as soon as some news are available regarding issue fix. Please give us some time.

We are sorry for the inconvenience.

Hi @asad.ali

This ticket was created a year ago.This issue impact a lot of users of our application.

Can you let us know how many other items are treated prior to ours and give us an approximate time of treatment?

Thx,

Nicolas

@nparisse

We really regret to inform that investigation of the earlier logged ticket is not yet completed. Please note that we do realize the significance of the issue for you and have escalated it to the next level of priority. We will surely consider your concerns during investigation of the ticket and let you know as soon as we have news about its fix or ETA. We highly appreciate you cooperation in this regard.

We apologize for the delay and the inconvenience.

Hello @asad.ali ,

Yet again, Iā€™m asking for an update to our ticket PDFNET-49025. This request was created more than a year ago on October the 20th of 2020 year, and we have highlighted the impacts of this defect on our end users.

Since the creation of the ticket, we have been told that the investigation was ongoing and last time, we were told the item was set to the next level of priority.

Our company has subscribed to your support services and is yet to see the benefits. We kindly ask you to provide a resolution timeline before escalating the issue to our top management.

Regards,

Nicolas

@nparisse

First of all, please accept our humble apology for the delay and inconvenience faced due to this issue. The resolution of the ticket could not be made due to other issues and enhancement requests which were logged previously. As we shared earlier, the issues are resolved on first come first serve basis in normal support. Furthermore, resolution time of every issue/ticket/feature/enhancement varies depending upon number of issues logged prior to it, nature and complexity of the ticket, and the number of API internal components involved.

All of the above factors decide how much time an issue is going to take in order to get fully fixed. Nevertheless, we apologize for the inconvenience and loss you have faced due to the delay in issue fix. We are gathering all the related information regarding ticket resolution and will try to share some reliable ETA with you as soon as possible. We greatly appreciate your patience and comprehension in this regard.

We again apologize for the inconvenience.

@nparisse

We would like to share with you that the issue logged as PDFNET-49025 has been scheduled for a fix in 22.1 version of the API which will be released in January 2022. We will inform you once a fix to this issue available.

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

Hi @asad.ali

I tested the sample I had sent you and the issue is still there with v22.1.
The same sample but with Aspose.Pdf v22.1:

When would the fix be available?

Thx,
Nicolas

@nparisse

Would you please try using the below code snippet to copy the annotations using 22.1 version and let us know if issue still persists:

// C#  Code
foreach (var page in pdfDoc.Pages)
{
      Page newPage = newDoc.Pages.Add();
      foreach (var annotation in page.Annotations)
      {
         newPage.Annotations.Add(annotation);
      }
}

Hello @asad.ali

The issue was retested using the last Aspose release, version 22.11.0.0. The fix doesnā€™t work.
As a reminder, this is the situation we are facing:

  • We have been provided with a PDF document including a pencil annotation. The annotation was created by:
  1. Opening the PDF file on Adobe Acrobat
  2. Clicking on the Comment tab
  3. Clicking on Draw free form
  4. Creating the annotation
    screenshot of the steps to follow on adobe acrobat: image.png (190.1 KB)
  • The resulting page needs to be downsized to fit a specific size (A4). For this, the file is transformed into an image. Letā€™s call this image downsizePageImage.
  • We need to append the downsizePageImage into another PDF document on a new page (letā€™s call it appendedPage). The page size of the document needs to be kept at A4. Additional content may be added after the downsizePageImage.

Issue: converting the page into downsizePageImage removes the pencil drawing object.
Requirement: retrieve the missing pencil annotation, downsize it and insert it on the appendedPage.

From your last message, it seems you didnā€™t check my previous sample.

Iā€™m providing, once again, the sample.zip file and the code for you to check this: Dropbox - sample.zip - Simplify your life

In this sample, I have already implemented the for loop you talked about in your previous messages (line 35 of Module1.vb file).

In this for loop, I resize as many annotations as I can through the AsposeRenditionHelper.CalculateRectangleCoordinate then I add the annotation in the newPage (line 75 of Module1.vb).

Assuming there was an issue with the resizing operation, if the pencil annotation object was in the annotationCollection, it would have been added to the result.pdf file unsized. This is not the case.

The pencil annotation object is either not handled by your code, or it is handled somewhere else than in the annotationCollection.

If it is the latter, can you please tell us where this pencil annotation object can be found? Otherwise, do you have a workaround to catch this object?

Regards,

Nicolas

@nparisse

Your feedback and all details have been logged under another ticket i.e. PDFNET-53158 in our issue tracking system as it needs more investigation. We will surely look into its details and keep you posted with the status of its resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.