Forum


Replies: 7   Views: 5225
Saving pdf
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by xox  · 11-04-2013 - 12:12

It Doesn't work, all I get is
[quote]Fatal error: Call to undefined function output() in C:\phpdocx\classes\TransformDoc.inc on line 280[/quote]

[code] /**
* Convert DOCX to PDF, using dompdf. DOCX->XHTML->PDF
*
* @access public
*/
public function generatePDF()
{
$this->generateXHTML();
$this->cleanXHTML();
try {
$domPDF = new DOMPDF();
$domPDF->load_html($this->_xhtml);
$domPDF->render();
[b]$pdf = $domPDF>output();[/b]
file_put_contents(”trytosave.pdf”, $pdf);
}
catch (Exception $err) {
echo 'Unable to generate PDF file. ';
echo $err;
}
}[/code]

Line is 280 is marked with bold.