Printing pdf document to a specific Printer

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

ewoelk
User
Posts: 8
Joined: Thu Nov 06, 2008 9:31 pm

Printing pdf document to a specific Printer

Post by ewoelk »

How do I print a pdf file using PDF-XChange giving specific printer name at runtime in silent mode?

I do not want to print using any print dialog box.

Any help would be greatly appreciated.
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2449
Joined: Thu Jun 30, 2005 4:11 pm

Re: Printing pdf document to a specific Printer

Post by Vasyl - PDF-XChange »

You can use (C++ with ATL):
// Setup printer
CComBSTR bsName(L"Print.PrinterName");
CComBSTR bsVal(L"PDF-XChange 4.0");
CComVariant vDataIn(bsVal.m_str);
m_spView->SetProperty(bsName, vDataIn, 0);
...
// Run printing in silent mode...
m_spView->PrintDocument(nDocID, PXCVA_NoUI);

For details about this and other features please see our ActiveX Help.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.