Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Converting PDF file to text

by cerian (Novice)
on May 11, 2017 at 18:27 UTC ( [id://1190089]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Text::FromAny;
    
    ...
    my $obj      = Text::FromAny->new(file => $pdf_file);
    my $text     = $obj->text;    
    print $text;
    
  2. or download this
    use CAM::PDF;
    
    ...
    my $txt      = $obj->getPageText(1);
    CAM::PDF->asciify(\$txt);       # same results without this statement.
    print $txt;
    
  3. or download this
    use CAM::PDF;
    use CAM::PDF::PageText;
    ...
    my $txt      = CAM::PDF::PageText->render($tree);
    CAM::PDF->asciify(\$txt);       # same results without this statement.
    print $txt;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1190089]
Approved by talexb
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-26 09:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found