You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2014/10/23 19:53:35 UTC

[jira] [Commented] (PDFBOX-1372) NullPointerException with loadDescriptorDictionary

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

Andreas Lehmkühler commented on PDFBOX-1372:
--------------------------------------------

CODE128.TTF works fine using the current trunk. 

FRE3OF9X.TTF produces the following exception:

{code}
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 85
	at org.apache.pdfbox.pdmodel.font.PDTrueTypeFontEmbedder.createFontDescriptor(PDTrueTypeFontEmbedder.java:304)
	at org.apache.pdfbox.pdmodel.font.PDTrueTypeFontEmbedder.<init>(PDTrueTypeFontEmbedder.java:89)
	at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.<init>(PDTrueTypeFont.java:178)
	at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:78)
	at org.apache.pdfbox.examples.pdmodel.HelloWorldTTF.doIt(HelloWorldTTF.java:59)
	at org.apache.pdfbox.examples.pdmodel.HelloWorldTTF.main(HelloWorldTTF.java:99)
{code}

> NullPointerException with loadDescriptorDictionary
> --------------------------------------------------
>
>                 Key: PDFBOX-1372
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1372
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.6.0, 2.0.0
>         Environment: Windows 7, WebLogic 10.3.2, jdk160_14_R27.6.5-32.
>            Reporter: wentao
>         Attachments: CODE128.TTF, FRE3OF9X.TTF, index128.jsp
>
>
> I downloaded a ttf from http://www.jtbarton.com/Barcodes/code128.ttf and tried to use this with pdfbox 1.6.0 in my jsp.
> it returns below error
> java.lang.NullPointerException
> 	at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadDescriptorDictionary(PDTrueTypeFont.java:339)
> 	at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:164)
> 	at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:140)
> 	at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:127)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)