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 #22696 is a reply to message #22691] Tue, 05 December 2000 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Phillip David (phillip_david@xontech.com) writes:

> I do seem to recall a discussion a few months ago about printers in
> which someone indicated that they were unable to position something in a
> printer-independent way. If they specified the upper-left corner, they
> got the upper-left corner inside the printable area on the page, and
> couldn't position a plot in the center of the page. I may have the
> details incorrect, but the gist of the message certainly implied that
> the printer object only returns the printable area of the page rather
> than the actual page size.

That's right, 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

You can find PSWINDOW on my web page:

http://www.dfanning.com/programs/pswindow.pro

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[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 21:14:45 PDT 2025

Total time taken to generate the page: 1.11922 seconds