Class: PDF::Reader::MetadataStrategy

Inherits:
AbstractStrategy show all
Defined in:
lib/pdf/reader/metadata_strategy.rb

Overview

DEPRECATED: this class was deprecated in version 0.11.0 and will

eventually be removed

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractStrategy

#initialize

Constructor Details

This class inherits a constructor from PDF::Reader::AbstractStrategy

Class Method Details

.to_symObject

:nodoc:



10
11
12
# File 'lib/pdf/reader/metadata_strategy.rb', line 10

def self.to_sym
  :metadata
end

Instance Method Details

#processObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/pdf/reader/metadata_strategy.rb', line 14

def process
  return false unless options[:metadata]

  # may be useful to some people
  callback(:pdf_version, ohash.pdf_version)

  # ye olde metadata
  callback(:metadata, [decoded_info]) if info?

  # new style xml metadata
  callback(:xml_metadata, []) if xml_metadata?

  # page count
  if pages?
    count = ohash.object(pages[:Count])
    callback(:page_count, count.to_i)
  end
end