title: How to use Mpdf library with PHPword. How can I generate .docx file to .pdf file
body: <p>I have a problem. When I try to generate the word.docx file to pdfFile.pdf file on Laravel (PHP), using the library <strong><a href="https://github.com/mccarlosen/laravel-mpdf" rel="nofollow noreferrer">mPDF</a></strong> I got this error:</p>
  <blockquote>
  <p>PDF rendering library or library path has not been defined.</p>
  </blockquote>
  <p>I can't found the solution. Help me please. Thank you in advance.</p>
  <p><strong>My code in PHP controller file:</strong></p>
  <pre class="lang-php prettyprint-override"><code>public function wordToPdf(){
      $domPdfPath = base_path('vendor/mpdf/mpdf');
      \PhpOffice\PhpWord\Settings::setPdfRendererPath($domPdfPath);
      \PhpOffice\PhpWord\Settings::setPdfRendererName('mPDF');
      
      //Load word file
      $Content = \PhpOffice\PhpWord\IOFactory::load(public_path( '/uploads/word/no12.docx'));
      
      //Save it into PDF
      $PDFWriter = \PhpOffice\PhpWord\IOFactory::createWriter($Content,'PDF');
      $PDFWriter-&gt;save(public_path( '/uploads/word/result3.pdf'));
      return $PDFWriter;
  }
  </code></pre>
  <p>Help me please if anyone know it..?</p>