SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Guru
    Join Date
    Sep 2003
    Location
    Northern California
    Posts
    605
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Circumventing printer control of background colors and images

    What techniques are there, other than printer Page Setup options, to ensure HTML styled with background colors and background images are printed as displayed on the screen?

    AFAIK the printer dialog box has Page Setup options for this but they must be selected.

    If there is any other advice for ensuring an accurate web page print-out, pls advise.
    Interactive Web Media - Trinity River
    Embrace the mobile lifestyle - SmartFreelancer.com

  2. #2
    Resident curmudgeon bronze trophy gary.turner's Avatar
    Join Date
    Jan 2009
    Location
    Dallas
    Posts
    990
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Whether background images or colors are printed is strictly a user controlled decision.

    cheers,

    gary
    Anyone can build a usable website. It takes a graphic
    designer to make it slow, confusing, and painful to use.

    Simple minded html & css demos and tutorials

  3. #3
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    ...as it should be. Printing a full-colour page can be pretty expensive, and you'll seriously enrage people if you force them to do it.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  4. #4
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Why would you want to override it anyway? In terms of accessibility the reader will be able to read the contents of the printed page easier if there was no background noise. It would be a seriously bad accessibility practice to force people with vision disorders to try and read from a page which had unnecessary stylistic junk bleeding into the text. Not to mention the cost and ecological impact of all that ink being wasted. Thank goodness you aren't going to be able to force an override of the printing defaults. If the info on the page is that important, it should be visible in the foreground, not loaded in the background (especially as images can be disabled)

  5. #5
    SitePoint Guru
    Join Date
    Sep 2003
    Location
    Northern California
    Posts
    605
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this isn't a typical website. it's a web-based user interface designed for a small group of people who will want to print the pages containing tables and graphs for use in reports. we'll add a reminder to check their page setup printing options. i didn't know what forum was best for this post, probably CSS.
    Interactive Web Media - Trinity River
    Embrace the mobile lifestyle - SmartFreelancer.com

  6. #6
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    If the colours and images are important to understanding the contents, then you shouldn't use CSS and background images.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  7. #7
    SitePoint Guru
    Join Date
    Sep 2003
    Location
    Northern California
    Posts
    605
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, that's a good point that I considered. However, the only element that this issue applies to is a table that varies in width depending on the data sets it contains. We can't allow cell wrapping so the table must expand.
    Interactive Web Media - Trinity River
    Embrace the mobile lifestyle - SmartFreelancer.com

  8. #8
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,875
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by mgm_03 View Post
    the only element that this issue applies to is a table that varies in width depending on the data sets it contains.
    If you use a border on the table cells for the print version then that should provide what you need for when backgrounds don't print. Besides which the table will have a fixed width when printed anyway as the paper it is printing on is fixed width.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  9. #9
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,893
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    It's a problem I've come up against a few times - my websites all make extensive use of print.css, but occasionally I have wanted to print what people see on the screen. The solution I found was to use PrintScreen and and paste it into a word processor.

    If the use of background colours is essential and can't be replaced by having foreground contents in a different colour or borders, the three solutions I would come up with are to (i) use Opera (it allows you to print background colours if you want), (ii) save those sections as images rather than HTML, (iii) output in a different format, eg PDF.

  10. #10
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Stevie D, all the web browsers (that I am aware of) allow for printing background colors, though it's probably beyond the point, this thread is in the accessibility and usability section and based on that I would only recommend keeping to the user default convention rather than hijacking someone's machine to waste ink


Bookmarks

Posting Permissions

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