I want to print direct to printer without the dialog but I get vastly different times when I call PrintFit vs PrindDialogFit to print the PDF.
PrintFit = 40 seconds
PrintDialogFit - 7 seconds
My code sample is C# Wndows Form, Visual Studio 2013, GdPicture v10.0.0.14 , a very simple exe that takes the pdf filename from the command line call.
How do I make the direct print work as fast?
Any assistance would greatly be appreciated.
Code: Select all
String[] arguments = Environment.GetCommandLineArgs();
GdPicturePDF oGdPicturePDF = new GdPicturePDF();
oGdPicturePDF.LoadFromFile(arguments[1], false);
oGdPicturePDF.PrintSetShowPrintingProgress(false);
oGdPicturePDF.PrintSetAutoRotation(true);
oGdPicturePDF.PrintSetFromToPage(1, oGdPicturePDF.GetPageCount());
oGdPicturePDF.PrintFit(); // This takes 40 seconds.
//oGdPicturePDF.PrintDialogFit(); // This takes 7 seconds after saying Ok to the dialog.
oGdPicturePDF.CloseDocument();