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. Printing a page from JavaScript

Printing a page from JavaScript

Scheduled Pinned Locked Moved Web Development
javascripttutorial
4 Posts 2 Posters 0 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.
  • H Offline
    H Offline
    happyheartcs
    wrote on last edited by
    #1

    Hi all I need to know whether I can change the printing options from JavaScript. For example when I call Window.Print() , can I give specify that I want it to be printed as landscape or to fit the page to printer margins.. Thanks a lot in advance Happy

    B 1 Reply Last reply
    0
    • H happyheartcs

      Hi all I need to know whether I can change the printing options from JavaScript. For example when I call Window.Print() , can I give specify that I want it to be printed as landscape or to fit the page to printer margins.. Thanks a lot in advance Happy

      B Offline
      B Offline
      Bradml
      wrote on last edited by
      #2

      You can't do it through javascript, but you have a mild level of configurability with CSS. Google printing with CSS.


      Brad Australian I assume Microsoft would not use doors, because using Windows is faster.

      H 1 Reply Last reply
      0
      • B Bradml

        You can't do it through javascript, but you have a mild level of configurability with CSS. Google printing with CSS.


        Brad Australian I assume Microsoft would not use doors, because using Windows is faster.

        H Offline
        H Offline
        happyheartcs
        wrote on last edited by
        #3

        Thanks a lot Brad So how can I set the size & orientation options in the CSS?? Happy

        B 1 Reply Last reply
        0
        • H happyheartcs

          Thanks a lot Brad So how can I set the size & orientation options in the CSS?? Happy

          B Offline
          B Offline
          Bradml
          wrote on last edited by
          #4

          happyheartcs wrote:

          size & orientation

          Do you mean of the text? if so then just use normal css.


          Brad Australian I assume Microsoft would not use doors, because using Windows is faster.

          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