title: mpdf output generate error Error detected. PDF file generation aborted: Directive 'allow_url_include' is deprecated
body: <p>I am writing a wordpress plugin and creating a function that generates an invoice and sends it by e-mail.
  There was a problem generating the PDF file. Each attempt to generate a PDF file ends with the error: Error detected. PDF generation aborted: &quot;allow_url_include&quot; directive is deprecated</p>
  <p>My code:</p>
  <pre><code> $defaultConfig = (new Mpdf\Config\ConfigVariables())-&gt;getDefaults();
      $fontDirs = $defaultConfig['fontDir'];
  
      $defaultFontConfig = (new Mpdf\Config\FontVariables())-&gt;getDefaults();
      $fontData = $defaultFontConfig['fontdata'];
      try {
          $mpdf = new \Mpdf\Mpdf([
              'fontDir' =&gt; array_merge($fontDirs, [
                  __DIR__ . '/mpdf2/vendor/mpdf/mpdf/ttfonts',
              ]),
              'fontdata' =&gt; $fontData + [
                      'roboto' =&gt; [
                          'R' =&gt; 'Roboto-Regular.ttf',
                          'B' =&gt; 'Roboto-Bold.ttf',
                      ]
                  ],
              'mode' =&gt; 'UTF-8',
              'format' =&gt; 'A4',
              'default_font_size' =&gt; '12',
              'default_font' =&gt; 'roboto',
              'margin_left' =&gt; 25,
              'margin_top' =&gt; 25,
              'margin_right' =&gt; 25,
              'margin_bottom' =&gt; 25,
              'debug' =&gt; true,
          ]);
          $dir = plugin_dir_path(__DIR__);
          $mpdf-&gt;SetDisplayMode('fullwidth');
          $mpdf-&gt;WriteHTML($html);
          $mpdf-&gt;Output($dir . 'haccp/invoice_pdf/' . $invoice_name, 'F');
      } catch (\Mpdf\MpdfException $e) { // Note: safer fully qualified exception name used for catch
          // Process the exception, log, print etc.
          echo $e-&gt;getMessage();
      }
  </code></pre>