Screen Size - Resolution - Mystery Print Preview

Discussion in 'Javascript' started by SJ, Jul 26, 2007.

  1. SJ

    SJ Guest

    Hi All,

    I am trying to write a preview page that will show a red box around
    the portion of the screen that would print on a normal 8.5x11 paper.

    The problem is setting the width of the div based on the different
    resolutions. Does anyone know a formal that will provide the number
    of pixels per inch based on the resolution.

    Something like:

    Div width = resoultion_ration * num_of_inches.

    Any ideason how to do this or ant example web pages?

    Thanks in advance for your help!

    -SJ
     
    SJ, Jul 26, 2007
    #1
    1. Advertising

  2. SJ

    David Mark Guest

    On Jul 26, 4:39 pm, SJ <> wrote:
    > Hi All,
    >
    > I am trying to write a preview page that will show a red box around
    > the portion of the screen that would print on a normal 8.5x11 paper.
    >
    > The problem is setting the width of the div based on the different
    > resolutions. Does anyone know a formal that will provide the number
    > of pixels per inch based on the resolution.
    >
    > Something like:
    >
    > Div width = resoultion_ration * num_of_inches.
    >
    > Any ideason how to do this or ant example web pages?
    >

    Leave print preview to the browsers. Trying to simulate it in JS is
    impossible.
     
    David Mark, Jul 26, 2007
    #2
    1. Advertising

  3. SJ

    SJ Guest

    On Jul 26, 4:50 pm, David Mark <> wrote:
    > On Jul 26, 4:39 pm, SJ <> wrote:> Hi All,
    >
    > > I am trying to write a preview page that will show a red box around
    > > the portion of the screen that would print on a normal 8.5x11 paper.

    >
    > > The problem is setting the width of the div based on the different
    > > resolutions. Does anyone know a formal that will provide the number
    > > of pixels per inch based on the resolution.

    >
    > > Something like:

    >
    > > Div width = resoultion_ration * num_of_inches.

    >
    > > Any ideason how to do this or ant example web pages?

    >
    > Leave print preview to the browsers. Trying to simulate it in JS is
    > impossible.


    thanks for the responses!
     
    SJ, Jul 27, 2007
    #3
    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. UJ
    Replies:
    3
    Views:
    3,418
    Damien
    Aug 22, 2005
  2. Pat
    Replies:
    5
    Views:
    542
  3. Replies:
    2
    Views:
    477
  4. Replies:
    0
    Views:
    1,000
  5. Matt
    Replies:
    1
    Views:
    279
    Randy Webb
    Nov 20, 2004
Loading...

Share This Page