Bug 689212 - irregular baselines - gs pdfwrite changes CFF to Type 3
Summary: irregular baselines - gs pdfwrite changes CFF to Type 3
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 8.50
Hardware: All All
: P2 major
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-07 08:40 UTC by Mark DeVries
Modified: 2008-12-19 08:31 UTC (History)
1 user (show)

See Also:
Customer: 1130
Word Size: ---


Attachments
PDF created with gs 8.56 (49.18 KB, application/pdf)
2007-05-07 10:54 UTC, Mark DeVries
Details
the PS file that's input to pdfwrite (303.04 KB, application/postscript)
2007-05-07 10:55 UTC, Mark DeVries
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark DeVries 2007-05-07 08:40:22 UTC
We are creating a PostScript file and using ghostscript 8.50 to
distill it to PDF.  The document uses an Adobe OpenType font,
PostScript (CFF) flavor, non-CID.  Our software extracts the CFF,
wraps it as a FontSet resource as shown in Adobe Technical Note #5176
(CFF spec), and embeds it in the PS file.  We access characters by
CMap.

When ghostscript distills it, it turns the font into a Type 3 font (at least,
that's what Adobe Reader reports), which then looks lousy in Adobe Reader, as
noted in several other places in this forum.  (Specifically, we see irregular
baselines that vary with magnification in the Reader.)  Same results in Foxit
Reader and gsview.

Is this a ghostscript bug?  Our failure to use the right switches?  Is there
anything we can do to change ghostscript's behavior?  I can understand why it
might mess with TrueType-flavored OTF data (which we present as Type 42), but
why should it change the PostScript flavor?

Here are the ghostscript switches we are using to create the PDF:

    -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=xxx.pdf \
    -c .setpdfwrite -f input.ps

By default, this creates PDF version 1.3.  (I broke the command into
two lines for illustration in this forum only.)

When we use Acrobat Distiller, the output is fine.

We have also experimented with another switch: -dNOCACHE.  This produces
better-looking PDF, and "only" makes the PDF file **20 times as
big**!  Think what that would do to your college guide, etc.!

We run our software on Windows, Unix and Linux.

Thanks for any help you can provide.

Mark DeVries
XyEnterprise Inc.
Comment 1 Ray Johnston 2007-05-07 09:46:02 UTC
Ghostscript 8.50 is seriously old.

Please upgrade to Ghostscript 8.56. There have been many improvements in
the pdfwrite (distiller).

If you discover that the problem still exists on 8.56, please attach a
test file or send it to support@artifex.com

Once the report is confirmed with 8.56, I'll bump the priority up to customer
level.
Comment 2 Mark DeVries 2007-05-07 10:54:48 UTC
Created attachment 2936 [details]
PDF created with gs 8.56

This is the PDF created using 8.56, as suggested.  I will also send the PS file
from whence it sprang.
Comment 3 Mark DeVries 2007-05-07 10:55:47 UTC
Created attachment 2937 [details]
the PS file that's input to pdfwrite
Comment 4 leonardo 2007-08-27 00:04:31 UTC
Assigning to Ken since he works on this bug.
Comment 5 Ken Sharp 2007-09-12 00:35:07 UTC
Patch http://ghostscript.com/pipermail/gs-cvs/2007-September/007816.html
resolves this issue.
Comment 6 Ken Sharp 2007-09-13 01:37:01 UTC
Patch http://ghostscript.com/pipermail/gs-cvs/2007-September/007817.html also
relates to this issue. Improves teh memory handling.