Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2006
    Thanked 0 Times in 0 Posts

    How can i display a HTML doc as an image

    I need to print an html document, from a web site as a brochure.


    When i print the page with a javascript print link, it prints but i loose Table background image.

    I will be generating the HTML via a cgi script.
    The $title, $desc and always be different.

    The entire Background is 1 image.

    I have seen sites the want to sell you a form, and they generate it as a image.

    Is there another way to do this, or, is a PHP script what i need?

    Thanks for looking.

  • #2
    Master Coder
    Join Date
    Jun 2003
    Cottage Grove, Minnesota
    Thanked 1,096 Times in 1,087 Posts
    What's happening is that the default for most browsers is to NOT
    print background images. It's a browser setting that each person
    can change themselves and your site would print out just fine.

    The problem is, many people don't want that turned on, as they are
    interested in the content, not the background of a web page.

    So, you might want to look into a method to convert your HTML to a PDF
    file "on-the-fly". I've never tried this, but I found a couple of things that
    might work:



    At least ... these might give you some more ideas.

    I tried your URL in the demo and the background didn't show either.
    It's possible that you might have to use CSS instead of <tables>.

    This remote service rendered your page perfectly, but it's a service,
    and it's expensive: http://html2pdf.seven49.net/

    But it can be done. Make sure you check with your webhost to see
    if by some odd chance, they have some built-in services you can use.

    Last edited by mlseim; 09-02-2006 at 10:48 PM.

  • #3
    New Coder
    Join Date
    Aug 2006
    Thanked 0 Times in 0 Posts
    Thank you for everything, mlseim.

    I tried as well and "html to pdf" did not work.

    Unless, i find an simple script to do it i will just redesign the page without the backgrounds.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts