using Command line to print, requiring autorotate

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

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
rolfmundinger@gmx.de
User
Posts: 9
Joined: Tue Oct 12, 2010 8:39 am

using Command line to print, requiring autorotate

Post by rolfmundinger@gmx.de »

Have recently noticed that printout can be initiated by command line.
In case the document contains pages in portrait AND landscape format my result up to now is that landscape pages are being printed only partly on the paper, no rotation is taking place. Of course the portrait pages of the document are printing fine.

Did I miss something in my setup or is this function not available.
Please help.

Thanks and best regards
Rolf
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: using Command line to print, requiring autorotate

Post by Will - Tracker Supp »

Hi Rolf,

Thanks for the post - Can you please send the command string that you're using?

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
rolfmundinger@gmx.de
User
Posts: 9
Joined: Tue Oct 12, 2010 8:39 am

Re: using Command line to print, requiring autorotate

Post by rolfmundinger@gmx.de »

Hi Will,

thanks for picking up and responding.

The command I am using is
"drive & path & \PDFXEdit.exe" /print:default=yes;showui=no;pages=1,2,3,4 "drive & path & \filename.pdf" e.g.
"C:\Program Files\Tracker Software\PDF Editor\PDFXEdit.exe" /print:default=yes;showui=no;pages=1,2,,3,4 "C:\Documents\Test.pdf"

E.g. page 1,3,4 are portrait, page 2 is landscape. Page 2 will print as landscape in a portrait oriented page (using only the upper half of the paper, loosing the right part of that page as landscape would be too wide).

Any advice or suggestion. Not sure if I setup some parameters wrong due to lack of understanding.

Many thanks and best regards
Rolf
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8613
Joined: Wed Jan 03, 2018 6:52 pm

Re: using Command line to print, requiring autorotate

Post by TrackerSupp-Daniel »

Hello Rolf,

The "Default=yes" tag that you have in there is forcing the Editor to assume the default printing options, which does not include Auto rotate:
image.png
As the commend line option will use the last used settings, you will wish to perform one print from the Editor UI to setup the settings you wish to have in place, (alternatively use the "showui=yes" tag to set it up manually once over, then go back to "no" for this option.
I have included below an excerpt from the Editor manual that details the print command:

Code: Select all

/print
 
This command prints pages from specified documents.
 
Syntax
 
/print[:[default[=yes|no]][;showui[=yes|no [;printer=<printername>][;pages=<pagesrange>]] <filename1> [<filename2> ... <filenameN>]
 
Parameters
 
•default - if specified then default parameters will be used for printing. PDF-XChange Editor uses the most recently used print parameters by default.
•showui - if specified then the standard print dialogue will be displayed before printing. The default setting is that the application prints pages silently (without user interaction).
•printer - is used to specify the printer to be used. The default printer will be used when this option is not enabled.
•pages - is used to specify the page range to be printed. All pages of the active document will be printed when this option is not enabled.
 
Example
 
PDFXEdit.exe /print:default=yes;showui=yes;printer="PDF-XChange Printer" "c:\example.pdf"
Note that you do not need to include all options in the command, as they are assumed to be in a certain state when not included. As an example, I believe you could simply use:

Code: Select all

PDFXEdit.exe /print:"c:\example.pdf"
This would use the system default printer, not show you the UI, and use the last used settings for printing from within the Editor, all in a much more compact command.
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
rolfmundinger@gmx.de
User
Posts: 9
Joined: Tue Oct 12, 2010 8:39 am

Re: using Command line to print, requiring autorotate

Post by rolfmundinger@gmx.de »

Hello Daniel,

many thanks for clearing this up. My basic error was that I understood "default=yes" just as the selection of the default printer.
Wasn't aware that the setting has a different meaning. Although the help in my version of PDF Exchange Editor (7.0 Build 328.1) is English, it doesn't really state what default=yes means, it's just mentioned as an option. I interpreted it incorrectly.

Without specifying a printername "printer="printer name" means the application automatically selects the default printer anyway.
This was very helpful and has resolved my problem. You can close this problem as solved.

Many thanks four very valuable assistance.

Thanks and have a nice weekend
Rolf
rolfmundinger@gmx.de
User
Posts: 9
Joined: Tue Oct 12, 2010 8:39 am

Re: using Command line to print, requiring autorotate

Post by rolfmundinger@gmx.de »

Hello Daniel,

have just checked for an update of PDF Exchange Editor. Am now on Version 8.0 Build 330.0 and can confirm that the explanation for default=yes is identical to the extract of the manual in your last post, much clearer explained like this.

Again many thanks for your help.
Rolf
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17948
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: using Command line to print, requiring autorotate

Post by Tracker Supp-Stefan »

Glad we could clarify this Rolf!

Cheers,
Stefan
Post Reply