[Poppler-bugs] [Bug 63963] New: pdftops - some fonts are encoded incorrectly in level2 postscript
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Apr 26 07:37:34 PDT 2013
https://bugs.freedesktop.org/show_bug.cgi?id=63963
Priority: medium
Bug ID: 63963
Assignee: poppler-bugs at lists.freedesktop.org
Summary: pdftops - some fonts are encoded incorrectly in level2
postscript
Severity: normal
Classification: Unclassified
OS: All
Reporter: korobkin+lpad at gmail.com
Hardware: Other
Status: NEW
Version: unspecified
Component: general
Product: poppler
Created attachment 78523
--> https://bugs.freedesktop.org/attachment.cgi?id=78523&action=edit
test.pdf - original pdf file
Hi team,
This sample PDF file, when converted to PS level2 by pdftops 0.22.3, cannot be
processed by a printer or by GhostScript interpreter because it chokes on
embedded fonts and quits with rangecheck error in xyshow function.
The offending part of PS code is this:
/F9_0 13.3333 Tf
(\012\355)
[13.3333
0] Tj
Nice folks at GhostScript explained to me that after defining the type42 font
/DejaVuSans_00, the ps code then does this:
16 dict begin
/FontName /DejaVuSans def
/FontType 0 def
/FontMatrix [1 0 0 1 0 0] def
/FMapType 2 def
/Encoding [
0
] def
/FDepVector [
/DejaVuSans_00 findfont
] def
FontName currentdict end definefont pop
As you can see, the font has a single dependent font, and it has map
type 2. Map type 2 means the () string passed to show has a font number
and a character number. So the string (\012\355) means sub-font 10
character 247, hence the rangecheck error.
In the PDF, all of the falls to F0 (Arial) are of the form:
/F0 13.3333 Tf
1 0 0 -1 10 18 Tm
<0035> Tj
but the calls to F1 (DejaVu Sans) look like:
/F1 13.3333 Tf
1 0 0 -1 139 18 Tm
<0AED> Tj
So pdftops is copying the <0AED> literally to (\012\355), but not
embedding enough subfonts. The other fonts coincidentally all use
glyphs in <0000>--<00FF> and miss the bug.
I'm attaching both PDF and PS files for your consideration.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20130426/2fb90efe/attachment.html>
More information about the Poppler-bugs
mailing list