By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,156 Members | 1,069 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,156 IT Pros & Developers. It's quick & easy.

Print HTML to PDF

P: n/a
I am trying to print an existing HTML File to PDF in VB.NET

I have only had success with setting the default printer to Acrobat
Distiller and using this code.

Dim MSHTML As SHDocVw.InternetExplorer
MSHTML = New SHDocVw.InternetExplorer()
MSHTML.Visible = False


MSHTML = Nothing

I do not like this way because it is extremely slow.

I have tried using the System.Drawing.Printing as well.

Dim oPrint As System.Drawing.Printing.PrintDocument
oPrint = New System.Drawing.Printing.PrintDocument()
oPrint.DocumentName = "c:\html.htm"

This way seems to work fine and creates a PDF document, but the PDF
documents are always blank. Does anyone know why this does this? And
does anyone know a good way to do this without having to buy a third
party component?

Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.