Cam::PDF question

L

LtCommander

Hi all,

I am using the CAM::pDF module to extract text from PDF files. (It's an
AMAZING module!!) You can pretty much do everything with it.

My snippet for extracting text from a PDF file is:

$pdf = CAM::pDF->new($Fil);
$page = $pdf->getPageText($Pg);

This works fine for all pages without any graphics. I am able to print
the contents of $page without any problems whatsoever. However, if a
particular page has some sort of an inline graphic, the $page returns
an empty value!

I was wondering:
- If somebody knows how to remove all the graphics from the $pdf object
before running the next line of code. I think that should fix it and no
longer return any empty string.

I've tried searching plenty but no luck so far!

Would be grateful for your help.

Vince
 
G

Greger

LtCommander said:
Hi all,

I am using the CAM::pDF module to extract text from PDF files. (It's an
AMAZING module!!) You can pretty much do everything with it.

My snippet for extracting text from a PDF file is:

$pdf = CAM::pDF->new($Fil);
$page = $pdf->getPageText($Pg);

This works fine for all pages without any graphics. I am able to print
the contents of $page without any problems whatsoever. However, if a
particular page has some sort of an inline graphic, the $page returns
an empty value!

I was wondering:
- If somebody knows how to remove all the graphics from the $pdf object
before running the next line of code. I think that should fix it and no
longer return any empty string.

I've tried searching plenty but no luck so far!

Would be grateful for your help.

Vince
use PDF::API, available from cpan.

(I also tried CAM::pDF some while ago but pdf::api is better.)
 
B

Brian Wakem

Greger said:
use PDF::API, available from cpan.

(I also tried CAM::pDF some while ago but pdf::api is better.)


I've always shelled out to pdftotext, I'll have a look at PDF::API too.
 
L

LtCommander

Actually, I was pretty disappointed with PDF::API2 because it doesn't
even opent that PDF file! At least, CAM PDF returns nothing in the
pages with graphics. It opens other files though, but has trouble
opening the ones with graphics!
 

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,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top