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


All forums · Statistics · Search ·

Two Pilots forum / For software developers / Base URL
Author Message
Thomas
Member
# Posted: 12 Jan 2006 19:04


I am testing HTML2PDF v3.2 and I have some trouble understanding how to work out the baseurl parameter

html.LoadHTMLString Page.Value, BaseUrl

html.ConvertAll

My file is at this url : http://myserver/myfolder/doc.html

My first image is at this url : http://myserver/myfolder/files/image1.gif
<img src=files/image1.gif>
My second image is at this url : http://myserver/imagefolder/image2.gif
<img src=/imagefolder/image2.gif>

if i record the html file on an other PC and modify it in order to add <base href="http://myserver/myfolder/">, it works fine (all images are displayed in my browser

But I can't make it work with html2PDF with baseurl=http://myserver/myfolder/

Any suggestion ?

Thanks

Stanislav
# Posted: 12 Jan 2006 19:49


Dear Thomas,

Try to not use BaseUrl at all ( "" - empty). I think it can helps.

Thank you very much !

Best regards,
Stanislav
Two Pilots

Anonymous
# Posted: 16 Jan 2006 18:59


I juste did the test again with html2pdf Test (the test application) on msn, and google.com

and there are no image visible in the PDF

Stanislav
# Posted: 17 Jan 2006 11:41


Dear Thomas,

Please check Internet Explorer settings - "show images" must be turned on.

BaseUrl only affects PDF URL links generation, it is not used to modify HTML source to change path for images. To correclty convert any HTML to PDF, you should open it in IE, and it must be rendered OK. If IE cannot render it properly, Add-On also cannot convert it. If you leave Base URL field empty in test utility dialog, you'll get correct PDF.

Thank you very much !

Best regards,
Stanislav
Two Pilots

adima_76
Member
# Posted: 27 Jun 2006 20:29


I try to use HTML2PDF v3.2 and I fill the fileld BaseURL in the method LoadHTMLString with the value: "D:\MyFolder\MySubFolder\", but it doesn't work correctly because doesn't print the image. This is the HTML code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<img src="bse.jpg" width="697" height="218">
</body>
</html>

Where is that I wrong?
Thanks and regards

Alessandro Di Martino

Stanislav
Member
# Posted: 28 Jun 2006 14:35


Dear Alessandro,

BaseURL does not affect images loading process. It's only used to cahnge URL links in generated PDF. To load all images, you need to write HTML which will be loaded by IE correctly, with all images.

Thank you very much !

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

 

 

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

 

Page top