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


convert pdf to text "Can not open file pdf"

我试图用 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: est est1.pdfDone!

每个人都可以帮助我吗?

我对那个特定的库一无所知,但在我看来,你的路径并没有逃脱。试试这个:

<?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;
?>