Answer the question
In order to leave comments, you need to log in
How to convert multiple images to one pdf using Imagick?
Hello. How to convert multiple images to 1 pdf using Imagick and is it even possible? I have pictures of each page of a pdf file. Now I want to get back the pdf, but only with the specific pages that I specified in the $pageImages array . $pageImages - an array with paths to the images I need. I implemented it like this, but the output is a pdf with one last page.
$pdf = new Imagick($pageImages);
$pdf->setImageFormat('pdf');
$tempPdf = tempnam(sys_get_temp_dir(), 'printPdf');
file_put_contents($tempPdf, $pdf);
return $tempPdf;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question