module PDF::Reader::ResourceMethods
mixin for common methods in Page and FormXobjects
Public Instance Methods
Returns a Hash of color spaces that are available to this page
NOTE: this method de-serialise objects from the underlying PDF
with no caching. You will want to cache the results instead of calling it over and over.
# File lib/pdf/reader/resource_methods.rb, line 14 def color_spaces @objects.deref!(resources[:ColorSpace]) || {} end
Returns a Hash of fonts that are available to this page
NOTE: this method de-serialise objects from the underlying PDF
with no caching. You will want to cache the results instead of calling it over and over.
# File lib/pdf/reader/resource_methods.rb, line 24 def fonts @objects.deref!(resources[:Font]) || {} end
Returns a Hash of external graphic states that are available to this page
NOTE: this method de-serialise objects from the underlying PDF
with no caching. You will want to cache the results instead of calling it over and over.
# File lib/pdf/reader/resource_methods.rb, line 35 def graphic_states @objects.deref!(resources[:ExtGState]) || {} end
Returns a Hash of patterns that are available to this page
NOTE: this method de-serialise objects from the underlying PDF
with no caching. You will want to cache the results instead of calling it over and over.
# File lib/pdf/reader/resource_methods.rb, line 45 def patterns @objects.deref!(resources[:Pattern]) || {} end
Returns an Array of procedure sets that are available to this page
NOTE: this method de-serialise objects from the underlying PDF
with no caching. You will want to cache the results instead of calling it over and over.
# File lib/pdf/reader/resource_methods.rb, line 55 def procedure_sets @objects.deref!(resources[:ProcSet]) || [] end
Returns a Hash of properties sets that are available to this page
NOTE: this method de-serialise objects from the underlying PDF
with no caching. You will want to cache the results instead of calling it over and over.
# File lib/pdf/reader/resource_methods.rb, line 65 def properties @objects.deref!(resources[:Properties]) || {} end
Returns a Hash of shadings that are available to this page
NOTE: this method de-serialise objects from the underlying PDF
with no caching. You will want to cache the results instead of calling it over and over.
# File lib/pdf/reader/resource_methods.rb, line 75 def shadings @objects.deref!(resources[:Shading]) || {} end
Returns a Hash of XObjects that are available to this page
NOTE: this method de-serialise objects from the underlying PDF
with no caching. You will want to cache the results instead of calling it over and over.
# File lib/pdf/reader/resource_methods.rb, line 85 def xobjects @objects.deref!(resources[:XObject]) || {} end