Hello.
I'm using PDF-XChange Editor with command line.
How can i do to print
multiple copies with command line.
Current parameters.
/print fileA fileA file A
Ideal parameters.
/print copies=3 fileA
Thanks.
Specify a copies to the print with command line
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: 1
- Joined: Sat Mar 30, 2019 1:33 pm
-
- Site Admin
- Posts: 6815
- Joined: Mon Oct 15, 2012 9:21 pm
- Location: London, UK
Re: Specify a copies to the print with command line
Hi loco jr.,
Thanks for the post - I'm afraid that this isn't currently possible, the only way would be to either set this in the UI and print once, then it should be remembered when run from the command line (I realize that's less than ideal), or use the showui="yes" parameter and set it that way.
I'll pass this along as a feature request for consideration.
Thanks,
Thanks for the post - I'm afraid that this isn't currently possible, the only way would be to either set this in the UI and print once, then it should be remembered when run from the command line (I realize that's less than ideal), or use the showui="yes" parameter and set it that way.
I'll pass this along as a feature request for consideration.
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
Thank you.
Best regards
Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
-
- User
- Posts: 5
- Joined: Thu Mar 03, 2022 6:48 pm
Re: Specify a copies to the print with command line
Hi, I'd like to vote for this feature as well!
Thanks,
Bill.
Thanks,
Bill.
-
- Site Admin
- Posts: 6901
- Joined: Wed Mar 25, 2009 10:37 pm
- Location: Chemainus, Canada
Re: Specify a copies to the print with command line
HI Bill,
let's do it.
I have received approval from the development team leader for this so I have raised the associated ticket. While for internal use only, should you refer to RT#6083: Feature request :: Editor :: Command line option to specify the number of copies of a print job here then any support staff member can get yo a status report.
I do not have an ETA for delivery of this feature, ultimately it will be at the Dev Team Leader's discretion.
Enjoy.
let's do it.
I have received approval from the development team leader for this so I have raised the associated ticket. While for internal use only, should you refer to RT#6083: Feature request :: Editor :: Command line option to specify the number of copies of a print job here then any support staff member can get yo a status report.
I do not have an ETA for delivery of this feature, ultimately it will be at the Dev Team Leader's discretion.
Enjoy.
Best regards
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
-
- User
- Posts: 5
- Joined: Thu Mar 03, 2022 6:48 pm
Re: Specify a copies to the print with command line
Thanks!
In the mean time though, I figured out a way to do it.
I'm posting it here in case anyone needs this in the near future.
So, instead of running PDF-XE like this:
(***which of course doesn't work yet, because the "copies" parameter doesn't yet exist):
You can do this:
where "myScript.js" contains this:
So whenever you need to print multiple copies, you can have your app (or whatever) write a new "myScript.js" file to a temp location with the number of copies you need in it.
As an aside -- I am continually amazed by the PDF-XE team going way above and beyond with the quality of PDF-XE. They've implemented some (or maybe most/all?) of Acrobat's embedded JavaScript abilities into PDF-XE!! You can play with the JavaScript stuff built in to PDF-XE by checking out this document: https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/pdfs/acrobatsdk_jsapiref.pdf
Using that document, I was able to do an even more advanced version of the command line printing above.
This will cause PDF-XE to print multiple copies of a page range (pages 3-5) to show how that can be done via JavaScript.
(Note that pretty much all of the settings in the Print Dialog can be set programmatically with JavaScript.)
The command line way: (***which of course isn't quite ready yet because "copies" isn't yet available)
The JavaScript way: (which you can use right now!)
where "myScript.js" contains this:
Enjoy,
Bill.
In the mean time though, I figured out a way to do it.
I'm posting it here in case anyone needs this in the near future.
So, instead of running PDF-XE like this:
(***which of course doesn't work yet, because the "copies" parameter doesn't yet exist):
Code: Select all
PDFXEdit.exe /print:printer="My Printer";copies=5 "myDocument.pdf"
Code: Select all
PDFXEdit.exe /runjs:log=no "myScript.js" "myDocument.pdf"
Code: Select all
pp = getPrintParams();
pp.interactive = pp.constants.interactionLevel.automatic; // <-- this causes a silent print
pp.printerName = "My Printer";
pp.NumCopies = 5;
print(pp);
As an aside -- I am continually amazed by the PDF-XE team going way above and beyond with the quality of PDF-XE. They've implemented some (or maybe most/all?) of Acrobat's embedded JavaScript abilities into PDF-XE!! You can play with the JavaScript stuff built in to PDF-XE by checking out this document: https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/pdfs/acrobatsdk_jsapiref.pdf
Using that document, I was able to do an even more advanced version of the command line printing above.
This will cause PDF-XE to print multiple copies of a page range (pages 3-5) to show how that can be done via JavaScript.
(Note that pretty much all of the settings in the Print Dialog can be set programmatically with JavaScript.)
The command line way: (***which of course isn't quite ready yet because "copies" isn't yet available)
Code: Select all
PDFXEdit.exe /print:printer="My Printer";pages=3-5;copies=5 "myDocument.pdf"
Code: Select all
PDFXEdit.exe /runjs:log=no "myScript.js" "myDocument.pdf"
Code: Select all
pp = getPrintParams();
pp.interactive = pp.constants.interactionLevel.automatic; // <-- this causes a silent print
pp.printerName = "My Printer";
pp.NumCopies = 5;
pp.firstPage = 2; // <-- this is zero based, so page 3 must be "2" here.
pp.lastPage = 4; // <-- this is zero based, so page 5 must be "4" here.
print(pp);
Bill.
-
- Site Admin
- Posts: 6901
- Joined: Wed Mar 25, 2009 10:37 pm
- Location: Chemainus, Canada
Re: Specify a copies to the print with command line
sweet!
Thanks for sharing this Bill.
Thanks for sharing this Bill.
Best regards
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com