I am trying to convert html (with an image) in a file to a PDF.
ProtoType is
function HTMLToPDF(URL as string, PDF as string)
In this case, URL is something like "file://c:\htmlToPrint.html" and PDF is "c:\pdfOutput.pdf"
I have created a VB6 component with an IE object embedded. I am implementing this by loading Internet Explorer (using IE.Navigate), waiting for ready state to be "Complete" and then using the IE.ExecWB command with the OLECMDID_PRINT value. This prints to the default printer.
What I am observing (the problem) is that sometimes the image in the html file is not being printed. This seems to occur in a generated PDF OR a network printer.
Any comments/questions/suggestions welcome.
Thanks for looking.
Converting HTML To A PDF using IE
Hello,
You mentioned that sometimes the image is not displayed in the PDF output. Do you mean that using the same html file sometimes you get the picture in the pdf file and sometimes you don't?
Did you try to use our free utility HTML2PDF.exe to convert the documents to HTML? http://www.amyuni.com/en/support/downloads.html
In general, conversion from HTML to PDF should work properly and no images should be missing.
You mentioned that sometimes the image is not displayed in the PDF output. Do you mean that using the same html file sometimes you get the picture in the pdf file and sometimes you don't?
Did you try to use our free utility HTML2PDF.exe to convert the documents to HTML? http://www.amyuni.com/en/support/downloads.html
In general, conversion from HTML to PDF should work properly and no images should be missing.