Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Screen Size - Resolution - Mystery Print Preview

Reply
Thread Tools

Screen Size - Resolution - Mystery Print Preview

 
 
SJ
Guest
Posts: n/a
 
      07-26-2007
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

 
Reply With Quote
 
 
 
 
David Mark
Guest
Posts: n/a
 
      07-26-2007
On Jul 26, 4:39 pm, SJ <(E-Mail Removed)> 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.

 
Reply With Quote
 
 
 
 
SJ
Guest
Posts: n/a
 
      07-26-2007
On Jul 26, 4:50 pm, David Mark <(E-Mail Removed)> wrote:
> On Jul 26, 4:39 pm, SJ <(E-Mail Removed)> 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!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox 2 print and print preview only shows first page R.Ig Firefox 3 02-14-2007 01:10 AM
Images missing in IE 6 print and print preview seth7f@gmail.com HTML 0 01-16-2007 03:30 PM
internet explorer print preview VERSUS print eunever32@yahoo.co.uk HTML 2 11-22-2006 02:03 PM
mega pixels, file size, image size, and print size - Adobe Evangelists Frank ess Digital Photography 0 11-14-2006 05:08 PM
display print preview dialog, not print dialog Matt Javascript 1 11-20-2004 01:18 AM



Advertisments