Method: PDF::Reader::TextRun#+
- Defined in:
- lib/pdf/reader/text_run.rb
#+(other) ⇒ Object
: (PDF::Reader::TextRun) -> PDF::Reader::TextRun
85 86 87 88 89 90 91 92 93 |
# File 'lib/pdf/reader/text_run.rb', line 85 def +(other) raise ArgumentError, "#{other} cannot be merged with this run" unless mergable?(other) if (other.x - endx) <( font_size * 0.2) TextRun.new(x, y, other.endx - x, font_size, text + other.text) else TextRun.new(x, y, other.endx - x, font_size, "#{text} #{other.text}") end end |