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

Home » Public Forums » archive » Strange PRINTER Coordinates
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Strange PRINTER Coordinates [message #20914] Sun, 30 July 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
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
device.

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
paper:

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
this?

Thanks for your help.

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
Previous Topic: Inconsistency: "sort" on UNIX <-> Windows
Next Topic: Re: Top 10 IDL Requests ... python

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

Current Time: Fri Oct 10 06:12:23 PDT 2025

Total time taken to generate the page: 0.31873 seconds