用Perl解析PDF

3020阅读 0评论2013-04-19 CUTianrui007
分类:PERL

PDF模块可以从 下载安装,推荐使用PPM方式,这个方式可以安装相关联的所有模块,
use strict;
use CAM::PDF;
use CAM::PDF::PageText;
my $OFHandle;

open($OFHandle,">a.txt") or die $!;

my $PDF=CAM::PDF->new("a.pdf")||die $!;
my $num=$PDF->numPages();
for my $content (1..$num)
{
 
    my $dimension=$PDF->getPageDimensions($content);
    print "***"*3,"\n";
    print "$dimension\n";
    #print $str,"\n";
}

上一篇:用Perl解析CANTrace文件
下一篇:使用Perl和VC通信