title: Fatal error: Out of memory (allocated 1982857216) (tried to allocate 43 bytes) in tcpdf
body: <p>I am trying to export pdf using <strong>tcpdf</strong>. While doing that I got error:</p>
  
  <blockquote>
    <p>Fatal error: Out of memory (allocated 1982857216) (tried to allocate 43 bytes) in </p>
  </blockquote>
  
  <p>So I tried (got from SO)</p>
  
  <pre><code>set_time_limit(0);
  ini_set('memory_limit', '-1');
  </code></pre>
  
  <p>But the same error still exist there.. </p>
  
  <p>I can't edit the <code>php.ini</code> file.</p>
  
  <p>How can I fix this?</p>
  
  <p>My <strong>tcpdf</strong> version is  <strong>4.6.011</strong></p>