Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. print issue

print issue

Scheduled Pinned Locked Moved JavaScript
javascriptwpfhelpannouncement
4 Posts 2 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    salmonraju
    wrote on last edited by
    #1

    Hi I have an application that will display text context(Ex: Questions and Answers). My application has an option to display "Black text on white Background" or "White text on Black Background". We are also providing Print function to print text. I am facing an issue here , when I am printing when the mode is "White text on Black Background" i am still seeing printed content as "Black text on white Background" on some machines (very few) with same IE version. Can we restrict styles when we are printing using Javascript. I am using below javascript for printing. document.frames['My_frame'].focus(); document.frames['My_frame'].print(); Thanks, Salmon.

    R 1 Reply Last reply
    0
    • S salmonraju

      Hi I have an application that will display text context(Ex: Questions and Answers). My application has an option to display "Black text on white Background" or "White text on Black Background". We are also providing Print function to print text. I am facing an issue here , when I am printing when the mode is "White text on Black Background" i am still seeing printed content as "Black text on white Background" on some machines (very few) with same IE version. Can we restrict styles when we are printing using Javascript. I am using below javascript for printing. document.frames['My_frame'].focus(); document.frames['My_frame'].print(); Thanks, Salmon.

      R Offline
      R Offline
      R Giskard Reventlov
      wrote on last edited by
      #2

      You need to specify a style sheet just for printing as:

      In the style sheet (print) are styles that are only used to print and that will replace any other styles.

      "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me

      S 1 Reply Last reply
      0
      • R R Giskard Reventlov

        You need to specify a style sheet just for printing as:

        In the style sheet (print) are styles that are only used to print and that will replace any other styles.

        "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me

        S Offline
        S Offline
        salmonraju
        wrote on last edited by
        #3

        HI thanks for your reply, Currently I am using one style sheet that doesnot have any media attribute. Do i need to add one more style sheet with same CSS class names with media attribute as Print. Please suggest

        R 1 Reply Last reply
        0
        • S salmonraju

          HI thanks for your reply, Currently I am using one style sheet that doesnot have any media attribute. Do i need to add one more style sheet with same CSS class names with media attribute as Print. Please suggest

          R Offline
          R Offline
          R Giskard Reventlov
          wrote on last edited by
          #4

          Yes, as per my example you have one style sheet for the 'screen' and one for 'print' (There are other options as well but not pertinent here). The one for print can contain styles that, for instance, render buttons and other clutter hidden and display other elements that you wouldn't normally want to see on the screen. You'll need to experiment to get what you want but that, essentially, is how it is done.

          "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups