...

View Full Version : How can i display a HTML doc as an image



NiteOwl
09-02-2006, 08:53 PM
I need to print an html document, from a web site as a brochure.

http://nowwebdesigns.com/brochure/brochure2.html

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.

mlseim
09-02-2006, 09:23 PM
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:

http://www.rustyparts.com/pdf.php

http://www.google.com/search?hl=en&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=convert+web+page+to+pdf+on+the+fly&spell=1

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

EDIT:
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>.

EDIT AGAIN:
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.




.

NiteOwl
09-02-2006, 11:19 PM
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.

:thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum