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

Strange PRINTER Coordinates

Hi Folks,

I've discovered a strange little thing in the process of trying
to center a graphics display on a page of paper using the 
PRINTER device. I was having a devil of a time trying to
get the graphic centered, although the offsets and sizes 
were calculated in exactly the same way they are calculated
to center the graphic on a PostScript printer with the PS

In fooling around with it for awhile (I won't tell you
how long I fooled around with it for fear of losing whatever
programming reputation I have), I discovered that the
(0,0) point for calculating page offsets was a quarter
of an inch in from the edge of the paper!

This makes sense, sort of, since a laser printer
(I have a Lexmark Optra S 1250 PostScript Laser printer)
can't print on the outside quarter inch of the page
anyway, but it is not documentable anywhere that I
could find. 

The solution I finally ended up with is to subtract
0.25 inches from whatever offset I think I want when
I use the PRINTER device. This gives me perfectly 
centered output.

This explains a lot of problems I have been having
with PRINTER output, but have been too lazy to look
into. Does this seem to happen on your printers, too?

Here is a test case for an 8.5 x 11 inch sheet of 

   thisDevice = !D.Name
   Set_Plot, 'PRINTER'
   Device, /Portrait
   Device, XSize=6, YSize=6, XOffset=1.25, YOffset=2.5, /Inches
   PlotS, [0,1,1,0,0], [0,0,1,1,0], /Normal
   Device, /Close_Document
   Set_Plot, thisDevice

Is this box centered on your printer? What printer? 
What version of IDL? If it is not centered, does 
subtracting 0.25 from each offset help?

I also notice that I have to set the PORTRAIT or LANDSCAPE
keyword on a separate command line. If I try to set these
keywords on the same line where I am setting the sizes
and offsets, I get bogus results. Anyone else experiencing

Thanks for your help.


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