[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get page size for PRINTER device?



Phillip David (phillip_david@xontech.com) writes:

> 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.

The problem is not *sizing* the printout. The problem
is *locating* the printout in the middle of the page.
The only tools you really have to do that are the offsets,
but the offsets are calculated from the *printable*
edge of the paper, not from the real edge of the paper
(as they are, for example, in PostScript output).

Of course, it is possible to know what size your paper
is, get the "page size" from the printer, subtract the
reported page size from the known page size, and then
calculate the fudge factors automatically. This is probably
what I should do. I choose the FUDGE keyword mostly
to call attention to the problem. :-)

I'll leave it as an exercise for the reader (or Liam,
more likely) to write it as it *ought* to be written.

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