html ページから .pdf を作成するために、クラス htmltodoc を使用しようとしています: http://www.phpkode.com/source/s/html-to-doc-classes/html-to-doc-classes /html_to_doc.inc.php
ライブラリ LiveDocx (Zend を使用): http://srhwd.com/documentation/moodle/_mail_merge_8php_source.html
.doc を作成せずに。これが私のコードです:
$htmltodoc= new HTML_TO_DOC();
$htmltodoc->createDocFromURL("http://www.youtube.com/","google.doc",false);
$mailMerge = new Zend_Service_LiveDocx_MailMerge(
array (
'username' => 'xxxxxxx',
'password' => 'xxxxxxx'
)
);
$mailMerge->setLocalTemplate($htmltodoc);
//$mailMerge->setLocalTemplate('template.doc'); Normally, template.doc is registered on server
$mailMerge->createDocument();
$document = $mailMerge->retrieveDocument('pdf');
header('Content-disposition: attachment; filename=document.pdf');
header('Content-type: application/pdf');
echo $document;
しかし、次のように返されます。
エラー HTTP 500 (内部サーバー エラー)
誰か助けてくれませんか?