2010-01-29 31 views

回答

1

试用LiveDocx:http://www.phplivedocx.org/2009/02/06/convert-doc-to-pdf-in-php/

$phpLiveDocx = new Zend_Service_LiveDocx_MailMerge(); 

$phpLiveDocx->setUsername('username') 
      ->setPassword('password'); 

$phpLiveDocx->setLocalTemplate('document.doc'); 

// necessary as of LiveDocx 1.2 
$phpLiveDocx->assign('dummyFieldName', 'dummyFieldValue'); 

$phpLiveDocx->createDocument(); 

$document = $phpLiveDocx->retrieveDocument('pdf'); 

file_put_contents('document.pdf', $document); 

unset($phpLiveDocx); 
1

你可以尝试bullzip,他们有通过ActiveX/COM编程接口,该责任是你的一部分,选择的BullZip PDF打印机,并提交转换成PDF文档。

编辑:这是一个link Codeproject上的另一个库代码。这里有另一个名为ITextSharp的库,名为here,使用这个的教程也可以在CodeProject上找到,here,以及另一个source关于如何使用上述库创建一个简单的PDF。

希望这会有所帮助, 最好的问候, 汤姆。

0

如果你了解Perl,检查出jpg2pdf

我不知道这是什么writen中,但不妨一试: Doc2pdf

相关问题