Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.3.3
    • Fix Version/s: 5.0.1
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      ICEpdf 4.3.3 PRO
    • Salesforce Case Reference:

      Description

      Attached image produces an NPE exception similar to the following:

      Exception in thread "main" java.lang.NullPointerException
      at org.icepdf.core.pobjects.Document.getPageImage(Document.java:1063)

      I did some debugging and found that statements:

      Document document = new Document();
      document.setFile(filePath);

      create a new document object, but getNumberOfPages() method of this object always return zero. Furthermore an exception is thrown when the following line executed thereafter:

      int number = document.getNumberOfPages();
      BufferedImage image = (BufferedImage) document.getPageImage( number, GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, rotation, scale); <<< NPE thrown at this line
      1. agency.pdf
        610 kB
        Evgheni Sadovoi

        Activity

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Evgheni Sadovoi
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: