CREATE(pdfSettings,FALSE,TRUE); CREATE(pdfUtil,FALSE,TRUE); // The status file is used to check for errors and determine when the PDF is ready. statusFileName := BaseFolder + '\status.ini'; // Set file name for output file. pdfFileName := OutputPathAndFilename; // Delete old output file if it already exist. IF EXISTS(pdfFileName) THEN ERASE(pdfFileName); // Multiple PDF printers could be installed. Let the automation know which one to control. pdfSettings.printerName := pdfUtil.DefaultPrinterName; // Set output file name pdfSettings.SetValue('Output', pdfFileName); // Make sure no dialogs are shown during conversion. pdfSettings.SetValue('ShowSaveAs', 'never'); pdfSettings.SetValue('ShowSettings', 'never'); pdfSettings.SetValue('ShowPDF', 'no'); pdfSettings.SetValue('ShowProgress', 'no'); pdfSettings.SetValue('ShowProgressFinished', 'no'); pdfSettings.SetValue('ConfirmOverwrite', 'no'); // Set file name of status file to wait for. pdfSettings.SetValue('StatusFile', statusFileName); // Do not show errors in PDF user interface. pdfSettings.SetValue('SuppressErrors', 'yes'); // Write settings to printer. // This writes a file name runonce.ini. It is a configuration that is used // for the next print job. The printer will delete the runonce.ini after it is read. pdfSettings.WriteSettings(TRUE); IF EXISTS(statusFileName) THEN ERASE(statusFileName); // Print out the physical file via bullzip printer pdfUtil.PrintFile(SourcePathAndFilename,pdfSettings.printerName); IF pdfUtil.WaitForFile(statusFileName, 20000) THEN BEGIN // Check status file for errors. IF pdfUtil.ReadIniString(statusFileName, 'Status', 'Errors', '') <> '0' THEN BEGIN ERROR('Error creating PDF. ' + pdfUtil.ReadIniString(statusFileName, 'Status', 'MessageText', '')); END; END ELSE BEGIN // The timeout elapsed. Something is wrong. ERROR('Error creating ' + pdfFileName) END; CLEAR(pdfSettings); CLEAR(pdfUtil);
Answers
When you Double Click the image, wich application is started?
You could embed the Image in a HTML document. The Try to print that.
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/
A jpg file, when it's double clicked, it's opened in Windows app "Photos".
HTML document? How would you suggest the system coding flow? (the image file is stored in BLOB field of Nav)
html: first check, if bullzip can render/convert html pages. the associated program is your current internet browser.
if that works fine, you can create a simple text/html file in nav, where the image is linked. for that read the image from the blob field, save the image to a temp folder. after creating and saving the html file, print that out.
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/
No, bullzip is having exactly the same error as what I uploaded the error msg picture in above for image processing.
I thought you had some experience with bullzip.