V
V
Vladislav Sofienko2018-06-18 13:34:20
PHP
Vladislav Sofienko, 2018-06-18 13:34:20

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

1 answer(s)
V
Vasya, 2018-06-18
@haramba

https://stackoverflow.com/questions/8955425/how-ca...
Call from php via System()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question