Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-412

Failure to render PDFs with embedded fonts

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.8.0-incubator
    • 2.0.0
    • None
    • None
    • WinXP, Java 6.0 update 10

    Description

      Trying to view 2 PDF files in PDFReader, the following problems happen:

      • test_openoffice301.pdf : all characters replaced by squares (no error logged)
      • test_word+pdfcreator.pdf : fallback to Arial (see log bellow)

      The files were created with OpenOffice 3.0.1 (exported as PDF) and Word (printed to PDF with PDFCreator). They both contain 3 lines of text using the DejaVu open-source font.

      PDFBox version used is trunk from january 28th, 2009:
      fontbox trunk 718464
      jempbox trunk 718464
      pdfbox trunk 737638

      For test_word+pdfcreator.pdf, the following lines are found in log:

      java.awt.FontFormatException: Font name not found
      at sun.font.TrueTypeFont.init(TrueTypeFont.java:453)
      at sun.font.TrueTypeFont.<init>(TrueTypeFont.java:160)
      at sun.font.FontManager.createFont2D(FontManager.java:2234)
      at java.awt.Font.<init>(Font.java:566)
      at java.awt.Font.createFont(Font.java:854)
      at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.drawString(PDTrueTypeFont.java:329)
      at org.apache.pdfbox.pdfviewer.PageDrawer.processTextPosition(PageDrawer.java:168)
      at org.apache.pdfbox.util.PDFStreamEngine.processEncodedText(PDFStreamEngine.java:447)
      at org.apache.pdfbox.util.operator.ShowTextGlyph.process(ShowTextGlyph.java:66)
      at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:496)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:205)
      at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:164)
      at org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:88)
      at org.apache.pdfbox.pdfviewer.PDFPagePanel.paint(PDFPagePanel.java:76)
      at javax.swing.JComponent.paintChildren(JComponent.java:864)
      at javax.swing.JComponent.paint(JComponent.java:1036)
      at javax.swing.JComponent.paintChildren(JComponent.java:864)
      at javax.swing.JComponent.paint(JComponent.java:1036)
      at javax.swing.JComponent.paintToOffscreen(JComponent.java:5122)
      at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:285)
      at javax.swing.RepaintManager.paint(RepaintManager.java:1128)
      at javax.swing.JComponent._paintImmediately(JComponent.java:5070)
      at javax.swing.JComponent.paintImmediately(JComponent.java:4880)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:723)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679)
      at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659)
      at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
      28 janv. 2009 11:44:10 org.apache.pdfbox.pdmodel.font.PDTrueTypeFont drawString
      INFO: Can't read the embedded font VRBBWM+DejaVuSansCondensed,Italic
      28 janv. 2009 11:44:10 org.apache.pdfbox.pdmodel.font.PDTrueTypeFont drawString
      INFO: Using font Arial instead

      Attachments

        1. bug_example.pdf
          12 kB
          Meredith Anderson
        2. test_openoffice301.pdf
          25 kB
          Seb V
        3. test_word+pdfcreator.pdf
          12 kB
          Seb V

        Issue Links

          Activity

            People

              lehmi Andreas Lehmkühler
              sebdotv Seb V
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: