pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Foley Ma <fole...@gmail.com>
Subject Fonts in Pdfbox
Date Wed, 25 Jul 2012 19:37:08 GMT
Hello,
I'm trying to convert a pdf to an image. It works fine on Windows &
Mac but on a headless Ubuntu server it throws an exception which I've
pasted below. The font it's trying to find is Times-Italic.

On this page it list Times Italic
(http://pdfbox.apache.org/userguide/fonts.html)

Is the font actually there, or it just means the font is defined? Do
the fonts have to be installed? Can it be embedded with an app and
then have it picked up?

Thanks,
Foley

Jul 25, 2012 6:52:59 PM org.apache.pdfbox.pdmodel.font.PDType1Font getawtFont
INFO: Can't find the specified basefont Times-Italic
Jul 25, 2012 6:52:59 PM org.apache.pdfbox.util.PDFStreamEngine processOperator
WARNING: java.lang.NullPointerException
java.lang.NullPointerException
        at org.apache.pdfbox.pdmodel.font.PDType1Font.getawtFont(PDType1Font.java:261)
        at org.apache.pdfbox.pdmodel.font.PDSimpleFont.drawString(PDSimpleFont.java:105)
        at org.apache.pdfbox.pdfviewer.PageDrawer.processTextPosition(PageDrawer.java:221)
        at org.apache.pdfbox.util.PDFStreamEngine.processEncodedText(PDFStreamEngine.java:498)
        at org.apache.pdfbox.util.operator.ShowText.process(ShowText.java:45)
        at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:556)
        at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:270)
        at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:237)
        at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:217)
        at org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:119)
        at org.apache.pdfbox.pdmodel.PDPage.convertToImage(PDPage.java:730)
        at org.apache.pdfbox.util.PDFImageWriter.writeImage(PDFImageWriter.java:115)
        at org.apache.pdfbox.PDFToImage.main(PDFToImage.java:244)
        at org.apache.pdfbox.PDFBox.main(PDFBox.java:58)
Jul 25, 2012 6:52:59 PM org.apache.pdfbox.pdmodel.font.PDType1Font getawtFont
INFO: Can't find the specified basefont Times-Italic
Jul 25, 2012 6:52:59 PM org.apache.pdfbox.util.PDFStreamEngine processOperator
WARNING: java.lang.NullPointerException
java.lang.NullPointerException
        at org.apache.pdfbox.pdmodel.font.PDType1Font.getawtFont(PDType1Font.java:261)
        at org.apache.pdfbox.pdmodel.font.PDSimpleFont.drawString(PDSimpleFont.java:105)
        at org.apache.pdfbox.pdfviewer.PageDrawer.processTextPosition(PageDrawer.java:221)
        at org.apache.pdfbox.util.PDFStreamEngine.processEncodedText(PDFStreamEngine.java:498)
        at org.apache.pdfbox.util.operator.ShowText.process(ShowText.java:45)
        at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:556)
        at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:270)
        at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:237)
        at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:217)
        at org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:119)
        at org.apache.pdfbox.pdmodel.PDPage.convertToImage(PDPage.java:730)
        at org.apache.pdfbox.util.PDFImageWriter.writeImage(PDFImageWriter.java:115)
        at org.apache.pdfbox.PDFToImage.main(PDFToImage.java:244)
        at org.apache.pdfbox.PDFBox.main(PDFBox.java:58)

Mime
View raw message