Is there a way to add a PageOpen javascript to every page?

This forum is for plugins used in the PDF-XChange Editor only.

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

Post Reply
mmitchell_houston
User
Posts: 8
Joined: Thu Apr 19, 2018 11:06 am

Is there a way to add a PageOpen javascript to every page?

Post by mmitchell_houston »

I have a bit of javascript code I want to put on each and every page in my document.
Is there a way to quickly do this?
Or do I have to click on each and every page, one-by-one?
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8439
Joined: Wed Jan 03, 2018 6:52 pm

Re: Is there a way to add a PageOpen javascript to every page?

Post by TrackerSupp-Daniel »

Once you've added a button that runs the JS, you should be able to select it and use the Duplicate function to place a copy of it on each page:
Image
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
mmitchell_houston
User
Posts: 8
Joined: Thu Apr 19, 2018 11:06 am

Re: Is there a way to add a PageOpen javascript to every page?

Post by mmitchell_houston »

Thank you for the reply (and the tip -- I will remember it), but I'm not using a button to run the JS. As noted in the original post, I am adding a script to the PAGE OPEN event (click on the page thumbnail and you will be able to see the Page Open and Page Close options in the Page Properties panel.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8439
Joined: Wed Jan 03, 2018 6:52 pm

Re: Is there a way to add a PageOpen javascript to every page?

Post by TrackerSupp-Daniel »

Hi again,
You could try adding it to the document javascript (CTRL+D to open document settings), but you would need to add more parameters so that it could recognize a pageopen from there.
I do not know if there is another method of duplicating these, I will pass this to our dev support and see if they have any ideas for you on the mater.
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
mmitchell_houston
User
Posts: 8
Joined: Thu Apr 19, 2018 11:06 am

Re: Is there a way to add a PageOpen javascript to every page?

Post by mmitchell_houston »

I looked into the Document properties, and cannot figure out how to get it to add anything that can simulate a PageOpen event at that level. I suppose it might be possible to craft some sort of "listener" script, but for the life of me, I cannot find anyone who has documented how to do it.

Any progress on your end?

On my end, I'm looking into whether I can add the Javascript from the InDesign side of things.
mmitchell_houston
User
Posts: 8
Joined: Thu Apr 19, 2018 11:06 am

Re: Is there a way to add a PageOpen javascript to every page?

Post by mmitchell_houston »

Has there been any progress on this issue? I would love to resolve this issue before starting the next iteration of my project.

Mike

PS: Or if anyone can think of how I could extend the Document Open event to "sniff" out the Page Open and Page Close events, that would work, too.In fact, that would be great!
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8439
Joined: Wed Jan 03, 2018 6:52 pm

Re: Is there a way to add a PageOpen javascript to every page?

Post by TrackerSupp-Daniel »

Hello again,

Sorry for the delay, it doesn't seem it would be feasible to do this recursively on all document pages using JS. Conversely it should be doable using our SDK products. The Editor SDK is available as a free download here: https://www.pdf-xchange.com/produc ... editor-sdk

This will allow you to experiment with it (if you wish) and find a way to implement recursive JS to the document before making the purchase.
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Post Reply