pdf-reader
pdf-reader copied to clipboard
doesn't read Correct Data
I am trying to read the text from a PDF using "pdf_reader" gem Sometimes it give me the Correct Data and some time it change the original data for examples in PDF file " Name: " is written but when i read it show me "MNahmeo" instead of "Name: "
Code is
require 'pdf-reader' reader = PDF::Reader.new("1.pdf") reader.pages.each do |page| puts page.text end
Output is :
PDF file is : 1.pdf
Thanks for this report. I've been able to reproduce it on the latest master branch.
There's some definite weaknesses in our glyph positioning logic, and it seems like this is triggering a bug. I'm short on time to investigate further, but will happily accept and review any patches.