pdf-reader icon indicating copy to clipboard operation
pdf-reader copied to clipboard

doesn't read Correct Data

Open Nauman-Naseer opened this issue 9 years ago • 1 comments

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 : 1

PDF file is : 1.pdf

Nauman-Naseer avatar Mar 18 '16 13:03 Nauman-Naseer

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.

1.pdf

yob avatar Feb 14 '17 13:02 yob