Method: PDF::Reader::Page#attributes
- Defined in:
- lib/pdf/reader/page.rb
#attributes ⇒ Object
Returns the attributes that accompany this page, including attributes inherited from parents.
58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/pdf/reader/page.rb', line 58 def attributes @attributes ||= {}.tap { |hash| page_with_ancestors.reverse.each do |obj| hash.merge!(@objects.deref(obj)) end } # This shouldn't be necesary, but some non compliant PDFs leave MediaBox # out. Assuming 8.5" x 11" is what Acobat does, so we do it too. @attributes[:MediaBox] ||= [0,0,612,792] @attributes end |