rpdf2txt

A

Andrea Campagna

Hi to all,
i'm trying to make a pdf parser. This is my code and the script seems to
work...

require 'rpdf2txt/parser'
require 'rpdf2txt/default_handler'

parser = Rpdf2txt::parser.new(File.read('filename.pdf'))
output = File.open('prova.txt', 'w')
handler = Rpdf2txt::SimpleHandler.new(output)
parser.extract_text(handler)

The problem is that the file 'prova.txt' created is empty. I've not
found documentation about this library so i don't know what i'm doing
wrong.
Can anybody help me??

thanks in advance

Andrea Campagna
 
H

Hannes Wyss

Ciao Andrea

Hi to all,
i'm trying to make a pdf parser. This is my code and the script seems to
work...

require 'rpdf2txt/parser'
require 'rpdf2txt/default_handler'

parser = Rpdf2txt::parser.new(File.read('filename.pdf'))
output = File.open('prova.txt', 'w')
handler = Rpdf2txt::SimpleHandler.new(output)
parser.extract_text(handler)

That looks right - if you can you send me your PDF off-list I'll have a look.

cheers
Hannes
 
A

andreacamp84

parser.extract_text(handler)
That looks right - if you can you send me your PDF off-list I'll have a look.

cheers
Hannes
Ciao Hannes,

i've send u an email with the PDF document that i'm using to make the
tests, do you mean this???

cheers

Andrea
 
A

andreacamp84

parser.extract_text(handler)
That looks right - if you can you send me your PDF off-list I'll have a look.

cheers
Hannes
Ciao Hannes,

i've send u an email with the PDF document that i'm using to make the
tests, do you mean this???

cheers

Andrea
 
A

andreacamp84

parser.extract_text(handler)
That looks right - if you can you send me your PDF off-list I'll have a look.

cheers
Hannes
Ciao Hannes,

i've send u an email with the PDF document that i'm using to make the
tests, do you mean this???

cheers

Andrea
 
A

andreacamp84

parser.extract_text(handler)
That looks right - if you can you send me your PDF off-list I'll have a look.

cheers
Hannes
Ciao Hannes,

i've send u an email with the PDF document that i'm using to make the
tests, do you mean this???

cheers

Andrea
 
H

Hannes Wyss

Good Morning!

i've send u an email with the PDF document that i'm using to make the
tests, do you mean this???

Interesting - this is the very first PDF-Document I've seen that uses
ASCII85 Encoding.

A simple ASCII85 Decoder, anyone?

Andrea: you'll have to give me some time on this one - I'll get back
to you with a patch...

Cheers
Hannes
 

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
474,274
Messages
2,571,365
Members
48,049
Latest member
robinsonkoff

Latest Threads

Top