Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF document is rendered incorrectly (Error during font loading: dict is undefined") #4668

Closed
JasnaPaka opened this issue Apr 24, 2014 · 1 comment · Fixed by #4671
Closed

Comments

@JasnaPaka
Copy link

This PDF document in pdf.js is rendered incorrectly (Adobe Reader has no problem).

Document: http://jasnapaka.com/bugs/dokument.pdf
Windows 7 64bit, HWA enabled
PDF.js: 1.0.21

Screenshot (pdf.js): http://jasnapaka.com/bugs/document-pdf-js.png
Screenshot (Adobe Reader): http://jasnapaka.com/bugs/document-ar.png

Console output:
"Warning: unimplemented annotation type: Widget signature" pdf.worker.js:200
"Warning: Unsupported feature "font"" pdf.worker.js:200
"Warning: Unsupported feature "font"" pdf.js:200
"Warning: Error during font loading: dict is undefined"

@yurydelendik
Copy link
Contributor

The TrueType font claims to the be Type1C type one:

TT0 (dict) [id: 17, gen: 0]
    BaseFont = /GMZEFE+TimesNewRomanPSMT
    Encoding = /WinAnsiEncoding
    FirstChar = 0
    FontDescriptor (dict) [id: 58, gen: 0]
        Type = /FontDescriptor
        FontName = /GMZEFE+TimesNewRomanPSMT
        Flags = 50
        FontBBox (array)
        ItalicAngle = 0
        Ascent = 683
        Descent = -217
        CapHeight = 662
        XHeight = 450
        StemV = 84
        StemH = 28
        FontFile3 (stream) [id: 57, gen: 0]
            Length = 30637
            Filter = /FlateDecode
            Subtype = /Type1C
            <view contents> download
    LastChar = 255
    Subtype = /TrueType
    Type = /Font
    Widths (array) [id: 59, gen: 0]

We also have opposite problem, some TypeType fonts contain Type1C data. We need to guess type based on actual file content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants