PDF-XCHANGE PRO Command Line invocation

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
vasudev
User
Posts: 1
Joined: Thu Dec 05, 2013 1:36 pm

PDF-XCHANGE PRO Command Line invocation

Post by vasudev »

Hi All,

Basically i am looking to automate the document conversion from text to pdf files.

I have tried doing the same with PDF-XCHANGE 3 pro software GUI and it is working fine. Now, i would like to automate this task by invoking pdf-xchange 3 software through command line arguments or windows batch script.

Please help regarding how to automate conversion of text to pdf files.

Thanks in Advance.

Vasudev V
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17941
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PDF-XCHANGE PRO Command Line invocation

Post by Tracker Supp-Stefan »

Hello Vasudev V,

Welcome to our forums. I assume you are using our printing drivers for the conversion from other file formats to PDF?
Then as long as you set our virtual printer as the system default and your application is capable of printing through the command line - you should be able to achieve your goal. However controlling printing parameters through the command line (e.g. save location, file name, image compression) is not intended to be controllable in this way, and the default values will be used all the time (the default file name could be a macro). If you need to control printing parameters silently you would need to use our Drivers API SDK:
https://www.pdf-xchange.com/product ... rivers-api

Regards,
Stefan
spudman
User
Posts: 19
Joined: Wed Dec 22, 2010 8:55 pm

Re: PDF-XCHANGE PRO Command Line invocation

Post by spudman »

I am in a somewhat similar situation in that I want to be able to control some of the parameters of the printing by way of the command line. I see the /usep command line command and have set and saved the settings I want and bring them in with /usep, but it does not print it just opens the user interface.

I am a little confused about multiple command line commands. The doc says: "Where command can be one of the following commands:"

If I say /print then it prints but not with the settings I want and if I say /print /usep ".dat file" or /usep ".dat file" it opens the user interface and just sits there.

Is it true that only one command is allowed? If so how to get the /usep to cause printing?

Thanks, Bob Roos
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17941
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PDF-XCHANGE PRO Command Line invocation

Post by Tracker Supp-Stefan »

Hi Bob,

Please check my reply here:
https://forum.pdf-xchange.com/ ... 35&t=20351

Cheers,
Stefan
spudman
User
Posts: 19
Joined: Wed Dec 22, 2010 8:55 pm

Re: PDF-XCHANGE PRO Command Line invocation

Post by spudman »

Thanks for the reply. I had not thought about multiple printers.

I still have the question about why have /usep to load in parameters and then not be able to print using those parameters.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17941
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PDF-XCHANGE PRO Command Line invocation

Post by Tracker Supp-Stefan »

Hi Bob,

You need to set the \usep in a separate line and after that initiate printing with those new settings.
Then make sure to revert the settings back to what they were.

Regards,
Stefan
spudman
User
Posts: 19
Joined: Wed Dec 22, 2010 8:55 pm

Re: PDF-XCHANGE PRO Command Line invocation

Post by spudman »

When you say separate line are you saying call the program twice? I am calling the viewer from an application.

I had the impression that /usep was temporary and would go away after the program closed. I thought /import and /export were the more permanent options.

Thanks, Bob Roos
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17941
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PDF-XCHANGE PRO Command Line invocation

Post by Tracker Supp-Stefan »

Hi Bob,

Apologies! Blame the festive season but I am a bit distracted today! :)
Indeed - usep is temporary, and I was thinking of /importp and /exportp

There's a note for /usep:
Note: If there are no settings (or they are incorrect, or they cannot be found under the given name), viewer will be opened with the default ones. While shutting down, viewer will try to save the current settings to the given direction. If the settings could not be saved, an error message will be shown.
So getting the Viewer to launch means that you are not using that correctly. Please try to have /usep before the print command and make sure to have the correct path properly closed in quotation marks "".

Regards,
Stefan
spudman
User
Posts: 19
Joined: Wed Dec 22, 2010 8:55 pm

Re: PDF-XCHANGE PRO Command Line invocation

Post by spudman »

Well that clears some things up. The docs don't say anything about the sequence of the instructions. I had /print before /usep.

As near as I can tell the duplex setting is not exported or imported. I set it and export it in Edit, Export and then close and reopen the viewer and import the settings and duplex is not set.

I was trying to get two 1 page documents to print on one page duplexed, but that appears to be impossible even manually. It may be possible with the SDK, but that is more trouble than I want to go to right now.

Thanks for the help, bob Roos
Post Reply