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.
zarkogajic
User
Posts: 1372 Joined: Thu Sep 05, 2019 12:35 pm
Post
by zarkogajic » Fri Feb 12, 2021 3:10 pm
Hi Support,
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
zarkogajic
User
Posts: 1372 Joined: Thu Sep 05, 2019 12:35 pm
Post
by zarkogajic » Wed Feb 17, 2021 11:22 am
Support .... ?
-ž
Sasha - Tracker Dev Team
User
Posts: 5522 Joined: Fri Nov 21, 2014 8:27 am
Post
by Sasha - Tracker Dev Team » Wed Feb 17, 2021 1:44 pm
Hello zarkogajic,
Hmm, I don't have any exceptions in the original sample, where the annots are being copied in the same document. Do you also have troubles with the original sample?
But I did recreate the behavior with other document as a NewDoc parameter.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Sasha - Tracker Dev Team
User
Posts: 5522 Joined: Fri Nov 21, 2014 8:27 am
Post
by Sasha - Tracker Dev Team » Wed Feb 17, 2021 2:03 pm
Hello zarkogajic,
Found the issue - the pages count in my destination document was less then the options["NewPageIndex"].v = 3;
After further inspection - it seems that copying annotations in other documents via this operation is not yet implemented. You can even try doing that in the End-User Editor - it won't work.
A TODO from our side.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1372 Joined: Thu Sep 05, 2019 12:35 pm
Post
by zarkogajic » Wed Feb 17, 2021 2:07 pm
Hi Alex,
Thanks for the input.
Once implemented - will this operation allow copying annotations from one *core* document to another (so, not IPXV_Document)?
If "yes", why page-by-page as requested by the "Input" parameter (SDK Help: Note that all of the annotations must belong to one page in one document )?
-žarko
Tracker Supp-Stefan
Site Admin
Posts: 17948 Joined: Mon Jan 12, 2009 8:07 am
Location: London
Post
by Tracker Supp-Stefan » Thu Feb 18, 2021 10:38 am
Hello zarkogajic,
Alex asked me to make a ticket in our internal system for this issue. The ticket number is
#5482: op.annots.move SDK Help sample -> "the parameter is incorrect"
and we will post again here as soon as there is any additional information in it.
Kind regards,
Stefan
zarkogajic
User
Posts: 1372 Joined: Thu Sep 05, 2019 12:35 pm
Post
by zarkogajic » Thu Feb 18, 2021 10:41 am
-ž
Sasha - Tracker Dev Team
User
Posts: 5522 Joined: Fri Nov 21, 2014 8:27 am
Post
by Sasha - Tracker Dev Team » Thu Feb 18, 2021 1:00 pm
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Sasha - Tracker Dev Team
User
Posts: 5522 Joined: Fri Nov 21, 2014 8:27 am
Post
by Sasha - Tracker Dev Team » Thu Apr 15, 2021 8:51 am
Hello zarkogajic,
We've made a fix for this one and it will be available from the 353 build that should be available in a week or so.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1372 Joined: Thu Sep 05, 2019 12:35 pm
Post
by zarkogajic » Wed Apr 21, 2021 12:53 pm
Hi Alex,
What was actually fixed here?
I'm still getting the "The parameter is incorrect" if for the "NewDoc" entry I'm using a different Core Document.
p.s.
So, trying to copy annotations from one core document to another using "op.annots.move".
-žarko
Sasha - Tracker Dev Team
User
Posts: 5522 Joined: Fri Nov 21, 2014 8:27 am
Post
by Sasha - Tracker Dev Team » Wed Apr 21, 2021 2:01 pm
Hello zarkogajic,
This works for me:
MoveAnnotsToAnotherDoc.zip
Cheers,
Alex
You do not have the required permissions to view the files attached to this post.
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1372 Joined: Thu Sep 05, 2019 12:35 pm
Post
by zarkogajic » Wed Apr 21, 2021 2:27 pm
Hi Alex,
Thanks.
The problem seems to be with the "NewPageIndex" parameter.
If I leave it as "-1" (default) then AV.
If I specify the page index - seems to work.
-žarko
Sasha - Tracker Dev Team
User
Posts: 5522 Joined: Fri Nov 21, 2014 8:27 am
Post
by Sasha - Tracker Dev Team » Wed Apr 21, 2021 2:29 pm
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