2011-04-05 99 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