comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to get page size for PRINTER device?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to get page size for PRINTER device? [message #22693 is a reply to message #22691] Tue, 05 December 2000 00:00 Go to previous messageGo to previous message
Phillip David is currently offline  Phillip David
Messages: 36
Registered: April 1999
Member
David Fanning wrote:
>

> ... it is impossible to center output on the
> printer in a device-independent way.
>
> For example, I like to have graphic output with the same
> aspect ratio as the window on the display, but as large
> as possible, and centered on the page. I use my PSWINDOW
> program to calculate the proper size and offset values
> to position the "window" on the page. But to get the
> graphic exactly in the center of the page, I have to
> use a printer-specific "fudge factor" to account for
> the unprintable area on the page. On my printer, the
> fudge factor is 0.25 inches in both X and Y. So my
> code looks like this:
>
> position = PSWindow(Fudge=0.25, /Printer)
> thisDevice = !D.Name
> Set_Plot, 'PRINTER'
> Device, _Extra=position
> Plot, data, .....
> Device, /Close_Document
> Set_Plot, thisDevice

David;

Now that you know how to get the exact page size (as returned by the
printer), can't you just use that to size your printout? You also know
how to position it to center it by putting the center of your plot at
the center of the page, whose size you now know.

Phillip
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: n-point FFT
Next Topic: Re: IDLWAVE 4.6

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 12:44:36 PDT 2025

Total time taken to generate the page: 0.95964 seconds