Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.4
    • Fix Version/s: 5.0.7
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      Windows 7, Java JDK 1.7, Build for Java 1.5 -> Target System AIX 5

      Description

      Hi dev-team.

      I just tried out one og your example codes and tried to adapt it a bit.
      I´m trying to generate PDF Thumbnails. The Code works fine on 98% of all PDF files, but some crashes with an NPE just during opening them.

      Just:
      ------------------------8<------------------------
      Document document = new Document();
      document.setFile(sFileName);
      ------------------------8<------------------------

      leads into following NPE:
      WARNING: Fatal error parsing PDF file stream.
      java.lang.NullPointerException
              at org.icepdf.core.pobjects.security.StandardSecurityHandler.getEncryptionInputStream(StandardSecurityHandler.java:213)
              at org.icepdf.core.pobjects.security.SecurityManager.getEncryptionInputStream(SecurityManager.java:238)
              at org.icepdf.core.pobjects.Stream.getDecodedInputStream(Stream.java:230)
              at org.icepdf.core.pobjects.Stream.getDecodedStreamBytes(Stream.java:168)
              at org.icepdf.core.pobjects.Stream.getDecodedByteArrayInputStream(Stream.java:147)
              at org.icepdf.core.util.Parser.getObject(Parser.java:284)
              at org.icepdf.core.util.LazyObjectLoader.loadTrailer(LazyObjectLoader.java:139)
              at org.icepdf.core.util.Library.getTrailerByFilePosition(Library.java:133)
              at org.icepdf.core.pobjects.PTrailer.onDemandLoadAndSetupPreviousTrailer(PTrailer.java:288)
              at org.icepdf.core.pobjects.CrossReference.getEntryForObject(CrossReference.java:232)
              at org.icepdf.core.util.LazyObjectLoader.loadObject(LazyObjectLoader.java:58)
              at org.icepdf.core.util.Library.getObject(Library.java:156)
              at org.icepdf.core.util.Library.getObject(Library.java:206)
              at org.icepdf.core.pobjects.Catalog.init(Catalog.java:92)
              at org.icepdf.core.pobjects.Document.setInputStream(Document.java:422)
              at org.icepdf.core.pobjects.Document.setFile(Document.java:207)
              at io.ecx.NSKPDFThumber.capturePages(NSKPDFThumber.java:86)
              at io.ecx.NSKPDFThumber.main(NSKPDFThumber.java:71)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:618)
              at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
      ------------------------8<------------------------

      Is there any possability to apend one or two PDF files to this ticket to give some files to check against?

      kind regards
      Michael

        Issue Links

          Activity

          Michael Pöllinger created issue -
          Michael Pöllinger made changes -
          Field Original Value New Value
          Attachment EN-Annual_Report_2013.pdf [ 16537 ]
          Patrick Corless made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Patrick Corless made changes -
          Fix Version/s 5.1 [ 10675 ]
          Patrick Corless made changes -
          Fix Version/s 5.0.7 [ 11470 ]
          Fix Version/s 5.1 [ 10675 ]
          Trang Vu made changes -
          Link This issue is duplicated by PDF-682 [ PDF-682 ]
          Patrick Corless made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Patrick Corless
              Reporter:
              Michael Pöllinger
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: