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

          Repository Revision Date User Message
          ICEsoft Public SVN Repository #38645 Tue Oct 22 10:18:29 MDT 2013 patrick.corless PDF-668 fix a bug where xref streams where being decrypted using crypt filters which is incorrect. This only occurs when parsing previous entries.
          Files Changed
          Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/security/StandardSecurityHandler.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #38644 Tue Oct 22 10:18:17 MDT 2013 patrick.corless PDF-668 fix a bug where xref streams where being decrypted using crypt filters which is incorrect. This only occurs when parsing previous entries.
          Files Changed
          Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/security/StandardSecurityHandler.java

            People

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

              Dates

              • Created:
                Updated:
                Resolved: