Skip to content

Would the author be interested in a text_at page function? #517

@3ynm

Description

@3ynm

I did this very basic function for getting text at certain coordinates:

def text_at(page, x1, y1, x2, y2)
  text = String.new
  page.runs.each do |r|
    next unless r.x >= x1 && r.y >= y1 && r.endx <= x2 && r.endy <= y2

    text << r.text
  end
  text
end

Probably it would be nice to have it on the library itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions