temporary PDF-XChange 4.0 printer problem

PDF-XChange Drivers API (only) V4/V5
This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - VERSION 4 & 5 - Please use the PDF-Tools SDK Forum for Library DLL assistance.

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

Post Reply
oceanpark
User
Posts: 3
Joined: Wed Sep 21, 2011 6:30 pm

temporary PDF-XChange 4.0 printer problem

Post by oceanpark » Wed Sep 21, 2011 6:39 pm

PXC::IPXCControlExPtr m_pFactory = PXC::IPXCControlExPtr(__uuidof(PXC::CPXCControlEx));

if(m_pFactory == NULL)
return FALSE;

CString printer_name = "PDF-XChange 4.0";

PXC::IPXCPrinterPtr m_pPrinter = m_pFactory->Printer[L"", (LPCTSTR)printer_name, L"<reg code>", L"<dev code>"];


if we use above code in our application at start-up and use it to export out data to pdf document, temporary printer object will be created as "pdf-xchange 4.0(1)" and used instead of "pdf-xchange 4.0" that is already installed.

the problem is, when a user changes some printer properties of "pdf-xchange 4.0" (ex: turn off graphics compression) that change will not affect our pdf export program because in our system this temporary "pdf-xchange 4.0(1)" gets created/used.

is there any way to grab existing pdf-xchange printer instead of creating new one every time?

Ivan - Tracker Software
Site Admin
Posts: 3630
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: temporary PDF-XChange 4.0 printer problem

Post by Ivan - Tracker Software » Fri Sep 23, 2011 11:47 am

No, there is no way to grab the existing printer.
However the solution is simple - name your printer not as "PDF-XChange 4.0". but, say, "My cool printer" ;)
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.

oceanpark
User
Posts: 3
Joined: Wed Sep 21, 2011 6:30 pm

Re: temporary PDF-XChange 4.0 printer problem

Post by oceanpark » Fri Sep 23, 2011 5:20 pm

The issue we're having is not about "PDF-Xchange 4.0(1)' being created.

When we were using PDF-XChange 3.0 we didn't have this problem of duplicate printer being added every time a user does pdf export (and removed afterwards). so a user could easily change printer properties of pdf-xchange from control panel to change quality of pdf document being created.

After we've upgraded pdf-xchange to version 4.0, now pdf export is done by using this temporary printer driver, and unless we programatically modify printer preferences of pdf-xchange, users don't have a way to change pdf preferences.

John - Tracker Supp
Site Admin
Posts: 8205
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Re: temporary PDF-XChange 4.0 printer problem

Post by John - Tracker Supp » Fri Sep 23, 2011 6:16 pm

You will need to set up your app to collect and use preferences you (your user) designate - so you could create a small config or text file that your user maintained and you loaded programmatically by default at the time the printer is instantiated.

The whole point of using an SDK is to give you the ability to control the output as you require rather than you having to use options prescribed by us - also the licensing of the SDK is designed specifically so that your user does not have the ability to output to the driver direct or control via the end user interface - there are also numerous technical benefits of the current method of creating a new printer for each job so the settings can be prescribed much more reliably for specifics for each job - which could not be done if each job went to the same printer in a serial fashion.

For example pages from 1 job could in problematic or time consuming print jobs end up being inserted into another different job - hence the reason for the new asynchronus multi printer option - the cost being you have to preset output options.

But there is nothing to stop you within your app designing a small settings edit/change table that you inherit by default if required that your user can maintain through your own designed interface.
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
Tracker Support
http://www.tracker-software.com

oceanpark
User
Posts: 3
Joined: Wed Sep 21, 2011 6:30 pm

Re: temporary PDF-XChange 4.0 printer problem

Post by oceanpark » Tue Sep 27, 2011 9:05 pm

thanks.
just to be clear, there is no way for this new temp instance of pdf-xchange(1) to be initiated with the preference settings copied from the original pdf-xchange 4.0, and we need to read from some other config file that a user can modify, set preferences for the new instance of pdf-xchange programatically at the start of our app is this correct?

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

Re: temporary PDF-XChange 4.0 printer problem

Post by Tracker Supp-Stefan » Wed Sep 28, 2011 9:41 am

Hello oceanpark,

The stand alone driver should be storing it's settings in a profile, and the settings for the currently active one could be found here:
HKEY_CURRENT_USER\Software\Tracker Software\PDF-XChange 4.0\Drivers\PDF-XChange 4.0\Profiles\Current

So you could read data from those registry entries - and update the instance you create accordingly. Please note though that only settings that differ from the defaults would be added to the registry - so the list of things you will find in the profile is not static.

Best,
Stefan

Post Reply