I am using imagick with PHP/Windows IIS. I have a simple script that converts a TIF file to PDF an presents it to the browser. It works flawlessly with single page TIF files, but with multiple pages, its only showing the last page.
I understand that it shows the last page by default because the $im variable is an array. Any attempt I make to fix it makes it an invalid PDF. Below is my code. I am new to imagick and any help is appreciated!
$im = new imagick("tmp/tmp.tif");
$im->setImageFormat('pdf');
header('Content-Type: application/pdf');
echo $im;
ImageMagick version ImageMagick 7.0.7-11 Q16 x64 2017-11-23
ImageMagick library version ImageMagick 7.0.7-11 Q16 x64 2017-11-23
(this is very rough testing code, I will clean it up later)