Thread View: comp.lang.postscript
1 messages
1 total messages
Started by Jim CURRY
Sun, 24 Jan 1993 11:15
Bug in LJ-4M PS-processor
Author: Jim CURRY
Date: Sun, 24 Jan 1993 11:15
Date: Sun, 24 Jan 1993 11:15
55 lines
3304 bytes
3304 bytes
I believe that there is an "arithmetic" bug in my LJ-4M's PS-processor.
The bug turned up in the output of a complex LaTeX-dvips document:
the PS file prints correctly on an LJ-3 with HP-PS-cartridge,
but on the LJ-4M, one character in a particular math formula prints
in the wrong place -- it is shifted to the left by about 4cm.
I've isolated the bug, and reduced it to this simple self-contained code:
=========================================================================
72 300 div 72 300 div neg scale 300 -3000 translate % set dvips coords
412 1000 moveto /xxx1 currentpoint pop 100 string cvs def
14 0 rmoveto /xxx2 currentpoint pop 100 string cvs def
2 0 rmoveto /xxx3 currentpoint pop 100 string cvs def
/Courier findfont [ 50 0 0 -50 0 0 ] makefont setfont 300 1200 moveto
xxx1 show ( ) show xxx2 show ( ) show xxx3 show ( ) show showpage
=========================================================================
That is, set units to 1/300 inch, with y-origin at top of page;
then just do an absolute move followed by two relative x-moves,
recording the current x after each move. (In the original code,
the first "rmoveto" was actually a "show" of a char of width 14.)
Print the three remembered x-values. (The y-values don't matter.)
On my LJ-4M, the values are 412.0, 426.0, and then 940.0 (not 428.0)!
I say that this exhibits an "arithmetic" bug because the incorrect result
depends sensitively on the x-values used and on the two rmoveto's.
Specifically, the final x-position becomes correct if I do any of:
(a) replace "412" with "413" or "412.0001" or some random value,
or (b) replace "2" with "1" or "3" or "2.0001" or some random value,
or (c) replace the double "rmoveto" with a single "16 0 rmoveto",
or (d) replace the "2 0 rmoveto" with "1 0 rmoveto 1 0 rmoveto".
Manufacturers' service departments in Austria are not always as competent
as we'd like them to be. So before I talk to HP, I'd like to know
whether the bug exists on all LJ-4M's, or only in the version of the
PS-processor installed on mine, or (conceivably) just on my printer.
So I'd appreciate it if a few people with LJ-4M's could run the above code
and let me know whether the last number is right (428.0) or wrong (940.0),
together with the firmware revision data (from the "SELF TEST" page).
Mine are: Formatter Number: S4601104CJ2 Firmware Datecode: 19920603
Installed Personalities: PCL (19920511) POSTSCRIPT (19920610)
E-mail is probably best for responses; I'll post a report on the results.
Thanks in advance -- Jim
Jim Curry || E-mail: curry@iiasa.ac.at
International Institute for || Telephone: +43-2236-71521-204
Applied Systems Analysis || Telefax: +43-2236-71313
A-2361 Laxenburg // Austria || Telex: 079137 iiasa a
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads