You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Villu Ruusmann (JIRA)" <ji...@apache.org> on 2010/02/23 16:27:28 UTC

[jira] Commented: (PDFBOX-634) CFF parsing failure

    [ https://issues.apache.org/jira/browse/PDFBOX-634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837275#action_12837275 ] 

Villu Ruusmann commented on PDFBOX-634:
---------------------------------------

The least we could do is to provide a fall-back mechanism to PDFBox 0.8.0 level of functionality.

CFF font parsing occurs in org.apache.pdfbox.pdmodel.font.PDType1CFont#ensureLoaded(). I guess it would be wise to invoke this method right in the constructor at take immediate action in class org.org.apache.pdfbox.pdmodel.font.PDFontFactory if an exception is thrown, and not to postpone it to the point (ie. methods #encode, #getFontWidth, #getFontHeight) where there is no easy way out.

> CFF parsing failure
> -------------------
>
>                 Key: PDFBOX-634
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-634
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox
>    Affects Versions: 1.0.0
>            Reporter: Villu Ruusmann
>
> Arjohn Kampman reported to users@pdfbox.apache.org the following CFF font parsing failure:
> java.lang.ArrayIndexOutOfBoundsException: 3
>        at org.apache.fontbox.cff.CFFParser$IndexData.getBytes(CFFParser.java:585)
>        at org.apache.fontbox.cff.CFFParser.parseFont(CFFParser.java:329)
>        at org.apache.fontbox.cff.CFFParser.parse(CFFParser.java:65)
>        at org.apache.pdfbox.pdmodel.font.PDType1CFont.ensureLoaded(PDType1CFont.java:290)
>        at org.apache.pdfbox.pdmodel.font.PDType1CFont.getFontWidth(PDType1CFont.java:138)
>        at org.apache.pdfbox.util.PDFStreamEngine.processEncodedText(PDFStreamEngine.java:323)
>        at org.apache.pdfbox.util.operator.ShowText.process(ShowText.java:45)
>        at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:552)
>        at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:248)
>        at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:207)
>        at org.apache.pdfbox.util.PDFTextStripper.processPage(PDFTextStripper.java:367)
>        at org.apache.pdfbox.util.PDFTextStripper.processPages(PDFTextStripper.java:291)
>        at org.apache.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:247)
>        at org.apache.pdfbox.util.PDFTextStripper.getText(PDFTextStripper.java:180)
> The problematic PDF document can be found at http://domex.nps.edu/corp/files/govdocs1/000/000163.pdf

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.