Printing to pdf xchange printer driver using Office interop

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, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
VimalEMC
User
Posts: 6
Joined: Fri Feb 13, 2015 9:24 am

Printing to pdf xchange printer driver using Office interop

Post by VimalEMC »

Hi,
We are trying to implement printing of Office document using Microsoft Office interop to PDF XChange printer driver. We would like to initialize the printer with various options and then initiate the print from Word using Office automation programatically.

I have attached a sample program we are using to achieve this.

Every time I run the program there is no output and the program runs to completion. Can you please let me know if this is achievable with PDF XChange. We had success running the same program with other Printer Drivers like Amyuni so wondering what's going wrong here?

Your assistance is highly appreciated.
Thanks & Regards,
Vimal
Attachments
PrinterImpl.zip
Sample Word interop Print example
(1.54 KiB) Downloaded 167 times
VimalEMC
User
Posts: 6
Joined: Fri Feb 13, 2015 9:24 am

Re: Printing to pdf xchange printer driver using Office inte

Post by VimalEMC »

Uninstalled PDF Pro SDK and installed the PDF Driver API and things started to work.
Thank you
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17910
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Printing to pdf xchange printer driver using Office inte

Post by Tracker Supp-Stefan »

Glad to hear you resolved that VimalEMC!

Regards,
Stefan
VimalEMC
User
Posts: 6
Joined: Fri Feb 13, 2015 9:24 am

Re: Printing to pdf xchange printer driver using Office inte

Post by VimalEMC »

Hi Stefan,
When I am printing word files in a folder using the same C# program, I am seeing multiple PdfSaver5.exe in the task manager and the number of the exe instances are growing with each printed file. How do I unload them gracefully instead of trying to kill them? A lot of memory is consumed by these binaries.
Thanks & Regards,
Vimal
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17910
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Printing to pdf xchange printer driver using Office inte

Post by Tracker Supp-Stefan »

Hello Vimal,

Are you releasing the printer object after the OnFileSaved event?
Or have you tried to RemoveOrphanPrinters ?

Regards,
Stefan
VimalEMC
User
Posts: 6
Joined: Fri Feb 13, 2015 9:24 am

Re: Printing to pdf xchange printer driver using Office inte

Post by VimalEMC »

Hi,
Currently we are under evaluation mode & using PDF XChange printer 2012 V 5.5. I am seeing duplicate printers created and removed with every print job. I read from other forums that you primarily enforce this for developer tools.

Is there a way for us to install a few printers and use them without dynamic creation of printers with every job.

So my question is say we install 3 printers to 3 ports:
Simple PDF-XChange 2012 A // Handles Word docs
Simple PDF-XChange 2012 B // Handles Excel docs
Simple PDF-XChange 2012 C // Handles Powerpoint docs

Using the below code:
PXCComLib5.CPXCControlEx prnFactory = new PXCComLib5.CPXCControlEx();
PDFPrinter = (PXCComLib5.CPXCPrinter)prnFactory.get_Printer("", "Simple PDF-XChange 2012 A", "<REG CODE>", "<DEV CODE>");

Can I get the installed instance of the printer instead of a dynamic printer? What type of licensing allows this. Can you give us an assurance that this is possible.

Thanks,
Vimal
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Printing to pdf xchange printer driver using Office inte

Post by Ivan - Tracker Software »

It works just fine with your code, but with one little change:

Code: Select all

				application.ActivePrinter = PDFPrinter.Name;
instead of

Code: Select all

				application.ActivePrinter = "PDF-XChange Printer 2012";
Can I get the installed instance of the printer instead of a dynamic printer? What type of licensing allows this. Can you give us an assurance that this is possible.
No, currently it is not possible. When printer object is created, new printer with unique name based on passed required name is created. When printer object is destroyed and corresponding printer is not in use, it will be removed from the system.
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