[ 
https://issues.apache.org/jira/browse/PDFBOX-3748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr resolved PDFBOX-3748.
-------------------------------------
    Resolution: Fixed
      Assignee: Tilman Hausherr

Surprisingly, the description in 
https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6kern.html
and
http://www.microsoft.com/typography/tt/ttf_spec/ttch02.doc

are different, incompatible and conflicting (tupleIndex and position of 
subtable format). Our existing implementation follows the microsoft document.

I'm setting this to resolved without doing a further implementation and here's 
why:
- According to https://www.microsoft.com/typography/OTSPEC/recom.htm Windows 
doesn't support format 2. So it wouldn't make sense for a font vendor to use 
that one
- I have a doubt whether this font is correct. I read the first 4 words of that 
subtable. According to it, leftOffsetTable starts at 1 which would be within 
the header?!
- We haven't had a request for this. The kern table would be needed only for 
PDF creation, not for text extraction or rendering.

> java.lang.UnsupportedOperationException: Kerning table version 0 format 2 not 
> yet supported.
> --------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-3748
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3748
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox
>    Affects Versions: 2.0.4, 2.0.5
>            Reporter: Thomas Penne
>            Assignee: Tilman Hausherr
>         Attachments: file.pdf
>
>
> Hi everyone, I am currently using pdfbox to extract text from pdf files and I 
> an encountering an UnsupportedOperationException while trying to extract text 
> from provided file (file.pdf)
> {quote}
> ...
>     Caused by: java.lang.UnsupportedOperationException: Kerning table version 
> 0 format 2 not yet supported.
>       at 
> org.apache.fontbox.ttf.KerningSubtable.readSubtable0Format2(KerningSubtable.java:231)
>       at 
> org.apache.fontbox.ttf.KerningSubtable.readSubtable0(KerningSubtable.java:215)
>       at org.apache.fontbox.ttf.KerningSubtable.read(KerningSubtable.java:70)
>       at org.apache.fontbox.ttf.KerningTable.read(KerningTable.java:80)
>       at org.apache.fontbox.ttf.TrueTypeFont.readTable(TrueTypeFont.java:324)
>       at org.apache.fontbox.ttf.TTFParser.parseTables(TTFParser.java:174)
>       at org.apache.fontbox.ttf.TTFParser.parse(TTFParser.java:150)
>       at org.apache.fontbox.ttf.TTFParser.parse(TTFParser.java:106)
>       at 
> org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.<init>(PDTrueTypeFont.java:178)
>       at 
> org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:75)
>       at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:143)
>       at 
> org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:60)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:829)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:486)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:460)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150)
>       at 
> org.apache.pdfbox.text.LegacyPDFStreamEngine.processPage(LegacyPDFStreamEngine.java:139)
>       at 
> org.apache.pdfbox.text.PDFTextStripper.processPage(PDFTextStripper.java:391)
>       at 
> org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:319)
>       at 
> org.apache.pdfbox.text.PDFTextStripper.writeText(PDFTextStripper.java:266)
>       at 
> org.apache.pdfbox.text.PDFTextStripper.getText(PDFTextStripper.java:227)
> ...
> {quote}
> I would like to understand what in my file causes this error and if anyone 
> knows a workaround to perform text extraction successfully on this file.
> Thank you in advance guys



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to