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

Re: How to get page size for PRINTER device?



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