yob/pdf-reader — Issue #39: Some encrypted files don't open
Author: janxious
Created: 2011-12-28 22:06:31+00:00
State: open

I am generating this PDF via PrinceXML(http://princexml.com): http://dl.dropbox.com/u/599002/DocRaptor/test.pdf

It has no user or owner password set. It is encrypted, however. Based on a brief readthrough of the PDF spec, the trailer seemed correct. It opens without password prompting in Preview and Skim.

The exception trace is:

PDF::Reader::EncryptedPDFError: Invalid password ()
vendor/bundle/ruby/1.8/gems/pdf-reader-1.0.0.rc1/lib/pdf/reader/standard_security_handler.rb:182:in `build_standard_key'
vendor/bundle/ruby/1.8/gems/pdf-reader-1.0.0.rc1/lib/pdf/reader/standard_security_handler.rb:66:in `initialize'
vendor/bundle/ruby/1.8/gems/pdf-reader-1.0.0.rc1/lib/pdf/reader/object_hash.rb:275:in `new'
vendor/bundle/ruby/1.8/gems/pdf-reader-1.0.0.rc1/lib/pdf/reader/object_hash.rb:275:in `build_security_handler'
vendor/bundle/ruby/1.8/gems/pdf-reader-1.0.0.rc1/lib/pdf/reader/object_hash.rb:48:in `initialize'
vendor/bundle/ruby/1.8/gems/pdf-reader-1.0.0.rc1/lib/pdf/reader.rb:116:in `new'
vendor/bundle/ruby/1.8/gems/pdf-reader-1.0.0.rc1/lib/pdf/reader.rb:116:in `initialize'
vendor/bundle/ruby/1.8/gems/pdf-reader-1.0.0.rc1/lib/pdf/reader.rb:159:in `new'
vendor/bundle/ruby/1.8/gems/pdf-reader-1.0.0.rc1/lib/pdf/reader.rb:159:in `open'

Thoughts?