Consolidating annotations from multiple sources

Hi Aleksandr,

The issue PDFKITNET-25432 is resolved at our end, and the fix will be available in our upcoming release. The release will be published this week or early next week. You’ll be notified via this forum thread as soon as the release will be available.

If you have any further questions, please do let us know.
Regards,

Hi Aleksandr,

I have been working with your second issue, but I couldn’t reproduce it the way you mentioned. When I export the annotations by using all the annotation types, it throws a null pointer exception; however, if I first export only the sticky note and then import the XFDF, I do not see any duplication at my end.

Could you please share a small working sample with us, which can help us reproduce your particular issue? Also, please share some more details regarding your working environment like OS, .NET Framework version, and development or deployment environment where this issue is occurring.

We’re sorry for the inconvenience and looking forward to help you out.
Regards,


Hello Shahzad,

Let me share some details.

Attached are files I'm using for the example in my code:

Dim vLicense As Aspose.Pdf.Kit.License = New Aspose.Pdf.Kit.License
vLicense.SetLicense("Aspose.Total.lic")

Dim gAnnoType As [Enum]() = {AnnotationType.Text}
Dim vPath As String = "..\..\\TestFiles\"
Dim fs1 As New FileStream(vPath + "InitialXfdf.xfdf", FileMode.OpenOrCreate)
Dim AnnEdit As New Aspose.Pdf.Kit.PdfAnnotationEditor()

AnnEdit.BindPdf(vPath + "AnnotFile1.pdf")
AnnEdit.ExportAnnotationsXfdf(fs1, 1, 1, gAnnoType)
AnnEdit = New Aspose.Pdf.Kit.PdfAnnotationEditor()
AnnEdit.BindPdf(vPath + "Source.pdf")
AnnEdit.ImportAnnotationFromXfdf(vPath + "InitialXfdf.xfdf", gAnnoType)
AnnEdit.Save(vPath + "SourceWithAnn.pdf")
fs1.Close()

I still get a doubled sticky note annotation.

I've tried this example on two machines:

  • 1. Windows Server 2008 x64, .Net 2.0, Visual Basic 2008 Express Edition, Aspose.Pdf.Kit 5.4;
  • 2. Windows XP Pro SP3, .Net 2.0, Visual Basic 2008 Express Edition, Aspose.Pdf.Kit 5.4;

Btw, one more observation: annotations export is a culture sensitive process. When exporting with some cultures (i.e. ru-Ru, nb-No) "rectangle" attribute (and some others) does lose a decimal separator and becomes something like that - rect="4354,684253,6154,702253", though it should look like - rect="43.54,684.253,61.54,702.253"

Regards,
Aleksandr

Hi Aleksandr,

I have again tried and tested the issue using all the possible ways according to the scenario you mentioned; however, I’m still unable to reproduce this issue. Please spare us some time for further investigation. We’ll let you know if we require any further information from your end in order to reproduce this issue.

We’re sorry for the inconvenience and appreciate your cooperation.
Regards,

The issues you have found earlier (filed as 25432) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hello Shahzad,

Thank you for your cooperation.

An issue with doubled sticky notes seems to be gone with a new release of Pdf.Kit.

Currently I'm in process of evaluating a hotfix (v 5.5) you've published and, unfortunatelly, pdf.kit still truncates some attributes on second export/import of annotations. Attribute "name" is critical for our solution, since we need to uniquely differentiate each annotation in a pdf document. Could you please check this with your team and tell us how quick it could be fixed. Once again - this is very important for us.

One more thing - AnnotationEditor still throws an exception when exporting annotations with a full list of annotations types.

Upd.: "AnnotationType.Popup" causes that exception.

I would appreciate if you could response asap.

Regards,
Aleksandr

Hi Aleksandr,

