title: replace a text in PDF with current design, PHP
body: <p>We are trying to replace a text in PDF, But when we are doing this our current design is removed, Like page background color and images. Is there any free PHP library available which maintain current design and replace text or string from current PDF?</p>
  
  <p>UPDATE:-</p>
  
  <p>As helper suggest we can use TCPDF, We are using this but text is not replacing.</p>
  
  <p>Here is our code:-</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;&lt;html lang="en"&gt;
  &lt;head&gt;&lt;meta http-equiv="Content-Type" content="charset=UTF-8"&gt;&lt;/head&gt;
  &lt;?php
  require_once('tcpdf/tcpdf.php');
  $pdf_content = file_get_contents("a.pdf");
  echo $pdf_content;
  $put = str_replace('HARRY', 'Ankur', $pdf_content);
  file_put_contents('test.pdf', $put);
  ?&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>echo $pdf_content output is something like this</p>
  
  <pre><code> X/ �7�B�P�z}�����Ha�%z�p�i�ڵ}�~��vH;��Nh��.��ѣ�=W�Ӈ�����XEq�ی�����F���{�����k��&gt;�&gt;�=I�J�������tSw��~�~�&gt;H�߬Q�U�M�C��ь�]���%�P̚,��fe��M٫�W��4ΐH���ܦ�ɩ6�&gt;�����w
  </code></pre>