我使用的是从CAM :: PDF中提取PDF并将其打印到文本中的getpdftext.pl,但在我的web应用程序中,我想调用这个getpdftext.pl内部的.cgi脚本。你能建议我该怎么做或如何继续前进。我试图将getpdftext.pl转换为getpdftext.cgi,但它不起作用。如何在.cgi脚本中调用.pl文件
感谢所有
这是从我的request_admin.cgi脚本中提取
my $filename = $q->param('quote');
:
:
:
&parsePdf($filename);
#function to extract text from pdf ,save it in a text file and parse the required fields
sub parsePdf($)
{
my $i;
print $_[0];
$filein = "quote_uploads/$_[0]";
$fileout = 'output.txt';
print "inside parsePdf\n";
open OUT, ">$fileout" or die "error: $!";
open IN, '-|', "getpdftext.pl $filein" or die "error :$!" ;
while(<IN>)
{
print "$i";
$i++;
print OUT;
}
}
您的意思是'打开“ - |”,“perl的getpdftext.pl $ filein“或死”错误:$!“;'? – 2011-10-12 04:15:20
yes jack ..i指的是“perl getdpftext.pl $ filein” – sandyutd
我收到以下错误:权限在/request_admin.cgi行301, line 414.,referer http://abc.com/adminForm.html Line 301:打开OUT,“> $ fileout”或死掉“error:$!”; –
sandyutd