Check that Apache user has write permission to that file.
Executing ImageMagick from php. Trying to convert first pdf page to png
-
14-07-2023 - |
Вопрос
I have the following code:
$input = "C:/wamp/www/lnu/components/com_djclassifieds/images/item/input.pdf";
$output = "C:/wamp/www/lnu/components/com_djclassifieds/images/item/output.png";
exec("C:\Program Files\ImageMagick-6.8.9-Q16\convert -density 400 {$input}[0] -resize 25% {$output}");
I also tried exec('C:\Program Files\ImageMagick-6.8.9-Q16\convert -density 400 "'.$input.'"[0] -resize 25% "'.$output.'"');
, and it does not work.
I think this should work because in my command line I type: C:\Program Files\ImageMagick-6.8.9-Q16>convert -density 400 "c:/test.pdf"[0] -resize 25% "c:/out.png"
, and it works.
Any advise?
Решение
Не связан с StackOverflow