I'm trying to copy annotations from one core document to another. I'm trying with "op.annots.move".
I'm following the sample from https://sdkhelp.pdf-xchange.com/view/PXV:op_annots_move
On Op.Do() I'm getting "the parameter is incorrect" exception.
My code looks like:
Code: Select all
//both AnnotationFromSourceCoreDoc AND TARGETCoreDoc have a valid reference
int nID = Inst.Str2ID("op.annots.move", false);
PDFXEdit.IOperation Op = Inst.CreateOp(nID);
PDFXEdit.ICabNode input = Op.Params.Root["Input"];
input.Add().v = AnnotationFromSourceCoreDoc;
PDFXEdit.ICabNode options = Op.Params.Root["Options"];
options["NewDoc"].v = TARGETCoreDoc;
options["Copy"].v = true;
Op.Do(); //-> EXCEPTION HERE
p.s.
Btw, the "Doc" for "NewDoc" should be an IPXC_Document, not IPXV_Document as in that sample, correct?
-žarko