Class: PDF::Reader::BoundingRectangleRunsFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/pdf/reader/bounding_rectangle_runs_filter.rb

Overview

Filter our text/characters that are positioned outside a rectangle. Usually the page MediaBox or CropBox, but could be a user specified rectangle too

Class Method Summary collapse

Class Method Details

.runs_within_rect(runs, rect) ⇒ Object



11
12
13
# File 'lib/pdf/reader/bounding_rectangle_runs_filter.rb', line 11

def self.runs_within_rect(runs, rect)
  runs.select { |run| rect.contains?(run.origin) }
end