if annotation size changed, does FDFMerge see it as new annotation

35 views
Skip to first unread message

Laurence Skoropinski

unread,
Feb 26, 2018, 7:21:58 PM2/26/18
to PDFTron PDFNet SDK
using (Stream ms = new MemoryStream())
using (PDFDoc pdfDoc = new PDFDoc(this.documentRepository.DownloadBlobToStream(in_BlobParts.Container, in_BlobParts.BlobFileNameId, ms)))
{
var existingAnnots = pdfDoc.FDFExtract(PDFDoc.ExtractFlag.e_both);
var xxx = existingAnnots.SaveAsXFDF(); // test to see existing annotations

using (FDFDoc fdf = new FDFDoc(FDFDoc.CreateFromXFDF(annotations)))
{
var yyy = fdf.SaveAsXFDF(); // test to see in annotations
pdfDoc.InitSecurityHandler();
pdfDoc.FDFMerge(fdf);

}

var zzz = pdfDoc.FDFExtract(PDFDoc.ExtractFlag.e_both).SaveAsXFDF(); //test to see results, here I see two annotations with the same guid name, in annotation is a resize of the existing annotation. expected to see a single merged annotation with the new size. But see two with the same name guid.
}

So question, should they have merged into a single annotation, if so anyone see why code is incorrect.

Thanks for any help.

Shakthi Wijeratne

unread,
Feb 27, 2018, 2:49:55 PM2/27/18
to PDFTron PDFNet SDK
Hi Laurance,

We have since improved this feature in the latest version of our SDK, where merging annotations will take the GUIDs into account. If you would like a release candidate version of our new SDK, please contact us at sup...@pdftron.com (we can provide you with the build later this week).

Thanks.

Laurence Skoropinski

unread,
Feb 28, 2018, 2:36:14 PM2/28/18
to PDFTron PDFNet SDK
thank you for the answer.
Reply all
Reply to author
Forward
0 new messages