Massive printing file size when using background-image

Discussion in 'HTML' started by Antonis Mitsopoulos, Jun 30, 2004.

  1. 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
     
    Antonis Mitsopoulos, Jun 30, 2004
    #1
    1. Advertising

  2. Antonis Mitsopoulos

    Neal Guest

    On Wed, 30 Jun 2004 19:12:23 +0300, Antonis Mitsopoulos
    <> wrote:

    > 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.
     
    Neal, Jun 30, 2004
    #2
    1. Advertising

  3. Antonis Mitsopoulos wrote:

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

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Jun 30, 2004
    #3
  4. Antonis Mitsopoulos

    C A Upsdell Guest

    "Antonis Mitsopoulos" <> wrote in message
    news:cbuopp$2sr$...
    > 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.
     
    C A Upsdell, Jun 30, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Lasher
    Replies:
    26
    Views:
    759
    Bengt Richter
    Jan 16, 2005
  2. Nick Craig-Wood
    Replies:
    1
    Views:
    278
  3. jc
    Replies:
    3
    Views:
    1,736
  4. jc
    Replies:
    1
    Views:
    1,373
    Neredbojias
    Mar 19, 2008
  5. Dj Frenzy
    Replies:
    3
    Views:
    314
    Robert
    Feb 10, 2004
Loading...

Share This Page