I've written a JavaScript and would like to add it to the toolbar. How do I do this?
Firstly, it's worth noting that we generally don't write scripts for users, as it takes either support staff, or developers, away from helping other users. Exceptions may be made when scripts are extremely simple, but we don't guarantee it. It's also worth noting that we support most of the features and functions of the Adobe JavaScript API, which are documented in the Adobe JavaScript API Reference, including those found below. A working knowledge of JavaScript is assumed for this article. If you are not familiar with JavaScript, there are many resources available for free, online, that will help you learn.
The first step is to move all of the code so that it is contained within a function. For example, the following will set a specific zoom level:
Then you will need to use the app.addToolButton method to create the button. To continue with the above example, this would be as follows:
Now you will need to save the script under the JavaScripts folder under either the installation folder (e.g. default is C:\Program Files\Tracker Software\PDF Editor), or %appdata%\Roaming\Tracker Software\PDFXEditor\3.0. The folder is not created by default as the majority of users do not require custom JavaScripts, but it can easily be created by right clicking in Windows Explorer and selecting New --> Folder (Ctrl + Shift + N), but please be aware that the folder name is case sensitive and needs to be written as JavaScripts. When you next launch the Editor you should now see your new toolbar buttons.
You can contact us by phone, email or our social media accounts — we are here to assist you.