有没有办法转换。doc文件的pdf格式或jpg主机上像编码?
题
和可以这样做没有一个真正昂贵的方案喜欢Apose?费用的方式比我更可能花费。
基本上我需要的是能够让人上载文档和保留其格式,显示它通过弯曲。如果有另一种方式做到这一点,我会很感激的解决方案。
感谢
解决方案
试试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);
不隶属于 StackOverflow