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

Home » Public Forums » archive » Re: Strange PRINTER Coordinates
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Strange PRINTER Coordinates [message #20883] Mon, 31 July 2000 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
William Thompson (thompson@orpheus.nascom.nasa.gov) writes:

> Does this mean that a PostScript file created with object graphics will print
> differently on different printers? That would be very bad.

I don't think so (although I'm sure someone is going to
test it for us). Object graphics usually does things
correctly. But they do appear to have access to information
they are not sharing with the rest of us.

And, anyway, object graphics are positioned in the printer
window in a completely different way than direct graphics are
positioned in the PRINTER device.

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
Re: Strange PRINTER Coordinates [message #20885 is a reply to message #20883] Mon, 31 July 2000 00:00 Go to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
Craig Markwardt <craigmnet@cow.physics.wisc.edu> writes:


> I believe that the PRINTER device must keep track of the printable
> region on the page. It's different for different printers. If you
> look under $IDL_DIR/resource/xprinter/ppds, you can locate lines like
> this in each ppd file:

> *ImageableArea Letter: "18 8 593 784 "
> *ImageableArea Legal: "65 42 547 966 "

> What is unfortunate is that the IDL coordinate system is referenced to
> corner of the printable region rather than the corner of the physical
> page, like most sane page description languages would do.

> Craig


Does this mean that a PostScript file created with object graphics will print
differently on different printers? That would be very bad.

William Thompson
Re: Strange PRINTER Coordinates [message #20886 is a reply to message #20883] Mon, 31 July 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Craig Markwardt (craigmnet@cow.physics.wisc.edu) writes:

> I believe that the PRINTER device must keep track of the printable
> region on the page. It's different for different printers. If you
> look under $IDL_DIR/resource/xprinter/ppds, you can locate lines like
> this in each ppd file:
>
> *ImageableArea Letter: "18 8 593 784 "
> *ImageableArea Legal: "65 42 547 966 "
>
> What is unfortunate is that the IDL coordinate system is referenced to
> corner of the printable region rather than the corner of the physical
> page, like most sane page description languages would do.

I'm sure you are right. But what a disaster. Now we
are going to have to write our own printer description
files (and how will we know what printer we are using!!!!)
to get correctly positioned output.

I've got a headache. I'm taking the rest of the
afternoon off.

This is the problem with writing a book (or perhaps
it is just a problem with testing your code). You
are going to spend five minutes writing up a little
section and before you know it you are involved in
a &*%$@ quagmire. I'm sure this is why there aren't
more IDL books out there. :-(

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
Re: Strange PRINTER Coordinates [message #20887 is a reply to message #20883] Mon, 31 July 2000 00:00 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
I believe that the PRINTER device must keep track of the printable
region on the page. It's different for different printers. If you
look under $IDL_DIR/resource/xprinter/ppds, you can locate lines like
this in each ppd file:

*ImageableArea Letter: "18 8 593 784 "
*ImageableArea Legal: "65 42 547 966 "

What is unfortunate is that the IDL coordinate system is referenced to
corner of the printable region rather than the corner of the physical
page, like most sane page description languages would do.

Craig


Ben Tupper <btupper@bigelow.org> writes:

> David Fanning wrote:
>
>>
>> Does this seem to happen on your printers, too?
>
> Yes.
>
>>
>>
>> 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?
>>
>
> Not centered with code as written.
>
> Not centered with XOffSet = XOffSet - 0.25 , but closer to being
> centered. I must remove 0.5 inches to get correct centering.
>
> Printer: HP DeskJet 1600CM
>
> IDL> help, !Version,/Str
> ** Structure !VERSION, 5 tags, length=40:
> ARCH STRING 'PowerMac'
> OS STRING 'MacOS'
> OS_FAMILY STRING 'MacOS'
> RELEASE STRING '5.3'
> BUILD_DATE STRING 'Nov 10 1999'
>
> I have seen this before; I had always assumed that typical paper
> margins were honored in the background. of course there are many things
> that I have assumed...
>
> Ben
>
> --
> Ben Tupper
> Bigelow Laboratory for Ocean Science
> West Boothbay Harbor, Maine
> btupper@bigelow.org
> note: email address new as of 25JULY2000
>
>

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: Strange PRINTER Coordinates [message #20899 is a reply to message #20883] Mon, 31 July 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Pavel Romashkin (promashkin@cmdl.noaa.gov) writes:

> Not on my LaserJet HP 5MP. Even then, the frame from the sample code is
> off by 0.2". Sorry. I could try other departmental printers but I am
> afraid this will introduce more noise in the 0.25 +- 0.25" existing so far.
>
>> 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?
>
> Not exactly, as I said above. Forget vertical positionong, that one's
> off by 1".

Oh, oh. I was afraid this was going to be the case. :-(
I'm afraid this one is going somewhere in the Top 10.

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
Re: Strange PRINTER Coordinates [message #20904 is a reply to message #20883] Mon, 31 July 2000 00:00 Go to previous message
promashkin is currently offline  promashkin
Messages: 169
Registered: December 1999
Senior Member
David Fanning wrote:
* * *
> 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 me feel bad. I can see David is making his output to fall
presicely where it needs to be. I am happy when I can see at least a
fraction of what I need somewhere in the corner of the printout. It
indicates to me that I have a hope of getting it all into a
comprehensible file for future positioning using Adobe or Canvas :-(

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

I have always had a strange feeling about it. IDL is not as gentle to
printers, as, lets say, Word, which will always propose "printable
margins" (which have little to do with printer capabilities, because it
puts them in even for my Lexmark inkjet that has none).

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

Not on my LaserJet HP 5MP. Even then, the frame from the sample code is
off by 0.2". Sorry. I could try other departmental printers but I am
afraid this will introduce more noise in the 0.25 +- 0.25" existing so far.

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

Not exactly, as I said above. Forget vertical positionong, that one's
off by 1".

Cheers,
Pavel
Re: Strange PRINTER Coordinates [message #20906 is a reply to message #20883] Mon, 31 July 2000 00:00 Go to previous message
Ben Tupper is currently offline  Ben Tupper
Messages: 186
Registered: August 1999
Senior Member
David Fanning wrote:

>
> Does this seem to happen on your printers, too?

Yes.

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

Not centered with code as written.

Not centered with XOffSet = XOffSet - 0.25 , but closer to being
centered. I must remove 0.5 inches to get correct centering.

Printer: HP DeskJet 1600CM

IDL> help, !Version,/Str
** Structure !VERSION, 5 tags, length=40:
ARCH STRING 'PowerMac'
OS STRING 'MacOS'
OS_FAMILY STRING 'MacOS'
RELEASE STRING '5.3'
BUILD_DATE STRING 'Nov 10 1999'

I have seen this before; I had always assumed that typical paper
margins were honored in the background. of course there are many things
that I have assumed...

Ben

--
Ben Tupper
Bigelow Laboratory for Ocean Science
West Boothbay Harbor, Maine
btupper@bigelow.org
note: email address new as of 25JULY2000
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: calling a function in herself
Next Topic: Re: beginners guide to widgets?

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

Current Time: Wed Oct 08 11:36:41 PDT 2025

Total time taken to generate the page: 0.00685 seconds