bullzip, print image file into pdf

cwhmy
Member Posts: 24
Hi guys whoever using bullzip,
If my SourcePathAndFilename is a word file (.doc / .docx), it goes well done.
If it is a image file (.jpg), it says:

Does anybody have idea how can image file be handled? TQ
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);
If my SourcePathAndFilename is a word file (.doc / .docx), it goes well done.
If it is a image file (.jpg), it says:

Does anybody have idea how can image file be handled? TQ
0
Answers
-
What is the Image format?
When you Double Click the image, wich application is started?
You could embed the Image in a HTML document. The Try to print that.best regards
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/0 -
Thx archer89.
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)0 -
it can be that bullzip needs an appropriate application for a specific file format for a successful rendering/converting to pdf.
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.best regards
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/0 -
Hi archer89, well, again, html, you were referring to html saved page, right?
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.-1 -
don't think such a statement is helpful. Why don't you explain it again in baby steps?0
-
Anybody any close to solid clue/idea? TQ0
-
up0
-
up0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions