将pdf转换为文本“无法打开文件pdf”

时间:2011-04-05 02:30:13

标签: php pdf text text-files

我尝试使用http://www.pdf2text.com/download/P2TServerT.zip将pdf转换为文字 我运行“regsvr32 P2TServer.dll”但这段代码没有用

<?php
$p2t = new COM("P2TServer.P2T");
$p2t->VerifyLicense("4747457", "345srwr242342423");
$p2t->EngageProcessor(64+32,"5,10,11-15", "");
print $p2t->Convert ("c:\test\test1.pdf", "c:\box\test1.txt");
$p2t = null;
?>

结果如下:

无法打开文件:c:\ test est1.pdfDone!

每个人都可以帮助我吗?请..

1 个答案:

答案 0 :(得分:3)

我对这个特定的库一无所知,但它看起来像你的路径没有被转义。试试这个:

<?php
$p2t = new COM("P2TServer.P2T");
$p2t->VerifyLicense("4747457", "345srwr242342423");
$p2t->EngageProcessor(64+32,"5,10,11-15", "");
print $p2t->Convert ("c:\\test\\test1.pdf", "c:\\box\\test1.txt");
$p2t = null;
?>
相关问题