title: Using chinese characters in FDPI
body: <p>I have a pdf template that I write English letters on it and it works fine.</p>
  <pre><code>$fontPath = public_path('fonts/');
  define('FPDF_FONTPATH', $fontPath);
  
  $pdf = new Fpdi();
  $template = public_path('template.pdf');
  $pdf-&gt;setSourceFile($template);
  
  $pdf-&gt;AddFont('NotoSans-Regular');
  $pdf-&gt;SetFont('NotoSans-Regular', '', 9);
  
  $pdf-&gt;Write(2, &quot;This is working&quot;);
  </code></pre>
  <ul>
  <li>I downloaded <a href="https://www.google.com/get/noto/" rel="nofollow noreferrer">Noto Sans CJK SC</a> because it supports Chinese</li>
  <li>I went to <a href="http://www.fpdf.org/makefont/" rel="nofollow noreferrer">http://www.fpdf.org/makefont/</a> to convert the NotoSans-Regular (with encoding <code>cp1252</code>).</li>
  </ul>
  <hr />
  <p>Now I am trying to write Chinese letters too, but I have been facing problems.</p>
  <ul>
  <li>If I try  <code>$pdf-&gt;Write(2, &quot;This is working&quot;);</code> it shows me:</li>
  </ul>
  <p><a href="https://i.stack.imgur.com/KsKbG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KsKbG.png" alt="enter image description here" /></a></p>
  <ul>
  <li>If I try <code>$pdf-&gt;Write(2, iconv('UTF-8', 'UCS-4BE', '我的名字是约翰'));</code> it shows me:</li>
  </ul>
  <p><a href="https://i.stack.imgur.com/xhaH0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xhaH0.png" alt="enter image description here" /></a></p>
  <p>What am I doing wrong? How can I wake the Chinese text work with FDPI?</p>
  <p>I have seen some people doing it with FDPF but I couldn't figure out how to do it in FDPI.</p>