title: How to set encoding in PHP FPDI library
body: <p>How to set UTF-8 encoding in php library named FPDI?
  Here's library: <a href="https://www.setasign.com/products/fpdi/manual/" rel="nofollow noreferrer">https://www.setasign.com/products/fpdi/manual/</a></p>
  <p>The code:</p>
  <pre><code>$pdf = new Fpdi();
  $pdf-&gt;AddPage();
  $pdf-&gt;setSourceFile('PdfDocument.pdf');
  $tplIdx = $pdf-&gt;importPage(1);
   
  $pdf-&gt;useTemplate($tplIdx, 10, 10, 100);
  
  $pdf-&gt;SetFont('Helvetica');
  $pdf-&gt;SetTextColor(255, 0, 0);
  $pdf-&gt;SetXY(30, 30);
  $pdf-&gt;Write(0, 'Zażółcić gęślą jaźń');
  
  $pdf-&gt;Output();
  </code></pre>