[gs-bugs] [Bug 691272] gs produces incorrect pdf file

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Mon May 3 09:10:42 UTC 2010


--- Comment #6 from Ken Sharp <ken.sharp at artifex.com> 2010-05-03 09:10:41 UTC ---
(In reply to comment #5)

> the pdf file given by Hin-Tak Leung shows that it complains when reading the
> token <0021> (which if I understand correctly is the first token after
> beginbfrange, that is, srcCodeLo), 

There are two entries with the value <0021>, srcCodeLo and srcCodeHi are both
equal to <0021> in the file I looked at:

1 beginbfrange

> and the reason it complains is not because
> srcCodeLo is equal to srcCodeHi, but because 0021 is 4 digits long.  At this
> point pdffonts is expecting only 2 digits (apparently because this is supposed
> to be an 8-bit number).

I would say that would be incorrect. The spec says its a hexadecimal number, so
the number of digits is irrelevant, leading zeros should be ignored. In
PostScript CMaps they most certainly are.

The spec doesn't say anything about limiting the values, and since there is no
limit on the potential size of a source code, this wouldn't make sense.

Notice the declared codespace range:

1 begincodespacerange

the code space range defines the valid input values, as you can see these range
from 0 to ffff.

However it seems Acrobat suffers the same madness, and doesn't like leading
zeros in the beginbfrange hex strings (large values are not a problem though,
as expected).

>  Is this a problem with pdffonts or is the pdf file
> incorrect ?  For what it's worth, pdfedit also produces the same error message.

I don't personally see a problem with the definition in the CMap. However it
seems that Acrobat doesn't like it either (it doesn't copy the glyph properly),
so I'm prepared to accept it as a limitation at least.

Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the gs-bugs mailing list