Printing .htm files always displays the print dialog?
Posted: Thu Mar 22, 2012 12:07 pm
Hello,
I'm having difficulty preventing the print dialog being diaplayed when trying to convert .htm files into Pdfs
I can print images, textfiles and various other filetypes without the print dialog being displayed but I cannot get html pages to print without
requiring user interaction to click the ok button.
When I print html files, the print dialog is opened and the Bull Printer is selected so it only needs the user to click ok but I really need this work without
any dialogs being displayed. Are there some special settings required to get them to print without it displaying the dialog?
Here are the settings in using for the COM Object. It's written in Delphi. (note: the below is not the complete code)
BullPDF := CreateOLEObject(UTIL_PROGID);
settings := CreateOLEObject(SETTINGS_PROGID);
settings.printername := BullPDF.defaultprintername;
lPrinterName := settings.printername;
settings.SetValue('Output', aOutputFilename);
settings.SetValue('ConfirmOverwrite', 'no');
settings.SetValue('ShowSaveAS', 'never');
settings.SetValue('ShowSettings', 'never');
settings.SetValue('ShowProgress', 'no');
settings.SetValue('ShowProgressFinished', 'no');
settings.SetValue('ShowPDF', 'no');
settings.SetValue('RememberLastFileName', 'no');
settings.SetValue('RememberLastFolderName', 'no');
settings.SetValue('StatusFile', statusfilename);
settings.SetValue('StatusFileEncoding', 'unicode');
BullPDF.PrintFile(InputFilename, lPrinterName);
I'm having difficulty preventing the print dialog being diaplayed when trying to convert .htm files into Pdfs
I can print images, textfiles and various other filetypes without the print dialog being displayed but I cannot get html pages to print without
requiring user interaction to click the ok button.
When I print html files, the print dialog is opened and the Bull Printer is selected so it only needs the user to click ok but I really need this work without
any dialogs being displayed. Are there some special settings required to get them to print without it displaying the dialog?
Here are the settings in using for the COM Object. It's written in Delphi. (note: the below is not the complete code)
BullPDF := CreateOLEObject(UTIL_PROGID);
settings := CreateOLEObject(SETTINGS_PROGID);
settings.printername := BullPDF.defaultprintername;
lPrinterName := settings.printername;
settings.SetValue('Output', aOutputFilename);
settings.SetValue('ConfirmOverwrite', 'no');
settings.SetValue('ShowSaveAS', 'never');
settings.SetValue('ShowSettings', 'never');
settings.SetValue('ShowProgress', 'no');
settings.SetValue('ShowProgressFinished', 'no');
settings.SetValue('ShowPDF', 'no');
settings.SetValue('RememberLastFileName', 'no');
settings.SetValue('RememberLastFolderName', 'no');
settings.SetValue('StatusFile', statusfilename);
settings.SetValue('StatusFileEncoding', 'unicode');
BullPDF.PrintFile(InputFilename, lPrinterName);