lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lout-3.28.user.ps conversion issue update


From: K. H. Man
Subject: lout-3.28.user.ps conversion issue update
Date: Wed, 09 Apr 2003 12:11:57 +0800
User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2.1) Gecko/20021130

Hi everyone,

An update on the lout-3.28.user.ps conversion issue (lout-3.28.user.ps dies while being converted to PDF using Ghostview 4.3 and Ghostscript 7.04 on Win32.) Note: I am not sure if the latest AFPL version (version 8.00 is the latest) solves this problem, may need some digging (I'm getting the Ghostscript distro now...)

I've traced the problem to how Ghostscript 7.04 renders the PS code in PDF for patterned glyphs.

I used a box with the words "Hello World" in it:
striped @Texture angle {45d} @Box paint { nochange }
red @Colour { Hello world }

With an angle 0 degrees, here is part of the PDF output:
11 0 obj
<</Subtype/Image
/ImageMask true
/Width 20
/Height 20
/BitsPerComponent 1
/Decode[1
0]
/Filter/CCITTFaxDecode
/DecodeParms<</K -1
/Columns 20>>/Length 12>>stream
%***unprintable 8-bit byte stream***
endstream
endobj
13 0 obj

The PDF writer converts the pattern into a compressed bitmap tile, I suspect. I am still reading the PDF specs, so I am guessing a bit here. This works and can be viewed in Acrobat Reader.

However, with an angle of 45 degrees, the PDF writer tries to render the glyph piece-by-piece, part of the code as follows:
q 10 0 0 10 0 0 cm
/R10 cs 0 0 0/R12 scn 190.8 606.5 2.9 1.4 re f Q
q 10 0 0 10 0 0 cm
/R10 cs 0 0 0/R12 scn 190.8 606.5 1.5 2.9 re f Q
q 10 0 0 10 0 0 cm
/R10 cs 0 0 0/R12 scn 190.8 607.9 0.1 2.9 re f Q
q 10 0 0 10 0 0 cm
/R10 cs 0 0 0/R12 scn 193.6 606.5 2.9 1.4 re f Q
q 10 0 0 10 0 0 cm
/R10 cs 0 0 0/R12 scn 192.2 606.5 2.9 2.9 re f Q
q 10 0 0 10 0 0 cm
/R10 cs 0 0 0/R12 scn 190.8 607.9 2.9 2.9 re f Q
q 10 0 0 10 0 0 cm
/R10 cs 0 0 0/R12 scn 190.8 609.3 1.5 2.9 re f Q

There's thousands of lines of this stuff, 624K worth of uncompressed PDF code. I don't know if it is trying to render the words pixel-by-pixel or piece-by-piece ('re' is rectangle.) The rectangle sizes are rather small, though (2.9 x 2.9 or less!)

I suppose this means Ghostscript 7.04 cannot convert such patterns properly. I have not tried converting the other textures in the user's manual, page 161. I'll check Ghostscript 8.00 now...

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia... fiddling with Open Source,
bits and pieces at http://www.geocities.com/keinhong/
-----------------------------------------------------
"It's GNU/Linux dammit!" - RMS
RMS turns 50 on March 16 2003, Happy birthday RMS!!!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]