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


All forums · Statistics · Search ·

Two Pilots forum / For software developers / HTML2PDF Not auto fitting
Author Message
Gareth Stevens
Member
# Posted: 8 Dec 2010 10:23


I am using HTML2PDF to capture a website and convert to a single A4 page. When I use the following code all of the HTML width is not in the resultant PDF. However when I use the testing utility supplied in the download, the width is correct and all is included. Having read the documentation i believe the "HTML.AutoAdjustContentWidth = True" property should take care of this but unfortunately it does not appear to. Please can you confirm if my code is correct and if there is anything I need to do. Once this works I will be able to purchase the license.

Thanks in advance, Gareth

'Code to setup the PDF creator
Dim PDF As New PDFCreatorPilotLib.PDFDocument4
Dim PDFfilename As String = ""

PDF.SetLicenseData("xxxx", PDFSerialNumber)
PDF.ProducePDFA = False
PDF.Compression = 1 'coFlate

Dim HTML As New HTML2PDFAddOn.HTML2PDF2

HTML.StartHTMLEngine("demo", "demo")
HTML.ConnectToPDFLibrary(PDF)

HTML.AutoAdjustContentWidth = True

' load HTML file into HTML renderer
HTML.LoadHTMLFile("P:ThamesWater.html")

HTML.ConvertAll()

HTML.DisconnectFromPDFLibrary()

PDF.SaveToFile("C:bob.pdf", True)

' finalize PDF generation
HTML = Nothing
PDF = Nothing

max.f
# Posted: 10 Dec 2010 12:02


This question was answered by e-mail. Our support webform: http://www.colorpilot.com/support.html

--
Max Filimonov,
max.f@colorpilot.org

 

 

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

 

Page top