I am using FPDI library to merge multiple pdf files into one,
followed this documentaion https://manuals.setasign.com/fpdi-manual/v2/the-fpdi-class/
I have tried like below,
use \setasign\Fpdi\Fpdi;
use \setasign\Fpdi\PdfParser\StreamReader;
function merge()
{
$file = fopen('https://path/to/s3/file','rb');
$pdf = new Fpdi();
$pdf->AddPage();
$pdf->setSourceFile(new StreamReader($file));
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 10, 10, 100);
$pdf->SetFont('Helvetica');
$pdf->SetTextColor(255, 0, 0);
$pdf->SetXY(30, 30);
$pdf->Write(0, 'This is just a simple text');
$pdf->Output();
}
When tried to pass url in streamReader I am getting Given stream is not seekable.
How can I pass s3 file to stream reader and merge it.