We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
The text was updated successfully, but these errors were encountered:
#411 (shipped in 2.8.0) made the following possible:
PDF::Reader.open("somefile.pdf") do |pdf| puts reader.page(1).text(rect: PDF::Reader::Rectangle.new(0, 0, 100, 100)) end
Does that meet a similar need?
Sorry, something went wrong.
It does. I couldn't find the available opts on the API docs, is that documented anywhere?
opts
No branches or pull requests
I did this very basic function for getting text at certain coordinates:
Probably it would be nice to have it on the library itself.
The text was updated successfully, but these errors were encountered: