Article View: gnu.ghostscript.bug
Article #476Re: Laserjet output missing left edge in gs252
From: g.cameron
Date: Fri, 06 Nov 1992 18:55
Date: Fri, 06 Nov 1992 18:55
94 lines
3860 bytes
3860 bytes
Douglas Lockhart (dlockhar@sfu.ca) writes:
> When I print the file 'tiger.ps' with gs2.5.2, the ends of the whiskers
> on the tiger are cut off at the edge of the shaded area. Previously,
> with gs2.5 the ends of the tiger's whiskers were not cut off and the
> shaded area extended approximately 1/4 inch to the left of the longest
> whisker.
>
> Although I have little experience with the PCL datastream, I have
> determined the problem to be associated with the module 'gdevdjet.c'.
> When I compile gs2.5.2 with the file gdevdjet.c taken from gs2.5, I get
> the tiger exactly as it was in gs2.5 with the whiskers intact. Needless
> to say, I do not want to revert to the gs2.5 version because it has
> other problems.
>
> I tried changing line 114 from "\033*p0x0Y\033*b0M"
> to "\033*p150x0Y\033*b0M" but this only shifted both the shaded area and
> the tiger 1/2 inch to the right but the tiger's whiskers were still cut
> off as before. Any help would be appreciated since this problem affects
> all the ghostscript output to the laserjet. Output to the screen is OK.
>
> My environment is a Sun 3/60 running Sunos 4.1.1 and the printer is an
> IBM LaserPrinter E operating in Laserjet II emulation mode.
>
It sounds like a margins problem to me. Here's an empirical approach to testing
what the margins should actually be.
(a)
Print this file. (I'm afraid it was designed for millimetres and A4 paper, but
it should be easy to change to inches if required).
%!PS-Adobe-1.0
%%Creator: George
%%Title: Test grid for coordinate alignment
%%CreationDate: Fri Jul 17 14:25:37 BST 1992
%%Pages: 1
%%BoundingBox: 0 0 595 842
%%EndComments
%%EndProlog
%%Page: 1 1
72 254 div dup scale
0.86 setgray clippath fill
0 setgray
0 50 2100 {0 moveto 0 2970 rlineto stroke} for
0 50 2970 {0 exch moveto 2100 0 rlineto stroke} for
1 setgray
newpath 160 260 moveto 1780 0 rlineto 0 2480 rlineto -1780 0 rlineto fill
0 setgray
/Helvetica findfont 100 scalefont setfont
newpath
400 2600 moveto (Page Alignment Test Pattern) show
showpage
%%Trailer
(b)
Measure the blank margins on the paper - the top gap is the top margin and the
left gap is the left margin (!)
(c)
Edit the source to set the margins as measured.
(d)
Print again, and measure the distances to the (eg. 1cm) horizontal and vertical lines. You can then edit the source again and set the initial offset to correct
for any discrepancies in the measured position from the 1cm lines, ie. use
\033*p<hdiff>x<vdiff>Y
where <hdiff> and <vdiff> are calculated as:
(1.0 - dist-to-1cm-line-in-cm) * 300 / 2.54
both rounded to the nearest integer.
(NB - these distances need to be measured from the bottom and left, as this is
the postscript origin. Thus the vertical offset is -1 times the above
calculation)
This _ought_ to give you correct margins and positioning (if I've written it
down correctly), and if I'm right about this being the problem, maybe you'll
get your whiskers back!
George
---------------------------------------------------------------------------
George Cameron g.cameron@biomed.abdn.ac.uk
Dept. BioMedical Physics
Aberdeen University
Foresterhill Fax: +44 (0)224-685645
Aberdeen AB9 2ZD Telephone: +44 (0)224-681818 ext 53195
Technical Details
Message-ID:
<2423.9211061855@athaena.biomed.abdn.ac.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!bio-medical-physics.aberdeen.ac.UK!georgeShow Full Headers
Complete Article Headers
Newsgroups: gnu.ghostscript.bug Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!bio-medical-physics.aberdeen.ac.UK!george From: george@bio-medical-physics.aberdeen.ac.UK (g.cameron) Subject: Re: Laserjet output missing left edge in gs252 Message-ID: <2423.9211061855@athaena.biomed.abdn.ac.uk> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Fri, 6 Nov 1992 18:55:22 GMT Approved: bug-ghostscript@prep.ai.mit.edu Lines: 97