这样做可以没有像Apose这样的非常昂贵的解决方案吗?这花费的方式比我可能花费的更多。有没有办法将.doc文件转换为像GoDaddy这样的主机上的pdf或jpg文件?
本质上,我需要能够让某人上传文件并保留其格式以通过flex显示它。如果还有其他方法可以做到这一点,我也会很感激这个解决方案。
感谢
这样做可以没有像Apose这样的非常昂贵的解决方案吗?这花费的方式比我可能花费的更多。有没有办法将.doc文件转换为像GoDaddy这样的主机上的pdf或jpg文件?
本质上,我需要能够让某人上传文件并保留其格式以通过flex显示它。如果还有其他方法可以做到这一点,我也会很感激这个解决方案。
感谢
试用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);