Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

another question on printing background images...

Status
Not open for further replies.

dakota81

Technical User
May 15, 2001
1,691
US
I'm going to start looking into this issue again I have. I've written a web application and on one particular report I have a graphic image that is overlayed with text. This report gets printed out (most commonly to a pdf file) and needs to have the background graphic image on the printout.

I have asked here before for help for advice on alterations I could make to get around the issue. But since I need to use the page-break-before property, that has severly limited any attempts to work with this page.

Are there any plugins for IE that will let me print a background image? Because I really do not like having that option set to true in the setup for each of the computers that use this application.

Again, there is no feasible alternative to how the page is displayed (i.e. I must use a background image).

Thanks
 
This report gets printed out (most commonly to a pdf file)
Could you not generate the report as a pdf file, with the background image placed as you want it? That way you'll have total control.

Alternatively, can you dynamically generate the image to include the text that's overlaid on it - that way you can put it in an <img> tag and make it more likely to be printed (though foreground images, too, can be turned off).

There's no way you can force browsers to print background images, no matter how many times you ask the question. Printing, or not, of images is something the end-user controls.

-- Chris Hunt
 
Another thought would be to place the image in a div, place the text in another div and give the text div a different z-index value using css. This would place the text over the image and, as Chris points out, the image would be in an <img> tag and would print as any other image on a page (except a background, of course).

There's always a better way. The fun is trying to find it!
 
Thanks for the advice - is there a way to overlay text on top of an image? If so, could you elaborate? It's something I have not figured out how to do yet.

And about the <div>'s with z-index, I've tried that before, and I do not know of a way to overlap them without having one or the other being absolutely positioned, and that cannot be done because page-break controls do not affect absolutely positioned elements.

What this actually page is, we've got our invoices that print out to a dot matrix printer, then when we need to e-mail a copy of the invoice, I have a scanned picture of a blank invoice sheet that lays behind the text. That is why the page breaks are so important.

I'll try and search Google for some more information, as I really want to find a solution so I can turn off the option to print background images on these computers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top