I have logged the issue of missing attributes (name and creation date) separately as PDFKITNET-26344. While the other issue of NullPointerException while specifying all annotation types is logged as PDFKITNET-26345 in our issue tracking system. Our team will look into these issues and we’ll try to resolve them the earliest possible. We’ll also provide you a hot fix as soon as these issues are resolved.

We’re sorry for the inconvenience.
Regards,

Hello Shahzad,

Thank you for the reply.

I’ve noticed one more bug - when importing “Sticky note” annotations PDFAnnotationEditor cuts a closing “>” of the “body” attribute.

<text icon="Comment" rect="287.24,574.75,305.24,592.75" color="#ffff00" title="aleksandr" opacity="1" flags="print,nozoom,norotate" date="D:20110502104940+02'00'" subject="Sticky Note" page="0">
<popup page="0" rect="595,472.75,775,592.75" open="no" flags="print,nozoom,norotate">
</popup>
<contents-richtext><body xmlns="<A href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</A>" xmlns:xfa="<A href="http://www.xfa.org/schema/xfa-data/1.0/">http://www.xfa.org/schema/xfa-data/1.0/</A>" xfa:APIVersion="Acrobat:10.0.1" xfa:spec="2.0.2"><p dir="ltr"><span dir="ltr" style="font-size:10.0pt;text-align:left;color:#000000;font-weight:normal;font-style:normal">Test</span></p><STRONG><FONT color=#ff0000></body</FONT></STRONG><BR></contents-richtext>
</text>

As you can see “</body” tag isn’t closed.

Regards,
Aleksandr

Hi Aleksandr,

I have looked into the files you shared earlier, but I’m afraid, I couldn’t notice any such problem. Is it some other file you’re having problem with? Could you please share the input PDF and XML files? Does this issue occur when exporting the annotations or when importing the annotations?

We’re sorry for the inconvenience and looking forward to help you out.
Regards,

The issues you have found earlier (filed as 26345) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi Shahzad,

Thank you for the reply.

The issue with the "body" tag needs some more investigation on our side.

I've noticed one more issue with PDFAnnotationEditor - annotations of the arrow type. After export and import they are loosing their tails. Attached are files I'm using for the test. The code I'm using is:

Dim vPath As String = "..\..\\TestFiles\ToAspose\"

Dim fs1 As New FileStream(vPath + "InitialXfdf.xfdf", FileMode.OpenOrCreate)

Dim AnnEdit As New Aspose.Pdf.Kit.PdfAnnotationEditor()

AnnEdit.BindPdf(vPath + "AnnotFile1.pdf")

AnnEdit.ExportAnnotationsXfdf(fs1, 1, 1, annoType)

AnnEdit = New Aspose.Pdf.Kit.PdfAnnotationEditor()

AnnEdit.BindPdf(vPath + "Source.pdf")

AnnEdit.ImportAnnotationFromXfdf(vPath + "InitialXfdf.xfdf", annoType)

AnnEdit.Save(vPath + "SourceWithAnn.pdf")

AnnEdit = New Aspose.Pdf.Kit.PdfAnnotationEditor()

AnnEdit.BindPdf(vPath + "SourceWithAnn.pdf")

fs1.Close()

Hi Aleksandr,

I have tried to reproduce this issue at my end, but I couldn’t succeed. The file AnnotFile1.pdf is corrupt and I’m unable to open it using Adobe Reader or Adobe Acrobat. Could you please check this file at your end and see if it works? Also, please share a fresh copy of this file with us, so we could move forward with our investigation.

We’re sorry for the inconvenience and looking forward to help you out.
Regards,

Hello Shahzad,

I'm sorry about that. Please find attached a working versions of files.

Regards,

Aleksandr

Hi Aleksandr,

Thank you very much for sharing the updated PDF files. I have reproduced this issue at my end and logged it as PDFKITNET-28487 in our issue tracking system. Our team will look into this issue and you’ll be updated via this forum thread once it is resolved.

We’re sorry for the inconvenience.
Regards,

The issues you have found earlier (filed as 26344) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.