Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: PDF decoding in Perl

by Arik123 (Sexton)
on Mar 08, 2017 at 09:42 UTC ( #1183933=note: print w/replies, xml ) Need Help??


in reply to PDF decoding in Perl

Thanks, monk! You've been tremendously helpful! I now do something like:

use CAM::PDF; use Encode "from_to"; my $pdf = CAM::PDF->new('myfile.pdf'); for ($pdf->getFormFieldList) { my $val = $pdf->getFormField($_)->{value}{value}{V}{value}; if ($val =~ /^\x{fe}\x{ff}/) {from_to ($val,"UTF-16BE", "utf8")} print "$_ => $val\n"; }

and it works perfectly!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1183933]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2020-12-03 14:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (56 votes). Check out past polls.

    Notices?