Print PDF file, Printer Dialog

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
M Johnson
Posts: 3
Joined: Fri Aug 03 2007

Print PDF file, Printer Dialog

Post by M Johnson »

I am using the 3.00 ver of the pdf converter with the .net wrapper : CDIntfNet300.dll.

I can print the pdf file to a physical printer but need to have the printer, it prints directly to the printer with no dialog. Would like the printer dialog to show so users can change printers if they wish. Can someone help?

this is the code i am using.


public override void SaveToJpeg()
{
// get default printer values;
PrintDocument objPrintDocDefault = new PrintDocument();
string strDefaultPrinter = objPrintDocDefault.PrinterSettings.PrinterName;

CDIntf.PDFDocumentControl pdfDocNet2 = new CDIntf.PDFDocumentControl();
pdfDocNet2.SetLicenseKey(Declarations.LicensedTo, Declarations.ActivationCode);

// file to open for printing
pdfDocNet2.Open(@"c:\Final.pdf", "");

// Print the pdf
pdfDocNet2.Print(strDefaultPrinter, 1, 2, 1);
}

Thank you in advance.
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

The Developer version of the PDF Converter can be used programatically, If you wish to let your users select the printer from a printers dialog box you need to make sure you are activating the PDF Printer after it is selectec.

To get the printers' dialog box you need to call Windows API PrinterDlg()

Hope this helps.

Joan
Post Reply