Forum


Replies: 10   Views: 229
Using dompdf with the native conversion plugin
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 Damian Rousseau  · 28-10-2024 - 10:38

Hello.

I meet a problem with Dompdf when i try to transform docx to pdf.

First i create docx form template, then i replace variable by word fragment and text, save it to .docx.

Than i wanted to transform it to pdf before download it by the users :

// Here PDF => Barryvdh\DomPDF\Facade::class

$dompdf = new PDF();
$transform = new \Phpdocx\Transform\TransformDocAdvNative();
$transform->transformDocument(public_path('contrats').'/contrat_formate.docx', public_path('contrats').'/contrat_formate_pdf.pdf', array('dompdf' => $dompdf));

But i meet this error :

Undefined property: Barryvdh\DomPDF\Facade\Pdf::$version

Thanks for the help !