js support

Forum for the PDF-XChange Editor - Free and Licensed Versions

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

bob_sun
User
Posts: 166
Joined: Sat Jan 22, 2011 9:11 am

js support

Post by bob_sun »

Hello,

Can we write javascript to access pdf contents?


Bob
Last edited by bob_sun on Thu Dec 24, 2015 5:55 pm, edited 5 times in total.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17948
Joined: Mon Jan 12, 2009 8:07 am
Location: London

Re: javascript support

Post by Tracker Supp-Stefan »

Hello Bob,

1. You should be able to write your own script that will search for a string, and if found put a highlight annotation object over it.
Please take a look at this file:
http://www.adobe.com/content/dam/Adobe/ ... erence.pdf
And the getPageNthWord, and getPageNthWordQuads (so that you can get all the words on a page, and if a given word matches your criteria get it's coordinates and place a highlight annotation over it).

2. I will need to ask our devs for some details on the logic used for "search in same paragraph", but that might not be available fro you via JS.

3. I doubt this is possible with JS at all.

Regards,
Stefan
bob_sun
User
Posts: 166
Joined: Sat Jan 22, 2011 9:11 am

Re: javascript support

Post by bob_sun »

Stefan,

Also can we add shortcut keys in "customize toolbar" to specific javascript embedded in the file or in some folder?

Bob
Last edited by bob_sun on Wed Dec 02, 2015 3:03 pm, edited 1 time in total.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17948
Joined: Mon Jan 12, 2009 8:07 am
Location: London

Re: javascript support

Post by Tracker Supp-Stefan »

Hello Bob,

No I do not believe this is possible with the end user product.
Also given your use case - I believe our Editor SDK will better suit your needs and give you much more control over the whole process:
https://www.pdf-xchange.com/produc ... editor-sdk

Regards,
Stefan
bob_sun
User
Posts: 166
Joined: Sat Jan 22, 2011 9:11 am

Re: javascript support

Post by bob_sun »

What version of Adobe javascript spec does my Editor 5.5, Build 313.1 support?
Last edited by bob_sun on Wed Dec 02, 2015 3:02 pm, edited 1 time in total.
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK

Re: javascript support

Post by Will - Tracker Supp »

Hi Bob,

Offhand, I'm not sure what Version of the Adobe JS API we support, or what functions from it and would need to ask the Dev. Team for confirmation. However, 313.1 is an old build and I would recommend downloading and testing build 315 to see if this was an issue with older releases, or if support for this function was implemented later:
https://www.pdf-xchange.com/PDFXVE5.zip

Thanks,
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
bob_sun
User
Posts: 166
Joined: Sat Jan 22, 2011 9:11 am

Re: js support

Post by bob_sun »

Is there any plan to improve the js engine?
Last edited by bob_sun on Thu Dec 24, 2015 5:52 pm, edited 1 time in total.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17948
Joined: Mon Jan 12, 2009 8:07 am
Location: London

Re: js support

Post by Tracker Supp-Stefan »

Hi Bob,

Seems like there are two topics with duplicate discussion on them. Let's keep it at one place, so do tell us which of the two forum threads we shall continue in?

Cheers,
Stefan
bob_sun
User
Posts: 166
Joined: Sat Jan 22, 2011 9:11 am

Re: js support

Post by bob_sun »

please reply to the other one.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17948
Joined: Mon Jan 12, 2009 8:07 am
Location: London

Re: js support

Post by Tracker Supp-Stefan »

OK Bob,

Already done - :)
So lets not post in this one any more and continue the discussion there!

Cheers,
Stefan