title: Add text in pdf fpdf php
body: <p>My code is:</p>
  <pre><code>require_once('fpdf/fpdf.php');
  require_once('fpdi/autoload.php');
  use setasign\Fpdi\Fpdi;
  use setasign\Fpdi\PdfReader;
  
  $file= 'myfile.pdf';
  $pdf = new Fpdi;
  $pages_count = $pdf-&gt;setSourceFile( $file); 
  
  for($i = 1; $i &lt;= $pages_count; $i++)
  {
          $pdf-&gt;AddPage(); 
          $tplIdx = $pdf-&gt;importPage($i);
          $pdf-&gt;useTemplate($tplIdx, 0, 10, 200);  
          $pdf-&gt;SetFont('Arial'); 
          $pdf-&gt;SetTextColor(137,137,137); 
          $pdf-&gt;SetXY(20, 10); 
          $pdf-&gt;Write(1, $nameUser ); 
  }
  $pdf-&gt;Output('livro-download.pdf', 'I');
  </code></pre>
  <p>on localhost it works perfectly, but in host i get this error</p>
  <pre><code>Fatal error: Uncaught setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException: The xref position points to an incorrect object type.
  in /home/dh_server/fpdi/setasign/fpdi/src/PdfParser/CrossReference/CrossReference.php:264
  Stack trace: #0 /home/dh_server/fpdi/setasign/fpdi/src/PdfParser/CrossReference/CrossReference.php(209):
  setasign\Fpdi\PdfParser\CrossReference\CrossReference-&gt;initReaderInstance(Object(setasign\Fpdi\PdfParser\Type\PdfNumeric))
  #1 /home/dh_server/fpdi/setasign/fpdi/src/PdfParser/CrossReference/CrossReference.php(67): setasign\Fpdi\PdfParser\CrossReference\CrossReference-&gt;readXref(2714)
  #2 /home/dh_server/fpdi/setasign/fpdi/src/PdfParser/PdfParser.php(157): setasign\Fpdi\PdfParser\CrossReference\CrossReference-&gt;__construct(Object(setasign\Fpdi\PdfParser\PdfParser), 0)
  #3 /home/dh_server/fpdi/setasign/fpdi/src/PdfParser/PdfParser.php(205): setasign\Fpdi\PdfParser\PdfParser-&gt;getCrossReference()
  # in /home/dh_server/fpdi/setasign/fpdi/src/PdfParser/CrossReference/CrossReference.php on line 264
  </code></pre>
  <p>PHP version is 7.4 on localhost and hosting</p>
  <p>Is there any library or something that generates this kind of failure?</p>