Mantis - Squeak
Viewing Issue Advanced Details
850 Morphic minor always 01-29-05 01:03 07-28-05 08:51
closed 3.8  
none 3.9  
0000850: [BUG][FIX] PostScript output is invalid
PostScript interpreters (Mac OS X 10.3 built-in interpreter and PStill) report problems when trying to convert a morph exported as a PostScript file. This error only occurs with 3.8 and 3.9, no problem with 3.7.

It seems that the coordinates are wrangled during export:

%%BoundingBox: $1$8 $1$8 $5$7$6 $7$5$6

The correct line should be:

%%BoundingBox: 18 18 576 756
Modifying the 'ByteEncoder>>writeNumber:base:' instance method to encode numbers as strings and not as bytes solves this issue:

ByteEncoder>>writeNumber:aNumber base:aBase
    ^aNumber printOn:self base:aBase.

 FixPostscriptByteEncoding.1.cs [^] (240 bytes) 01-29-05 01:03
 IntegerByteEncodeFix-850-v1-laza.1.cs [^] (3,654 bytes) 01-30-05 15:40

01-30-05 15:38   
Hi Hitoro!

One of my changesets, which was accepted for the update stream (6217), is the source of the problem. I included some tests with it to make sure I don't brake anything important, but the tests used a Stream on String instead of ByteEncoder. I upload a fix for this and some adapted tests.
The Postscript output seems to be ok now, but I haven't tested this with an external postscript viewer.

01-31-05 01:20   
Thanks Alex. I filed in your change set in a clean 3.8g image and it works.
07-28-05 08:50   
in 3.9a