title: Given stream is not seekable In FPDI
body: <p>I am using FPDI library to merge multiple pdf files into one, </p>
  
  <p>followed this documentaion <a href="https://manuals.setasign.com/fpdi-manual/v2/the-fpdi-class/" rel="nofollow noreferrer">https://manuals.setasign.com/fpdi-manual/v2/the-fpdi-class/</a></p>
  
  <p>I have tried like below,</p>
  
  <pre><code>use \setasign\Fpdi\Fpdi;
  use \setasign\Fpdi\PdfParser\StreamReader;
  function merge()
  {
      $file = fopen('https://path/to/s3/file','rb');
      $pdf = new Fpdi();
      $pdf-&gt;AddPage();
      $pdf-&gt;setSourceFile(new  StreamReader($file));
      $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, 'This is just a simple text');
      $pdf-&gt;Output();
  }
  </code></pre>
  
  <p>When tried to pass url in streamReader I am getting <strong>Given stream is not seekable</strong>.</p>
  
  <p>How can I pass s3 file to stream reader and merge it.</p>