--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: Walks the PDF file and calls the appropriate callback methods when something of interest is found.
- !ruby/struct:SM::Flow::P 
  body: The callback methods should exist on the receiver object passed into the constructor. Whenever some content is found that will trigger a callback, the receiver is checked to see if the callback is defined.
- !ruby/struct:SM::Flow::P 
  body: If it is defined it will be called. If not, processing will continue.
- !ruby/struct:SM::Flow::H 
  level: 1
  text: Available Callbacks
- !ruby/struct:SM::Flow::P 
  body: The following callbacks are available and should be methods defined on your receiver class. Only implement the ones you need - the rest will be ignored.
- !ruby/struct:SM::Flow::P 
  body: "Some callbacks will include parameters which will be passed in as an array. For callbacks that supply no paramters, or where you don't need them, the *params argument can be left off. Some example callback method definitions are:"
- !ruby/struct:SM::Flow::VERB 
  body: "  def begin_document\n  def end_page\n  def show_text(string, *params)\n  def fill_stroke(*params)\n"
- !ruby/struct:SM::Flow::P 
  body: "You should be able to infer the basic command the callback is reporting based on the name. For further experimentation, define the callback with just a *params parameter, then print out the contents of the array using something like:"
- !ruby/struct:SM::Flow::VERB 
  body: "  puts params.inspect\n"
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Text Callbacks
- !ruby/struct:SM::Flow::P 
  body: All text passed into these callbacks will be encoded as UTF-8. Depending on where (and when) the PDF was generated, there's a good chance the text is NOT stored as UTF-8 internally so be careful when doing a comparison on strings returned from PDF::Reader (when doing unit tests for example). The string may not be byte-by-byte identical with the string that was originally written to the PDF.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: end_text_object
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: move_to_start_of_next_line
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_character_spacing
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: move_text_position
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: move_text_position_and_set_leading
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_text_font_and_size
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: show_text
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: show_text_with_positioning
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_text_leading
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_text_matrix_and_text_line_matrix
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_text_rendering_mode
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_text_rise
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_word_spacing
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_horizontal_text_scaling
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: move_to_next_line_and_show_text
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_spacing_next_line_show_text
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Graphics Callbacks
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: close_fill_stroke
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: fill_stroke
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: close_fill_stroke_with_even_odd
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: fill_stroke_with_even_odd
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: begin_marked_content_with_pl
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: begin_inline_image
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: begin_marked_content
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: begin_text_object
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: append_curved_segment
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: concatenate_matrix
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_stroke_color_space
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_nonstroke_color_space
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_line_dash
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_glyph_width
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_glyph_width_and_bounding_box
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: invoke_xobject
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: define_marked_content_with_pl
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: end_inline_image
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: end_marked_content
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: fill_path_with_nonzero
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: fill_path_with_nonzero
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: fill_path_with_even_odd
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_gray_for_stroking
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_gray_for_nonstroking
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_graphics_state_parameters
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: close_subpath
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_flatness_tolerance
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: begin_inline_image_data
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_line_join_style
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_line_cap_style
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_cmyk_color_for_stroking,
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_cmyk_color_for_nonstroking
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: append_line
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: begin_new_subpath
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_miter_limit
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: define_marked_content_point
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: end_path
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: save_graphics_state
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: restore_graphics_state
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: append_rectangle
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_rgb_color_for_stroking
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_rgb_color_for_nonstroking
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_color_rendering_intent
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: close_and_stroke_path
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: stroke_path
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_color_for_stroking
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_color_for_nonstroking
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_color_for_stroking_and_special
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_color_for_nonstroking_and_special
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: paint_area_with_shading_pattern
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: append_curved_segment_initial_point_replicated
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_line_width
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_clipping_path_with_nonzero
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: set_clipping_path_with_even_odd
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: append_curved_segment_final_point_replicated
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Misc Callbacks
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: begin_compatibility_section
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: end_compatibility_section,
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: begin_document
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: end_document
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: begin_page_container
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: end_page_container
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: begin_page
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: end_page
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: metadata
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: xml_metadata
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: page_count
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: begin_form_xobject
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: end_form_xobject
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Resource Callbacks
- !ruby/struct:SM::Flow::P 
  body: "Each page can contain (or inherit) a range of resources required for the page, including things like fonts and images. The following callbacks may appear after begin_page if the relevant resources exist on a page:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: resource_procset
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: resource_xobject
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: resource_extgstate
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: resource_colorspace
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: resource_pattern
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: resource_font
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: In most cases, these callbacks associate a name with each resource, allowing it to be referred to by name in the page content. For example, an XObject can hold an image. If it gets mapped to the name &quot;IM1&quot;, then it can be placed on the page using invoke_xobject &quot;IM1&quot;.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: OPERATORS
  value: "{       'b'   => :close_fill_stroke,       'B'   => :fill_stroke,       'b*'  => :close_fill_stroke_with_even_odd,       'B*'  => :fill_stroke_with_even_odd,       'BDC' => :begin_marked_content_with_pl,       'BI'  => :begin_inline_image,       'BMC' => :begin_marked_content,       'BT'  => :begin_text_object,       'BX'  => :begin_compatibility_section,       'c'   => :append_curved_segment,       'cm'  => :concatenate_matrix,       'CS'  => :set_stroke_color_space,       'cs'  => :set_nonstroke_color_space,       'd'   => :set_line_dash,       'd0'  => :set_glyph_width,       'd1'  => :set_glyph_width_and_bounding_box,       'Do'  => :invoke_xobject,       'DP'  => :define_marked_content_with_pl,       'EI'  => :end_inline_image,       'EMC' => :end_marked_content,       'ET'  => :end_text_object,       'EX'  => :end_compatibility_section,       'f'   => :fill_path_with_nonzero,       'F'   => :fill_path_with_nonzero,       'f*'  => :fill_path_with_even_odd,       'G'   => :set_gray_for_stroking,       'g'   => :set_gray_for_nonstroking,       'gs'  => :set_graphics_state_parameters,       'h'   => :close_subpath,       'i'   => :set_flatness_tolerance,       'ID'  => :begin_inline_image_data,       'j'   => :set_line_join_style,       'J'   => :set_line_cap_style,       'K'   => :set_cmyk_color_for_stroking,       'k'   => :set_cmyk_color_for_nonstroking,       'l'   => :append_line,       'm'   => :begin_new_subpath,       'M'   => :set_miter_limit,       'MP'  => :define_marked_content_point,       'n'   => :end_path,       'q'   => :save_graphics_state,       'Q'   => :restore_graphics_state,       're'  => :append_rectangle,       'RG'  => :set_rgb_color_for_stroking,       'rg'  => :set_rgb_color_for_nonstroking,       'ri'  => :set_color_rendering_intent,       's'   => :close_and_stroke_path,       'S'   => :stroke_path,       'SC'  => :set_color_for_stroking,       'sc'  => :set_color_for_nonstroking,       'SCN' => :set_color_for_stroking_and_special,       'scn' => :set_color_for_nonstroking_and_special,       'sh'  => :paint_area_with_shading_pattern,       'T*'  => :move_to_start_of_next_line,       'Tc'  => :set_character_spacing,       'Td'  => :move_text_position,       'TD'  => :move_text_position_and_set_leading,       'Tf'  => :set_text_font_and_size,       'Tj'  => :show_text,       'TJ'  => :show_text_with_positioning,       'TL'  => :set_text_leading,       'Tm'  => :set_text_matrix_and_text_line_matrix,       'Tr'  => :set_text_rendering_mode,       'Ts'  => :set_text_rise,       'Tw'  => :set_word_spacing,       'Tz'  => :set_horizontal_text_scaling,       'v'   => :append_curved_segment_initial_point_replicated,       'w'   => :set_line_width,       'W'   => :set_clipping_path_with_nonzero,       'W*'  => :set_clipping_path_with_even_odd,       'y'   => :append_curved_segment_final_point_replicated,       '\\''  => :move_to_next_line_and_show_text,       '\"'   => :set_spacing_next_line_show_text,     }"
full_name: PDF::Reader::Content
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: callback
- !ruby/object:RI::MethodSummary 
  name: content_stream
- !ruby/object:RI::MethodSummary 
  name: current_resources
- !ruby/object:RI::MethodSummary 
  name: document
- !ruby/object:RI::MethodSummary 
  name: metadata
- !ruby/object:RI::MethodSummary 
  name: resolve_references
- !ruby/object:RI::MethodSummary 
  name: walk_pages
- !ruby/object:RI::MethodSummary 
  name: walk_resources
- !ruby/object:RI::MethodSummary 
  name: walk_xobject_form
name: Content
superclass: Object
