Bug 688357 - epstopdf does not include /Resources in Type3 fonts
Summary: epstopdf does not include /Resources in Type3 fonts
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 8.14
Hardware: PC Linux
: P3 normal
Assignee: leonardo
URL: http://www.circuitwizard.de/misc/e2p-...
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-31 13:02 UTC by Hartmut Henkel
Modified: 2008-12-19 08:31 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
e2p-bug.tgz (15.16 KB, application/octet-stream)
2005-11-02 22:15 UTC, leonardo
Details
patch.txt (3.03 KB, patch)
2005-11-08 02:25 UTC, leonardo
Details | Diff
same patch, white space cr/lf fixed, and comment removed. (2.73 KB, patch)
2005-11-08 07:39 UTC, Hin-Tak Leung
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hartmut Henkel 2005-10-31 13:02:34 UTC
Problem: Adobe Reader 7.0 complains about certain PDF files, telling e. g.

    "Could not find the XObject namend 'R9'"

The reason is that gs does not create a /Resources dictionary inside a Type3
font dictionary, when converting EPS to PDF. The problem appears when such PDF
files are embedded into other PDF files, e. g. by pdftex. Details with faulty
and manually repaired PDF test files see

http://www.circuitwizard.de/misc/e2p-bug.tgz

Regards, Hartmut
Comment 1 Hin-Tak Leung 2005-11-02 13:38:37 UTC
actually gs itself complains about the pdf file from pdftex as well...
==========
 gs test.pdf
AFPL Ghostscript 8.51 (2005-04-18)
Copyright (C) 2005 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1
   **** Undefined XObject resource: R10
>>showpage, press <return> to continue<<


   **** This file had errors that were repaired or ignored.
   **** The file was produced by: 
   **** >>>> pdfeTeX-1.304 <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

GS>
GS>quit
===========
Comment 2 leonardo 2005-11-02 22:15:31 UTC
Created attachment 1745 [details]
e2p-bug.tgz

A local copy of the referred data.
Comment 3 leonardo 2005-11-02 22:33:28 UTC
Can't reproduce.

1. Running test.pdf, test-rep.pdf, w0500248.pdf with Acrobat Reader 4, 5 and 
Adobe Reader 7 on Windows XP got no problems.

2. According to PDF spec 1.2, 1.3, 1.4, 1.5, Type 3 fonts inherit resources 
from page. The spec reads : "Resources dictionary (Optional but strongly 
recommended;PDF 1.2)". From your test Adobe Reader 7 on Linux looks 
inconforming - please claim to Adobe.

3. There was a bug in the gs8.51 PDF interpreter about inheriting Type 3 font 
resources - could reproduce "**** Undefined XObject resource: R10
" with 8.51 . This bug is fixed in HEAD. Try a newer release.
Comment 4 Hin-Tak Leung 2005-11-03 04:17:47 UTC
I'll accept that the message with gs 8.51 linux is a known/fixed bug (won't 
be ungrading for a little while), and indeed gs 8.53 win32 under wine 
doesn't complain, but I have managed to reproduce the original reported issue
with acrobat reader 7 on linux on test.pdf. The copyright message says it 
is "Version 7.0.1 07/27/2005". 

The rpm said it is acroread-7.0.1-1.2.0.EL4 , part of Redhat's Enterprise 
Linux 4. (the commercial/supported redhat linux distribution).

Hence re-opening. I'll see if I can find acroread 7.0.1 on XP...
Comment 5 leonardo 2005-11-08 02:25:24 UTC
Created attachment 1749 [details]
patch.txt

Please try the patch attached.
Comment 6 Hin-Tak Leung 2005-11-08 07:39:17 UTC
Created attachment 1751 [details]
same patch, white space cr/lf fixed, and comment removed.

Same as attachment 1749 [details] from Leonardo, just having the
the white space cr/lf fixed so that it would apply cleanly
to v.8.53.

Tested alright with the original files, with pdftex version
...This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)...
and acrobat reader 7.0.1 as mentioned earlier on RH linux EL4.
Comment 7 Hartmut Henkel 2005-11-08 11:41:11 UTC
tried the patch id-1751 with today's cvs gs. Works perfectly! Confirmed, that
/Resources are there for the Type3 font. And AR 7.0 error message does not
appear anymore. Big thanks to the bug hunters!

Regards, Hartmut
Comment 8 leonardo 2005-11-09 00:43:12 UTC
Folks,

Thanks for testing the patch 1749. This one won't go to production because I'll 
make a bnetter one. Anyway thanks for the knowledge that it fixes the problem.
Comment 9 leonardo 2005-11-09 04:58:26 UTC
Patch to HEAD :
http://ghostscript.com/pipermail/gs-cvs/2005-November/005785.html

Note it significantly differs from 1749, 1751.