Search code examples
htmlcsspdfabcpdf

Add background-image to <td> in PDF (ABCpdf)


I'm dynamically creating a PDF using ABCpdf (HTML -> PDF)

I'm trying to create a Table Of Contents (with leaders), and I think the easiest way to get the leaders is using a repeat-x background-image. Here is my file structure:

/Web
   GenReport.aspx
   /images
      tocback.gif
/Data
   template.html

GenReport uses an html template, and replaces all applicable sections when generating the pdf. The styles also live in template.html.

Everything is working, except that the image isn't being found (If I use a direct path to another image on the web, I can get the image to appear in the background of the table.)

So, my question is, how do I reference the tocback.gif? Does it need to reference the path from the template (/Data/template.html - see (1) below) or from the page that generates the pdf (/Web/GenReport.aspx (2) below)?

(1) background-image: url(/images/tocback.gif);
(2) background-image: url(../Web/images/tocback.gif);

Obviously, neither of these are working for me. Am I missing something?

(I wouldn't even mind adding a hard-coded reference to an image on the FS, if that is an option.)


Solution

  • I found the answer in the manual

    http://www.websupergoo.com/support.htm (6.17)