Command Line control to invoke Java Script

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

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

invoicer
User
Posts: 3
Joined: Wed Nov 19, 2025 10:22 am

Command Line control to invoke Java Script

Post by invoicer »

Hello all!

We're using PDF -XChange Editor since many years for our invoicing.
For this we use the command line interface to execute a java script, for combining two PDFs together.
So far this has worked very reliable.

However, we have now updated our workstation to Win11 and to PDF-XChange Editor Plus (10.7.5 Build 403).

Since the update, the Java Script execution via Command Line does no longer work and we cannot trouble shoot the issue, as apperantly also the log file "_RunJSLog.txt" (mentioned in the documentation), is no where to be found.

Can anybody give us some advice how we can use the command line interface with the newest version?
Maybe the arguments changed (it does not look so), maybe some strange security behaviour from windows?

This is our command used before:

C:\Program Files\Tracker Software\PDF Editor\PDFXEdit.exe /runjs:log
"Y:\Administration\Finanzen\Kreditoren\Temp\251119_CopyScript_KR250386.txt"
"Y:\Administration\Finanzen\Kreditoren\Temp\251119_KR250386.pdf"


This is the java script (it just copies the mentioned document together and saves):

this.insertPages({
nPage:0,
cPath:"/Y/Administration/Finanzen/Kreditoren/01_Scan_Rechnungen/251117_001RG08089710.202511.pdf"
})
app.execMenuItem("Save");


Uppon invoication of the above command, we do not get any return value or any indication, that PDFXchange even does anything at all.. Also the log file is not in the programm folder.


Any help to troubleshoot this is greatly appreciated.
Regards
Marco
User avatar
Sean - PDF-XChange
Site Admin
Posts: 456
Joined: Wed Sep 14, 2016 5:42 pm

Re: Command Line control to invoke Java Script

Post by Sean - PDF-XChange »

Hi Marco,

I've asked the development team for their input on this.

Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
invoicer
User
Posts: 3
Joined: Wed Nov 19, 2025 10:22 am

Re: Command Line control to invoke Java Script

Post by invoicer »

Thank you very much! Looking forward to the feedback.

In mean time I found some small hint:

When I already have pdfxchange editor open, enable the javascript console and then execute the above command in cmd, I get the following:
pdfxchangeSecErr.jpg
I checked and enabled all security related settings in the menu (java script and security tab), but no sucess so far..
You do not have the required permissions to view the files attached to this post.
Last edited by invoicer on Wed Nov 19, 2025 2:45 pm, edited 1 time in total.
User avatar
Sean - PDF-XChange
Site Admin
Posts: 456
Joined: Wed Sep 14, 2016 5:42 pm

Re: Command Line control to invoke Java Script

Post by Sean - PDF-XChange »

Okay, thanks - let's see what the developers think.

Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
User avatar
Sean - PDF-XChange
Site Admin
Posts: 456
Joined: Wed Sep 14, 2016 5:42 pm

Re: Command Line control to invoke Java Script

Post by Sean - PDF-XChange »

Just an update on this issue - the developers are aware of it and it will be fixed in the upcoming "hotfix" release.

Best regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
invoicer
User
Posts: 3
Joined: Wed Nov 19, 2025 10:22 am

Re: Command Line control to invoke Java Script

Post by invoicer »

I installed the update and tested.
Good News! Everyhting is working fine again.

I wanted to thank you and your team for the quick reaction.



Have good day.
Beste Regards
Marco
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 12030
Joined: Wed Jan 03, 2018 6:52 pm

Command Line control to invoke Java Script

Post by Daniel - PDF-XChange »

:)
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

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