Page 1 of 1

Annotation content

Posted: Fri Nov 23, 2018 9:32 am
by betterRunner
Hi there,

I got a question that is the PDF-XChange Viewer SDK owns the ability to extra the contens of annotation (highlight and etc.).

A similar question is here: viewtopic.php?f=36&t=29104&p=113906&hilit=text#p113906 but the answer is about Editor SDK, I want to know if Viewer SDK can do the same thing or not.

Thank you very much!

Re: Annotation content

Posted: Fri Nov 23, 2018 1:04 pm
by Tracker Supp-Stefan
Hello betterRunner,

The JS should work the same in the Viewer SDK as well. Give it a try with the RunJavaScript method and the JS code from that other topic!

Regards,
Stefan

Re: Annotation content

Posted: Sat Nov 24, 2018 3:32 am
by betterRunner
Hello Stefan,

Thanks for your help.

The code did work in Viewer SDK as well.

I just got another question about the "annotation quads" if you don't mind, that is:

Since I got the quads of one annotation, together with page number, am I able to jump to the annotation by program?
(I know by clicking the item in "comment list" I can jump to the annotation, but in my application I need to extra the annotations outside the tool so I need to jump by its quads).

Thank you very much!

Re: Annotation content

Posted: Mon Nov 26, 2018 12:04 pm
by Tracker Supp-Stefan
Hello betterRunner,

You would need to use this method:
MovePointToScreenPoint

And you will probably need some of these methods as well:
PagePointsToViewPoints
TranslateScreenPoint
ViewPointsToPagePoints

But the help system for the Viewer is a bit older now - and linking to it is a bit tricky - so please do use the search field once you click on the first link to find the other methods.

Regards,
Stefan

Re: Annotation content

Posted: Wed Nov 28, 2018 3:43 am
by betterRunner
Hello Stefan,

The api you mentioned works, and we are now actually plan to use the Editor SDK for some other reasons.

So how to achieve this in Editor SDK? The functions' name seem have changed.

Thanks.

Re: Annotation content

Posted: Wed Nov 28, 2018 3:45 pm
by Tracker Supp-Stefan
Hello betterRunner,

Yes the Editor SDK was pretty much rewritten from scratch, and has nothing in common with the Viewer one.

I believe you will need to start here for 'moving' around a document via the Editor SDK code:
https://sdkhelp.pdf-xchange.com/vi ... outManager

But please note that I am myself still learning that SDK, so if you have any Editor SDK questions - I would recommend you to post them in the Editor SDK specific forums, as my colleagues from the dev team are active there (and not so much here) - and will be able to assist you as needed!

Regards,
Stefan

Re: Annotation content

Posted: Fri Nov 30, 2018 7:00 am
by betterRunner
Got it, thank you Stefan!

Re: Annotation content

Posted: Fri Nov 30, 2018 3:22 pm
by Tracker Supp-Stefan
:D