Forum


Replies: 7   Views: 5232
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 admin  · 11-04-2013 - 12:12

Hi xox,

You only need to replace in TransformDoc.inc file the following lines:

$fileName = $this->getFileName() . '.pdf';
$domPDF->stream($fileName);

with:

$pdf = $domPDF>output();
file_put_contents("saved_pdf.pdf", $pdf);

Remember to change saved_pdf to file name.

Regards.