Scripted Import of PDF-XChange 5 Printer-Driver Profile

This Forum is for the use of End Users requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers only - Please do not post requests for older versions of PDF-XChange or the PDF-Tools/OFFice2PDF applications here

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
gunnarh
User
Posts: 21
Joined: Sat Aug 31, 2013 4:41 pm
Location: Vienna, Austria (Europe)
Contact:

Scripted Import of PDF-XChange 5 Printer-Driver Profile

Post by gunnarh »

I found a post which described how to do a scripted import of PDF-XChange 4 Printer-Driver Profiles:
https://forum.pdf-xchange.com/ ... 825#p56825

I already figured out, how to do this with PDF-XChange 5.

BUT: What I didn't find out is how to set the Default-Profile.

After Installing PDF-XChange 5 there is a Default-Profile "Current".

When importing a Profile using

Code: Select all

rundll32 drvui5.dll,DUI30_Command /InstallProfile:%FullPathToProfileFile% /PrinterName:%PrinterName% /ForUser
the already existing Default-Profile "Current" keeps selected. Using "/AsDefault" doesnt work (seems to select the %PrinterName% as DefaultPrinter and seems not to select the Profile). A looked up the Stings in drvui5.dll and found a String named "SetDefProfile:" but couldn't get it working.

We would like to to the following (scripted/automated):
1. Import a new Profile named "XYZ-Export"
2. Set this Profile as Default-Profile
3. Do some Printjobs with this prepared Profile
4. set back the Default-Profile to "Current"
5. Optionally: Delete the "XYZ-Export" Profile (which probably could be done by simply deleting the HCKU-Registry-Keys)

I'm still searching a Solution for Steps 2 and 4.
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3550
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Scripted Import of PDF-XChange 5 Printer-Driver Profile

Post by Ivan - Tracker Software »

Do you use the latest build of the driver?
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
gunnarh
User
Posts: 21
Joined: Sat Aug 31, 2013 4:41 pm
Location: Vienna, Austria (Europe)
Contact:

Re: Scripted Import of PDF-XChange 5 Printer-Driver Profile

Post by gunnarh »

We use 5.0 Build 273.2 - seems to be the latest Release you provide.
gunnarh
User
Posts: 21
Joined: Sat Aug 31, 2013 4:41 pm
Location: Vienna, Austria (Europe)
Contact:

Re: Scripted Import of PDF-XChange 5 Printer-Driver Profile

Post by gunnarh »

Hm - no Ideas? Still searching for a Solution.
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3550
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Scripted Import of PDF-XChange 5 Printer-Driver Profile

Post by Ivan - Tracker Software »

Can you please send us your profile you are trying to set as default ?
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
gunnarh
User
Posts: 21
Joined: Sat Aug 31, 2013 4:41 pm
Location: Vienna, Austria (Europe)
Contact:

Re: Scripted Import of PDF-XChange 5 Printer-Driver Profile

Post by gunnarh »

I can, but it is nothing specific because I didn't start to configure the Profile. Just exported a basic Test-Profile to check if it is possible to do a scripted import, which works. But it doesn't work to activate the imported Profile by Script.
Attachments
testprofile.zip
(2.47 KiB) Downloaded 129 times
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3550
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Scripted Import of PDF-XChange 5 Printer-Driver Profile

Post by Ivan - Tracker Software »

The problem is because that profile has standard name 'Current' (I mean not file name, but the profile name that has been exported into this file), and you see that the 'Current' keeps selected.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
gunnarh
User
Posts: 21
Joined: Sat Aug 31, 2013 4:41 pm
Location: Vienna, Austria (Europe)
Contact:

Re: Scripted Import of PDF-XChange 5 Printer-Driver Profile

Post by gunnarh »

Thank you Ivan for the hint. Its a little bit confusing how to use the GUI! Before exporting the profile, the profile you want to export has to be marked by pressing the button "use"! Just klicking on the "testprofile" and push the "export" button exports the "Current" profile and not the selected "testprofile".

ok, i'm now able to import the testprofile-file and mark it at as the currently used Profile by doing this:

Code: Select all

cd C:\Program Files\Tracker Software\PDF-XChange 5
set FullPathToProfileFile=c:\temp\testprofile.pp5
set PrinterName=PDF-XChange Printer 2012
rundll32 drvui5.dll,DUI30_Command "/InstallProfile:%FullPathToProfileFile%" "/PrinterName:%PrinterName%" /ForUser /AsDefault
Optional Argument "/AsDefault" marks it as currently used profile - OK, great!

After importing the profile I will do some printjobs using this "Testprofile".

But the final question is now: How can I set back the used profile to the previous selected "current" profile after finishing my printjobs?
Attachments
testprofile.zip
(2.54 KiB) Downloaded 134 times
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3550
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Scripted Import of PDF-XChange 5 Printer-Driver Profile

Post by Ivan - Tracker Software »

I'm afraid for now there is no way to set an existing profile as default.
This feature was designed to install new profiles (for installation or administrative purposes), but not for 'scripting' driver's settings.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
Post Reply