Issue with import of annotations and their status

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
madhu1528
User
Posts: 14
Joined: Mon Apr 22, 2019 10:02 am

Issue with import of annotations and their status

Post by madhu1528 »

Hi team,

1. We are importing and exporting annotations using the below code snippet.

op.Do(0);

-import of annotaion

var op = ole_pdf.Inst.CreateOp(ole_pdf.Inst.Str2ID("op.document.importCommentsAndFields"));
if (op == null)
{
return;
}
op.Params.Root["Input"].v = ole_pdf.Doc; // put target-document
op.Params.Root["Options.FileName"].v = "D:\\Exchange_app_test\\sample1.xfdf"; // *.xfdf too
op.Do();

but problem we are not able to import status of the annotation.

Please rpovide a code snippet for the mentioned issue.

Regards,
Madhu
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Issue with import of annotations and their status

Post by Sasha - Tracker Dev Team »

Hello Madhu,

Try doing that via the End-User Editor. Export the comments with status into an export file and try to import them into the new document and see whether the status was also imported. If it does not work then it will mean that the Editor itself does not support that feature yet.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
madhu1528
User
Posts: 14
Joined: Mon Apr 22, 2019 10:02 am

Re: Issue with import of annotations and their status

Post by madhu1528 »

Hi alex,

While exporting only status are not beeing exported , below code snippet i am using for exporting can you suggest other code for exporting in order to import status along with annotation.


PDFXEdit.IPXC_DocAuthCallback authCallBack = null;
_pdfInst = new PDFXEdit.PXV_Inst();
_pxcInst = (PDFXEdit.IPXC_Inst)_pdfInst.GetExtension("PXC");
PDFXEdit.IPXC_Document docTest = _pxcInst.OpenDocumentFromFile(@"D:\\Exchange_app_test\\Source.pdf", authCallBack);
int nIDImport = _pdfInst.Str2ID("op.document.exportCommentsAndFields", false);
IOperation op = _pdfInst.CreateOp(nIDImport);
op.Params.Root[(object)"Input"].v = docTest;
ICabNode cabNode = (ICabNode)op.Params.Root[(object)"Options"];
cabNode[(object)"ExportAnnots"].v = (object)true;
cabNode[(object)"ExportFields"].v = (object)true;
cabNode[(object)"Format"].v = "XFDF";
IAFS_Name name = ((IAFS_Inst)this.ole_pdf.Inst.GetExtension("AFS")).DefaultFileSys.StringToName(@"D:\Exchange_app_test\\sample1.xfdf", 0, (IAFS_Name)null);
cabNode[(object)"DestFile"].v = (object)name;
//cabNode[(object)"DestFile"].v = @"D:\\Exchange_app_test\\sample1.xfdf";
op.Do(0);


Regards,
Madhu
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Issue with import of annotations and their status

Post by Sasha - Tracker Dev Team »

Hello Madhu,

To move further in this problem, we'll need you to answer this post:
posting.php?mode=reply&f=66&t=32516#pr133178

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply