Problem reading PDF

R

RichardOnRails

I downloaded/installed the pdf-reader-0.9.0 using gem install.
I followed the usage advice from https://github.com/yob/pdf-reader/blob/master/examples/callbacks.rb
I posted my code in http://www.pastie.org/1369323
When running my test, I got:

Will process PDF files in "K:\_Projects\Ruby\_Ruby_Apps\Taxes\TaxData
\Year_End_Gain_Loss_Reporting"
Processing 2008_5275.pdf, filesize is 3434672 bytes
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/pdf-
reader-0.9.0/lib/pdf/reader/buffer.rb:123:in `index': wrong number of
arguments (0 for 1) (ArgumentError)
[snip]

Incidentally, the PDF file works fine when I open it in Firefox.

Any suggestions about how to get PDF-reading working in Ruby?
 
S

Stefano Mioli

On 12/12/10 5:51 AM, RichardOnRails wrote:

[snip]
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/pdf-
reader-0.9.0/lib/pdf/reader/buffer.rb:123:in `index': wrong number of
arguments (0 for 1) (ArgumentError)
[snip]

Incidentally, the PDF file works fine when I open it in Firefox.

Any suggestions about how to get PDF-reading working in Ruby?

Maybe you should try posting on pdf-reader's own mailing list at

http://groups.google.com/group/pdf-reader/

If you can open the document without errors, it may very well be a bug
in pdf-reader.
The project's page on github says:

"If you believe the file should be valid, or that a corrupt file didn’t
raise an exception, please forward a copy of the file to the maintainers
(preferably via the google group) and we can attempt to improve the code."
 
R

RichardOnRails

On 12/12/10 5:51 AM, RichardOnRails wrote:

[snip]
K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/pdf-
reader-0.9.0/lib/pdf/reader/buffer.rb:123:in `index': wrong number of
arguments (0 for 1) (ArgumentError)
[snip]
Incidentally,  the PDF file works fine when I open it in Firefox.
Any suggestions about how to get PDF-reading working in Ruby?

Maybe you should try posting on pdf-reader's own mailing list at

       http://groups.google.com/group/pdf-reader/

If you can open the document without errors, it may very well be a bug
in pdf-reader.
The project's page on github says:

"If you believe the file should be valid, or that a corrupt file didn t
raise an exception, please forward a copy of the file to the maintainers
(preferably via the google group) and we can attempt to improve the code."

Thanks, Stephano.

I didn't think of searching for a pdf website. Good suggestion!

I'm bookmarking the website. I'm postponing a visit there because I
just found A-PDF Text Extractor at http://www.a-pdf.com/newsletter/?te.
It extracted text-file of the PDF's textual content that I can work
with (in Ruby) for my current needs.

Best wishes,
Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top