class PDF::Reader::Resources
mixin for common methods in Page and FormXobjects
def color_spaces
of calling it over and over.
with no caching. You will want to cache the results instead
NOTE: this method de-serialise objects from the underlying PDF
Returns a Hash of color spaces that are available to this page
def color_spaces @objects.deref_hash!(@resources[:ColorSpace]) || {} end
def fonts
of calling it over and over.
with no caching. You will want to cache the results instead
NOTE: this method de-serialise objects from the underlying PDF
Returns a Hash of fonts that are available to this page
def fonts @objects.deref_hash!(@resources[:Font]) || {} end
def graphic_states
of calling it over and over.
with no caching. You will want to cache the results instead
NOTE: this method de-serialise objects from the underlying PDF
page
Returns a Hash of external graphic states that are available to this
def graphic_states @objects.deref_hash!(@resources[:ExtGState]) || {} end
def initialize(objects, resources)
def initialize(objects, resources) @objects = objects @resources = resources end
def patterns
of calling it over and over.
with no caching. You will want to cache the results instead
NOTE: this method de-serialise objects from the underlying PDF
Returns a Hash of patterns that are available to this page
def patterns @objects.deref_hash!(@resources[:Pattern]) || {} end
def procedure_sets
of calling it over and over.
with no caching. You will want to cache the results instead
NOTE: this method de-serialise objects from the underlying PDF
Returns an Array of procedure sets that are available to this page
def procedure_sets @objects.deref_array!(@resources[:ProcSet]) || [] end
def properties
of calling it over and over.
with no caching. You will want to cache the results instead
NOTE: this method de-serialise objects from the underlying PDF
Returns a Hash of properties sets that are available to this page
def properties @objects.deref_hash!(@resources[:Properties]) || {} end
def shadings
of calling it over and over.
with no caching. You will want to cache the results instead
NOTE: this method de-serialise objects from the underlying PDF
Returns a Hash of shadings that are available to this page
def shadings @objects.deref_hash!(@resources[:Shading]) || {} end
def xobjects
of calling it over and over.
with no caching. You will want to cache the results instead
NOTE: this method de-serialise objects from the underlying PDF
Returns a Hash of XObjects that are available to this page
def xobjects dict = @objects.deref_hash!(@resources[:XObject]) || {} TypeCheck.cast_to_pdf_dict_with_stream_values!(dict) end