ICEpdf
  1. ICEpdf
  2. PDF-170

PDF Documents without title can't be loaded by the Viewer RI

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0, 4.0.1
    • Fix Version/s: 4.0.1
    • Component/s: Viewer RI
    • Labels:
      None
    • Environment:
      JDK 1.6.0_18

      Description

      I created a simple Test PDF using Scribus and opened it with the Viewer RI, which caused the error message dialog:
      "ICEsoft ICEpdf - Exception" "ICEpdf cold not open the specified file ..."
      Opening the file just with the ViewerComponentExample works.

      Stack Trace with enabled debug logging:

      FINE: Error opening document.
      java.lang.StringIndexOutOfBoundsException: String index out of range: 0
      at java.lang.AbstractStringBuilder.charAt(AbstractStringBuilder.java:174)
      at java.lang.StringBuilder.charAt(StringBuilder.java:55)
      at org.icepdf.core.pobjects.HexStringObject.hexToString(Unknown Source)
      at org.icepdf.core.pobjects.HexStringObject.getLiteralString(Unknown Source)
      at org.icepdf.core.pobjects.HexStringObject.getDecryptedLiteralString(Unknown Source)
      at org.icepdf.core.pobjects.PInfo.getTitle(Unknown Source)
      at icepdf.dk.g(Unknown Source)
      at icepdf.dk.a(Unknown Source)
      at icepdf.dm.d(Unknown Source)
      at icepdf.dm.b(Unknown Source)
      at icepdf.dm.a(Unknown Source)
      at icepdf.dm.i(Unknown Source)
      at icepdf.bo.run(Unknown Source)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

      The "PInfo.getTitle()" part got me to play with the "Document Properties" in Scribus and as expected,
      setting the "Document Title" property in Scribus fixes the problem. I'm not sure if this is really a bug
      or if the document without title doe's not match the PDF Reference Specification.
      1. Test-without-title.pdf
        4 kB
        Stefan Knoefel
      2. Test-without-title.sla
        43 kB
        Stefan Knoefel

        Activity

        Hide
        Stefan Knoefel added a comment -

        Sorry, priority is not Major, I missed the field to change that

        Show
        Stefan Knoefel added a comment - Sorry, priority is not Major, I missed the field to change that
        Hide
        Stefan Knoefel added a comment -

        PDF and Scribus source without document title

        Show
        Stefan Knoefel added a comment - PDF and Scribus source without document title
        Hide
        Patrick Corless added a comment -

        I'm not really sure how this has never come up in the past. Generally speaking encryped strings are never empty but obviously this is not the case and for some reason is the first time we have encountered this case.

        Added a check for empty string when decrypting a HexStringObject.

        Show
        Patrick Corless added a comment - I'm not really sure how this has never come up in the past. Generally speaking encryped strings are never empty but obviously this is not the case and for some reason is the first time we have encountered this case. Added a check for empty string when decrypting a HexStringObject.
        Hide
        Patrick Corless added a comment -

        Fixed issue in -r21210. Missed the dash in PDF-170 so jira didn't pick up the comment.

        Show
        Patrick Corless added a comment - Fixed issue in -r21210. Missed the dash in PDF-170 so jira didn't pick up the comment.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Stefan Knoefel
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: