php-pdftk Mutlple Files

132 Views Asked by At

I am using php-pdftk to generate pdf files. I am attempting to create multiple pdf's, but this only generates 1 file. Here is an example of what I am doing.

$pdf = new Pdf( 'file1.pdf' );
$pdf->send('test1.pdf');

$pdf2 = new Pdf( file2.pdf' );
$pdf2->send('test2.pdf');

This only outputs test1.pdf and I cannot get it to output both. Does anybody know how to do this? Thanks

1

There are 1 best solutions below

1
On

It is impossible to send more than one file (independent to the file type) in a single HTTP response.

You may try to zip the resulting files and send this instead.