Forum: Ruby why texts are jumbled using PDF-reader.

Posted by Prog Rammer (proggrammer)
on 2012-11-16 10:29
I am using pdf-reader gem and trying to look for some content at some
particular position on PDF. So what I am doing..


require 'rubygems'
require 'pdf-reader'
reader = PDF::Reader.new("general.pdf")
page1=reader.page(1)
page1_txt=page1.to_s

In page1_txt I can see that Words or the blanks in PDF which is filled,
are not in the order we expect looking at PDF. Why this happens? and how
to take care of that, So I can be definite to say that s1 string can
only be searched between s2 and s3.

any other better gem to look for string in particular position in pdf?
Posted by Joel Pearson (virtuoso)
on 2012-11-16 13:26
I can't even find that one :(


C:\Users\test\Desktop>gem install pdf-reader
ERROR:  Could not find a valid gem 'pdf-reader' (>= 0) in any repository
ERROR:  Possible alternatives: pdf-reader
Posted by Prog Rammer (proggrammer)
on 2012-11-16 22:56
Joel Pearson wrote in post #1084721:
> I can't even find that one :(
>
>
> C:\Users\test\Desktop>gem install pdf-reader
> ERROR:  Could not find a valid gem 'pdf-reader' (>= 0) in any repository
> ERROR:  Possible alternatives: pdf-reader

http://stackoverflow.com/questions/9962051/could-n...
http://www.ruby-forum.com/topic/430160
OR
https://www.google.co.in/search?client=ubuntu&chan...
Posted by Prog Rammer (proggrammer)
on 2012-11-25 23:50
any idea? why it happens? or any solution?
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.