Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support

All forums · Statistics · Search ·

Two Pilots forum / Converters / Problem with LoadFromString and LoadFromFile
Author Message
# Posted: 17 Oct 2005 12:11

I have a problem with the following Visual Basic code, the instruction LoadFromString or LoadFromFile don?t work fine, and it?s create a PDF file but it is empty.

What?s wrong in this code??

' create pdf library object
Set PDF = CreateObject("PDFCreatorPilot2.piPDFDocument")
' initialize PDF Engine
PDF.StartEngine "demo@demo", "demo"
' set AutoLaunch flag to TRUE to automatically open the generated pdf generation
PDF.AutoLaunch = True
PDF.FileName = "HelloHTML2PDF_VBS.pdf"
' start document generation

Set HTML = CreateObject("HTML2PDFAddon.HTML2PDF")
' initialize HTML engine
HTML.StartHTMLEngine "", ""
' connect to PDF Creator Pilot instance
HTML.ConnectToPDFLibrary PDF
' load HTML file into HTML renderer
HTML.LoadFromString "<HTML><BODY><H1>Hello,PDF2HTML!</H1></BODY></HTML>", ""
' HTML.LoadFromFile "C:\HH.html"
' convert whole HTML document into PDF
' disconnect from PDF Creator Pilot instance
Set HTML = Nothing
' finalize PDF generation

# Posted: 17 Oct 2005 13:22


Please specify version of the PDF library and HTML2PDFAdd-on, since we have two versions of the HTML2PDFAdd-on on the website at the moment.

Thank you very much !

Best regards,
Two Pilots



Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.012


Page top