Massive printing file size when using background-image

  • Thread starter Antonis Mitsopoulos
  • Start date
A

Antonis Mitsopoulos

Hi there, I've got the following problem when trying to print a web page in
Internet Explorer:

I found out that when I'm using a "background-image" property in my Body tag
I get an
extremely big printing file size. If I take this background-image off, my
page appears in my printer's queue
about 60KB but when I'm adding this (which is just 1KB), it gets more than
1MB.
The .gif file I'm using for the background is less than 1KB.

e.g.
<body style="background-image:url(images/backgr.gif);">


Thanks a lot
 
N

Neal

Hi there, I've got the following problem when trying to print a web page
in
Internet Explorer:

I found out that when I'm using a "background-image" property in my Body
tag
I get an
extremely big printing file size. If I take this background-image off, my
page appears in my printer's queue
about 60KB but when I'm adding this (which is just 1KB), it gets more
than
1MB.
The .gif file I'm using for the background is less than 1KB.

e.g.
<body style="background-image:url(images/backgr.gif);">


Thanks a lot

<body style="@media screen{background-image:url(images/backgr.gif)};
@media print {background-image:none}">

Not tested, not sure it would work, but logically it would apply the style
only to screen and not to print.
 
T

Toby A Inkster

Antonis said:
If I take this background-image off, my
page appears in my printer's queue
about 60KB but when I'm adding this (which is just 1KB), it gets more than
1MB.

Your background image is tiled. When it's sent to the printer, it's sent
lots of times because of the tiling.
 
C

C A Upsdell

Antonis Mitsopoulos said:
Hi there, I've got the following problem when trying to print a web page in
Internet Explorer:

I found out that when I'm using a "background-image" property in my Body tag
I get an
extremely big printing file size. If I take this background-image off, my
page appears in my printer's queue
about 60KB but when I'm adding this (which is just 1KB), it gets more than
1MB.
The .gif file I'm using for the background is less than 1KB.

e.g.
<body style="background-image:url(images/backgr.gif);">

You may want to add some CSS to make your site printer-friendly. E.g., in
one of my sites I use:

@media print
{ a, a:link, a:visited, a:active, a:hover { color:#003; }
html,body,a,div,button,h1,h2,h3,h4,h5,h6, i.note,p,td,td ul,li {
font-family:'Times New Roman', Times, serif; }
html, body { margin:0; background-color:#fff; background-image:none;
border:1px solid black; }
ul { list-style-image:none; }
}

Here I make all links the same colour, all text in a serif font, and
unwanted backgrounds removed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top