0

I'm not a PDF expert, but I decompressed the PDF with PDFtk, and examining the content object (below) I don't see any 3 Tr codes to force the text to be invisible... but the two characters from /F3 do not appear. They are from a subset of SimSun Chinese font. Whole file is here. Can anyone explain why the two characters are not visible?

4 0 obj 
<<
/Length 294
>>
stream
1 0 0 -1 0 450.71 cm
q
1 0 0 -1 0 450.71 cm
BT
0 440.018 Td
/F2 12 Tf
<2122232324> Tj
ET
Q
/DeviceRGB cs
0 0.5019607843137255 0 scn
/Gs1 gs
q
1 0 0 -1 0 450.71 cm
BT
26.66015625 440.402 Td
/F3 12 Tf
<2122> Tj
ET
Q
q
1 0 0 -1 0 450.71 cm
BT
50.66015625 440.018 Td
/F2 12 Tf
<2524262327> Tj
ET
Q

endstream 
endobj 
Victoria
  • 497
  • 2
  • 10
  • 20

1 Answers1

2

The font used by /F3 ("SimSun"/"宋体"; in your file "AAAADO+SimSun") is not correctly embedded: its glyf table is empty.

The glyf table

.. contains information that describes the glyphs in the font in the TrueType outline format. (http://www.microsoft.com/typography/otspec/glyf.htm)

The file does contain the proper text data, so the text itself is readable from the file: "Hello一的World". But since the character forms are missing, there is nothing to display.

Jongware
  • 22,200
  • 8
  • 54
  • 100
  • 1
    Thanks so much for figuring it out and responding. I had no clue what to look for. Now that I do, I know what sort of code in the package I used to generate it to look for, to see if I can discover the bug. – Victoria Dec 28 '14 at 01:09
  • @Victoria: are you using GhostScript somewhere in your tool chain? [This similar question](http://stackoverflow.com/questions/26397712/how-to-confirm-a-truetype-pdf-font-is-missing-glyphs), earlier this year, suggests it's a GhostScript bug. – Jongware Dec 28 '14 at 01:22
  • Interesting. Mine was generated with PDFkit. My partner reported the problem, including your helpful analysis, at GitHub. Not sure yet how to get a debug environment set up to proceed further, if the developer doesn't respond. Never looked at CoffeeScript before, which is what PDFkit is written in, so it seems doubtful that it includes GhostScript as part of it, there was no mention of that in the Docs. – Victoria Dec 28 '14 at 06:19
  • 1
    That similar question is not a Ghostscript bug, its a bug in the font embedded in the PDF file, but Ghostscript did not produce the original (broken) PDF file. It may be that the same tool did produce this file. – KenS Dec 28 '14 at 11:50