Hi,
In the past I did use a custom script to add button to PDFEditor.
Script "ReverseOrder.js" was stored in %appdata%\Tracker Software\PDFXEditor\3.0\JavaScripts\ folder
Is that still supported? (I didn't see any added button)
Regards
Bernard
Script content :
function ReversePageOrder()
{
for (i = this.numPages - 1; i >= 0; i--) this.movePage(i);
}
app.addToolButton({
cName: "Reverse Page Order",
cExec: "ReversePageOrder()",
cTooltext: "Reverse pages",
cEnable: true,
nPos: 0
});
Does app.addToolButton still works? (not at my side) SOLVED
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
-
- User
- Posts: 120
- Joined: Tue May 06, 2014 7:52 pm
-
- User
- Posts: 120
- Joined: Tue May 06, 2014 7:52 pm
Re: Does app.addToolButton still works? (not at my side) SOLVED
Hi,
I did make some more investigations and it looks like the JavaScripts folder should be directly under PDF installation folder instead of being in a "3.0" folder.
Therefore for portable version right place for the Javascripts.js is:
...\PDFXEdit8_Portable\JavaScripts\
Upon launching, this add a "Add-on Tools" menu at right of Help Menu.
Button icon look like generic module button. However the cTooltext: "Reverse pages" from my script is well displayed when moving mouse over it.
Thanks for making this as solution
I did make some more investigations and it looks like the JavaScripts folder should be directly under PDF installation folder instead of being in a "3.0" folder.
Therefore for portable version right place for the Javascripts.js is:
...\PDFXEdit8_Portable\JavaScripts\
Upon launching, this add a "Add-on Tools" menu at right of Help Menu.
Button icon look like generic module button. However the cTooltext: "Reverse pages" from my script is well displayed when moving mouse over it.
Thanks for making this as solution
-
- User
- Posts: 120
- Joined: Tue May 06, 2014 7:52 pm
Re: Does app.addToolButton still works? (not at my side)
I did add a Label name so that to avoid confusion when having many add-on buttons.
Here is new script with the cLabel addition:
function ReversePageOrder()
{
for (i = this.numPages - 1; i >= 0; i--) this.movePage(i);
}
app.addToolButton({
cName: "Reverse Page Order",
cExec: "ReversePageOrder()",
cTooltext: "Reverse pages",
cEnable: true,
nPos: 0,
cLabel: "Reverse pages"
});
Here is new script with the cLabel addition:
function ReversePageOrder()
{
for (i = this.numPages - 1; i >= 0; i--) this.movePage(i);
}
app.addToolButton({
cName: "Reverse Page Order",
cExec: "ReversePageOrder()",
cTooltext: "Reverse pages",
cEnable: true,
nPos: 0,
cLabel: "Reverse pages"
});
Re: Does app.addToolButton still works? (not at my side)
You can add icon to your button ....
eg:
oIcon: util.iconStreamFromImage("/c/Users/User/Documents/Icons/file.ico"),
eg:
oIcon: util.iconStreamFromImage("/c/Users/User/Documents/Icons/file.ico"),
It's impossible to lead us astray for we don't care even to choose the way.
PDF-XChange PRO, 10.1.1 (Build 381) / W7 SP1 x64
PDF-XChange PRO, 10.1.1 (Build 381) / W7 SP1 x64
- Dimitar - Tracker Supp
- Site Admin
- Posts: 1797
- Joined: Mon Jan 15, 2018 9:01 am