1 Reply Latest reply on Jul 6, 2006 3:26 PM by MailManUSA

    CFDOCUMENT: Display images in TD background

    MailManUSA
      I am trying to get cfdocument to create a PDF and have images display in a table cell's background inside of a PDF. I just want to do:

      <td style="background-image:url('myimage.jpg'); height:20px; width:20px; background-repeat:no-repeat;">
      Text goes here on top of image
      </td>

      OR

      <td background="myimage.jpg" height="20" width="20">
      Text goes here on top of image
      </td>

      but it does not display at all. Using the <img> tag the images display no problem but then I can't write text on top of the image.


      I am trying to avoid using the <img> tag because I cannot write text over top of the image; I have to insert dynamic text on top of images in my application (which in essence is a ticket that users can print out at home and use just like any other ordinary ticket. <td background=""> works great when viewing on a web page but you can't print the images unless you specify this functionality in the browser's advanced settings which is what we are trying to avoid altogether. I would love to just throw a javascript alert message to the user instructing them how to enable printing of background images and colors but my supervisor forbids this because there is just too much text and most people won't even read it (I am one of them haha).

      Any ideas or suggestions are greatly appreciated.