pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Letsch <cont...@thomas-letsch.de>
Subject Re: Problem reading PDF with Type1 font
Date Tue, 12 Jul 2016 13:18:52 GMT
Hi Andreas,

thanks for your answer.

Am 12.07.2016 um 15:01 schrieb Andreas Lehmkuehler:
> Hi,
>
> Am 12.07.2016 um 14:18 schrieb Thomas Letsch:
>> Hi,
>>
>> I am reading a PDF file with an embedded type1 font. I am getting an
>> IOException during parsing of the PDF (I removed the name of the font
>> for legal reasons):
> Why not, is it a secret font?
Actually I don't know. The whole PDF is confidential, so any part of it
is probably, too. And its not a common font you find on the web.

>
>> PDType1Font [ERROR] Can't read the embedded Type1 font <name removed>
>> java.io.IOException: Found Token[kind=START_ARRAY, text=[] but expected
>> INTEGER
>>
>> Unfortunately I cannot send you the PDF, but I can send you an extract
>> with the (hopefully) interesting parts.
> I doesn't help. We need the font itself as the parser throws the
> exception when reading the font.
This is my fault, I didn't include the whole stack trace. Sorry, here it is:
java.io.IOException: Found Token[kind=START_ARRAY, text=[] but expected
INTEGER
    at org.apache.fontbox.type1.Type1Parser.read(Type1Parser.java:754)
    at
org.apache.fontbox.type1.Type1Parser.readEncoding(Type1Parser.java:200)
    at org.apache.fontbox.type1.Type1Parser.parseASCII(Type1Parser.java:128)
    at org.apache.fontbox.type1.Type1Parser.parse(Type1Parser.java:61)
    at
org.apache.fontbox.type1.Type1Font.createWithSegments(Type1Font.java:85)
    at
org.apache.pdfbox.pdmodel.font.PDType1Font.<init>(PDType1Font.java:228)
    at
org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:62)
    at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:123)
    at
org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:60)
    at
org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:815)
    at
org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:472)
    at
org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:446)
    at
org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:149)

This looks for my non-expert eyes like a problem in reading the
encoding. At least this is my hope, because then we perhaps can get
along without the font file.
>
> BTW, what PDFBox version are you using?

2.0.2


Thanks,
Thomas

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message