2011-04-05 165 views
1

我试图将PDF转换与http://www.pdf2text.com/download/P2TServerT.zip 我跑“REGSVR32 P2TServer.dll”但是这个代码did'not工作PDF格式转换为文本“无法打开文件pdf”

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

大家可以帮帮我吗?请..

回答

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

感谢克里斯,它的工作。我真的很笨,我想我只用一个“\”。哈哈哈.. – tixtux 2011-04-05 02:48:37

+0

然后接受答案,如果它是正确的和有益的! – p4553d 2011-04-05 09:34:07