Comment 0 for bug 1245171

Revision history for this message
scruss (scruss) wrote :

Expected behaviour:

    $ pdftk encrypted.pdf dump_data
    Error: Failed to open PDF file:
       encrypted.pdf
       OWNER PASSWORD REQUIRED, but not given (or incorrect)
    Done. Input errors, so no output created.

Actual behaviour:

    $ pdftk encrypted.pdf dump_data
    Error: Unexpected Exception in open_reader()
    Unhandled Java Exception:
    java.lang.NullPointerException
       at gnu.gcj.runtime.NameFinder.lookup(libgcj.so.14)
       at java.lang.Throwable.getStackTrace(libgcj.so.14)
       at java.lang.Throwable.stackTraceString(libgcj.so.14)
       at java.lang.Throwable.printStackTrace(libgcj.so.14)
       at java.lang.Throwable.printStackTrace(libgcj.so.14)

Expected behaviour seen with local build from pdftk-2.02-src.zip from author's site.

Behaviour is not consistent. Expected behaviour is seen with files encrypted with pdftk, such as:

    $ pdftk plain.pdf output encrypted.pdf owner_pw teh_secret allow printing

Actual behaviour is seen with:

1. A commercially-generated encrypted credit card statement (which, naturally, I won't attach). pdfinfo reports it was created by 'AFP Print Application', producer 'CrawfordTech PDF Driver Version 4.0'.
2. A trivial test file generated by the command:
    $ echo -e '%!\n /Courier 12 selectfont \n 72 720 moveto \n (Hello) show \n showpage\n' | ps2pdf -dCompatibilityLevel=1.2 -sOwnerPassword=teh_secret -sUserPassword='' -dEncryptionR=2 -dPermissions=-12 - encrypted.pdf

In all cases, pdfinfo (from poppler-utils package) reports correct metatdata:

    $ pdfinfo encrypted.pdf
    Producer: GPL Ghostscript 9.10
    CreationDate: Sun Oct 27 08:03:14 2013
    ModDate: Sun Oct 27 08:03:14 2013
    Tagged: no
    Form: none
    Pages: 1
    Encrypted: yes (print:yes copy:yes change:no addNotes:yes algorithm:RC4)
    Page size: 612 x 792 pts (letter)
    Page rot: 0
    File size: 1315 bytes
    Optimized: no
    PDF version: 1.2

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: pdftk 2.01-1
ProcVersionSignature: Ubuntu 3.11.0-13.20-generic 3.11.6
Uname: Linux 3.11.0-13-generic x86_64
ApportVersion: 2.12.5-0ubuntu2.1
Architecture: amd64
Date: Sun Oct 27 06:49:00 2013
InstallationDate: Installed on 2013-04-13 (196 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
MarkForUpload: True
SourcePackage: pdftk
UpgradeStatus: Upgraded to saucy on 2013-10-20 (6 days ago)