ICEpdf
  1. ICEpdf
  2. PDF-810

Error painting shapes - ArrayIndexOutOfBoundsException

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 5.1
    • Fix Version/s: 6.4
    • Component/s: Font Engine
    • Labels:
      None
    • Environment:
      All

      Description

      When rendering the provided PDF, the following exception is thrown and prevents the it from rendering correctly:

      Sep 25, 2014 9:09:16 AM org.icepdf.core.pobjects.graphics.Shapes paint
      FINE: Error painting shapes.
      java.lang.ArrayIndexOutOfBoundsException: 12461
      at org.icepdf.core.pobjects.fonts.nfont.Encoding.getDiffChar(Unknown Source)
      at org.icepdf.core.pobjects.fonts.nfont.NFontTrueType.drawEstring(Unknown Source)
      at org.icepdf.core.pobjects.fonts.nfont.NFontType0.drawEstring(Unknown Source)
      at org.icepdf.core.pobjects.graphics.TextSprite.paint(TextSprite.java:213)
      at org.icepdf.core.pobjects.graphics.commands.TextSpriteDrawCmd.paintOperand(TextSpriteDrawCmd.java:49)
      at org.icepdf.core.pobjects.graphics.Shapes.paint(Shapes.java:142)
      at org.icepdf.core.pobjects.Page.paintPageContent(Page.java:580)
      at org.icepdf.core.pobjects.Page.paint(Page.java:527)
      at org.icepdf.ri.common.views.PageViewComponentImpl.createBufferedPageImage(PageViewComponentImpl.java:950)
      at org.icepdf.ri.common.views.PageViewComponentImpl.access$400(PageViewComponentImpl.java:77)
      at org.icepdf.ri.common.views.PageViewComponentImpl$PagePainter.run(PageViewComponentImpl.java:1075)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)

        Activity

        Hide
        Patrick Corless added a comment -

        This is an interesting PDF document. After apply a check for in index out of bounds issue there appears to be two other issue. The first is a layout issue likely related to a negative Tw value but futher investigation is needed. The second issue is an encoding issue, the OS version is rendering the glyphs correctly unlike the PRO version which should aid in debugging the Pro version.

        The message "WARNING: CMAP resource error, could not find file: UniJIS-UCS2-HW-H" likely do to the fact that the icepdf-pro-intl.jar is not on the class path.

        Show
        Patrick Corless added a comment - This is an interesting PDF document. After apply a check for in index out of bounds issue there appears to be two other issue. The first is a layout issue likely related to a negative Tw value but futher investigation is needed. The second issue is an encoding issue, the OS version is rendering the glyphs correctly unlike the PRO version which should aid in debugging the Pro version. The message "WARNING: CMAP resource error, could not find file: UniJIS-UCS2-HW-H" likely do to the fact that the icepdf-pro-intl.jar is not on the class path.
        Hide
        Patrick Corless added a comment -

        sample file ResterFill.pdf has been added to the support drive, \\iceads1\support\PDF\800\811

        Show
        Patrick Corless added a comment - sample file ResterFill.pdf has been added to the support drive, \\iceads1\support\PDF\800\811
        Hide
        Patrick Corless added a comment -

        Many improvement have been made to the rendering of Japanese and Chinese characters. The file in question is now showing the correct glyphs but there are still a few outstanding issues related to font widths.

        Show
        Patrick Corless added a comment - Many improvement have been made to the rendering of Japanese and Chinese characters. The file in question is now showing the correct glyphs but there are still a few outstanding issues related to font widths.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: