background image in html2pdf

5,152 views
Skip to first unread message

Hrishi

unread,
Nov 3, 2011, 9:58:47 AM11/3/11
to PDFTron PDFNet SDK
What is the way to use a background image for a div in string based
HTML2PDF conversion?
i am currently trying
<div style='float:left;background:url('http://www.pdftron.com/assets/
images/backgrounds/greyBoxHeader_bg_top.gif') repeat scroll 0 0 "></
div>

but it is not working

Ryan - PDFNet Developer

unread,
Nov 4, 2011, 9:00:37 PM11/4/11
to PDFTron PDFNet SDK
Assuming you're working on windows, this is actually due to gif images
not being converted on windows. If you change to another image type it
should work, see below.

<div style="float:left;color:#00FF00;background:url('http://
www.pdftron.com/assets/images/carousel/header_mob1.png') repeat scroll
0 0 ">
<p>And he was clad in coat and hood of green. A sheaf of peacock
arrows bright and keen</p>
</div>

We aim to have HTML2PDF gif conversion working on windows in time for
the next regular release of PDFNet.

Support

unread,
Nov 10, 2011, 3:12:03 PM11/10/11
to pdfne...@googlegroups.com
 
FYI, this issue was fixed and HTML to PDF conversion now also works with GIF
http://www.pdftron.com/pdfnet/samplecode.html#Html2Pdf

To start using simply replace your old html2pdf.dll with the new one from www.pdftron.com/downloads/HTML2PDF.zip
Reply all
Reply to author
Forward
0 new messages