Bug 689370 - Missing characters in PDF, depending on total amount of characters!
Summary: Missing characters in PDF, depending on total amount of characters!
Status: RESOLVED WONTFIX
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 8.57
Hardware: PC Windows XP
: P3 normal
Assignee: Ken Sharp
URL: http://www.webdesign-gerer.de/bug
Keywords: bountiable
: 689727 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-26 10:16 UTC by Johannes
Modified: 2009-07-16 03:38 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
PDF created with ps2pdf (10.21 KB, application/pdf)
2007-07-26 10:17 UTC, Johannes
Details
LaTeX file (426 bytes, text/plain)
2007-07-26 10:18 UTC, Johannes
Details
working PDF file created with pdfLaTeX (27.99 KB, application/pdf)
2007-07-26 10:18 UTC, Johannes
Details
ps-file (26.36 KB, application/postscript)
2007-07-26 10:19 UTC, Johannes
Details
Proposed patch (803 bytes, patch)
2008-02-05 20:00 UTC, Szymon Rusinkiewicz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes 2007-07-26 10:16:40 UTC
I tried to generate this LaTeX file:

\documentclass{article}
\usepackage{pxfonts}

\begin{document}

\textsc{ ABCdefghijklmnop}\\ 
\textsc{ qrsqrst} 
%if there are more then 16 different small characters in small cap in the
document, no small
%characters in small caps will be visible anymore after ps2pdf conversion!!!

\textsc{ \textbf{ABCasdofihdivgbfgb}}
%this applies isolated for normal small caps as well as for bold small caps

\end{document}



And if I use pdfLaTeX, it works.

But if I use first dvips and then ps2pdf the following problems occur:

If the number of small characters, occurring anywhere in my document in any
normal small caps region, exceeds 16, none of them is found in the produced pdf.
The same thing happens if the number of small characters in any bold small caps
region exceeds 16. 

After some research I realized that these letters are actually there, and that I
just can't see them with Adobe Acrobat Reader 8.1.0!
To see that that I used several other PDF Viewers such as pdfreader! or online
viewers (http://view.samurajdata.se/) or conversion tools
(http://any2djvu.djvuzone.org/)

I use:
Windows XP Media Center
Adobe Acrobat Reader 8.1.0
Ghost Script 8.57
MikTeX 2.6 

ps2pdf -dSubsetFonts=true -dEmbedAllFonts=true -sPAPERSIZE=a4 -dSAFER -dBATCH
-dNOPAUSE -sDEVICE=pdfwrite -sOutputFile="%bm.pdf" -c save pop -f "%bm.ps"
Comment 1 Johannes 2007-07-26 10:17:41 UTC
Created attachment 3221 [details]
PDF created with ps2pdf
Comment 2 Johannes 2007-07-26 10:18:11 UTC
Created attachment 3222 [details]
LaTeX file
Comment 3 Johannes 2007-07-26 10:18:37 UTC
Created attachment 3223 [details]
working PDF file created with pdfLaTeX
Comment 4 Johannes 2007-07-26 10:19:06 UTC
Created attachment 3224 [details]
ps-file
Comment 5 Ray Johnston 2007-07-31 09:42:03 UTC
Just a comment. Ghostscript ONLY needs the PS file -- we don't support
LaTex or divps, so the other attachments are irrelevant.
Comment 6 Timothy Osborn 2007-07-31 13:38:23 UTC
I have reproduced this problem and see that with Acrobat Reader 8.1.0 there is
missing text as reported. However with Acrobat Reader 7.0.8 and Apple Preview
3.0.9 all text appears as shown in the Latex generated PDF (attachment
http://bugs.ghostscript.com/attachment.cgi?id=3223&action=view).

I used the command:

gs -dSubsetFonts=true -dEmbedAllFonts=true -sPAPERSIZE=a4 -dSAFER -dBATCH
-dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=bm.pdf -c save pop -f 689370.ps

to reproduce the bug.
Comment 7 Szymon Rusinkiewicz 2008-02-05 20:00:16 UTC
Created attachment 3768 [details]
Proposed patch

It appears that the latest versions of Adobe Reader have problems coping with a
BaseEncoding of MacExpertEncoding.  Ghostscript would use such an encoding for
small-caps fonts, but only if enough characters matched - see
lookup_gs_simple_font_encoding().  The proposed patch simply forces
WinAnsiEncoding.  This fixes the problem for me on the testcase included here
(ghostscript 8.61, Adobe Reader 8.1.2), as well as other cases in which I was
seeing the same problem.
Comment 8 Szymon Rusinkiewicz 2008-10-10 12:12:11 UTC
I was wondering whether it would be possible to have the above patch included in
ghostscript?  It was posted quite some time ago, and there has been no activity
since...
Comment 9 keinbiervorvier 2008-10-10 16:29:35 UTC
in the meantime there was an update to the txfonts (see announcement below),
which also avoids the problem triggered by the latex -> dvi -> ps -> pdf route

this should fix the issue for the original poster, irrespective of a patch to gs

Cheers
T.


from	CTAN Announcements <ctan-ann@dante.de>
reply-to	ctan-ann@dante.de
to	ctan-ann@dante.de
date	Thu, Mar 27, 2008 at 4:10 AM
subject	CTAN update: txfonts & pxfonts small cap fonts update
...................................................................

The following information was provided by our fellow contributor:

Name of contribution: txfonts & pxfonts small cap fonts update
Author's name: Young Ryu
Location on CTAN: /fonts/txfonts  and fonts/pxfonts
Summary description: txfonts & pxfonts small cap fonts update
License type: gpl

Announcement text:
----------------------------------------------------------------------
The uploaded txpxfonts.zip contains

 pxfonts/afm/rpxbsc.afm
 pxfonts/afm/rpxsc.afm
 pxfonts/pfb/rpxbsc.pfb
 pxfonts/pfb/rpxsc.pfb

 txfonts/afm/rtxsc.afm
 txfonts/afm/rtxsssc.afm
 txfonts/afm/rtxbsssc.afm
 txfonts/afm/rtxbsc.afm
 txfonts/pfb/rtxsc.pfb
 txfonts/pfb/rtxsssc.pfb
 txfonts/pfb/rtxbsssc.pfb
 txfonts/pfb/rtxbsc.pfb

Adobe Reader 8 often does not properly display/print small cap
letters. The above updates correct this issue.
Comment 10 Ken Sharp 2009-02-13 06:17:48 UTC
*** Bug 689727 has been marked as a duplicate of this bug. ***
Comment 11 Ken Sharp 2009-07-16 03:38:30 UTC
I see that Acrobat 9 also draws this file correctly. It seems this issue is a
bug in Acrobat 8 (may be fixed by later updates).

I don't really think we should modify our code to work around a bug in a
specific version of Acrobat.