Printing Pdf's under IIS 6

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
Posts: 1
Joined: Wed Apr 20, 2016 9:30 pm

Printing Pdf's under IIS 6

Post by ddevening » Wed Apr 20, 2016 10:39 pm

I am evaluating PDF-XChange Drivers API (started with V4) for a project that I am working on. I am printing PDF files in IIS 6/Windows 2003. I am able to get it working in Windows 2012 R2 (a test environment), but I need it to work in IIS 6 in Windows 2003(x86). I know Windows 2003 is at end of life, I will be moving my app to WIN 2012 R2 soon, I hope.

I have tried all the permission trick that I found on your forum.
- added NETWORK SERVICE permission to install Folder
- added NETWORK SERVICE permission to registry entry
- added NETWORK SERVICE permission to DCOM -> Security -> Launch & Access Permisions (CPXCControlEx Class)
- added NETWORK SERVICE permission to Printer/Printer queue

I am able to get the printer object instantiated, but it never seems to raise the printing events. I can see a job queue up in the print queue window. I know my code is working because I have it working on Windows 2012 R2, but not in Windows 2003. There is one last permission trick that I am missing for Windows 2003.

Here is my code to initialize the printer.

Code: Select all

 string printerName = "PDF-XChange 4.0";

 if (_pdfPrinter == null)
	_prnFactory = new CPXCControlEx();	
	_pdfPrinter = (CPXCPrinter)_prnFactory.get_Printer("", printerName, REG_CODE, DEV_CODE);
	_printerName = _pdfPrinter.Name;


 _pdfPrinter.OnDocSpooled += new _IPXCPrinterEvents_OnDocSpooledEventHandler(PDFPrinter_OnDocSpooled);
 _pdfPrinter.OnEndDoc += new _IPXCPrinterEvents_OnEndDocEventHandler(PDFPrinter_OnEndDoc);
 _pdfPrinter.OnStartDoc += new _IPXCPrinterEvents_OnStartDocEventHandler(PDFPrinter_OnStartDoc);
 _pdfPrinter.OnFileSaved += new _IPXCPrinterEvents_OnFileSavedEventHandler(PDFPrinter_OnFileSaved);
 _pdfPrinter.OnError += new _IPXCPrinterEvents_OnErrorEventHandler(PDFPrinter_OnError);
 //_pdfPrinter.OnStartPage += new _IPXCPrinterEvents_OnStartPageEventHandler(PDFPrinter_OnStartPage);
 //_pdfPrinter.OnEndPage += new _IPXCPrinterEvents_OnEndPageEventHandler(PDFPrinter_OnEndPage);

 _pdfPrinter.Option["Save.Path"] = savepath;// @"C:\windows\temp";
 _pdfPrinter.Option["Save.File"] = jobFilename;
 _pdfPrinter.Option["Save.SaveType"] = (int)SaveType.Save;
 _pdfPrinter.Option["Save.ShowSaveDialog"] = false;
 _pdfPrinter.Option["Save.WhenExists"] = (int)WhenExists.Overwrite;
 _pdfPrinter.Option["Save.RunApp"] = false; 

I can also see a lot of print activity in the "OutputDebugString" Viewer, and also files are created in the "C:\Windows\Temp" folder, but it never creates the PDF file.

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

Re: Printing Pdf's under IIS 6

Post by John - Tracker Supp » Thu Apr 21, 2016 6:50 am


Not to be harsh or unsympathetic - but with demands on developer resources always at peak levels I am afraid we cannot divert valuable developer resources to problems that relate to older and all but redundant versions of Windows no longer supported - I regret we cannot help you on this occasion.
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

Post Reply