Method: PDF::Reader::ObjectHash#initialize

Defined in:
lib/pdf/reader/object_hash.rb

#initialize(input, opts = {}) ⇒ ObjectHash

Creates a new ObjectHash object. Input can be a string with a valid filename or an IO-like object.

Valid options:

:password - the user password to decrypt the source PDF


44
45
46
47
48
49
50
51
52
# File 'lib/pdf/reader/object_hash.rb', line 44

def initialize(input, opts = {})
  @io          = extract_io_from(input)
  @xref        = PDF::Reader::XRef.new(@io)
  @pdf_version = read_version
  @trailer     = @xref.trailer
  @cache       = opts[:cache] || PDF::Reader::ObjectCache.new
  @sec_handler = NullSecurityHandler.new
  @sec_handler = build_security_handler(opts)
end