i have installed ImageMagick 6.5.8-Q16
Ghost script and
XAMpp
now i m trying to convert .pdf file to .jpg
code:
<?php
exec("convert inline.pdf inline.jpg") or die("couldn't convert the pdf");
?>
error:
couldn't convert the pdf
i have some more questions like
1.do i need to put this inline.pdf file in Images folder of imagemagick
2.if it is converted from .pdf to .jpg where this .jpg file will be created
3.how to print this .jpg file
can anyone please help me.
converting from .pdf to .jpg
Re: converting from .pdf to .jpg
The path to inline.pdf is relative to the file and so is the output.
To start put inline.pdf in the same folder as the file, run the code and the jpg will be created in the same folder.
I can not remember if you need to install ghostscript first or second.
I do not get the problem but some people have a problem with windows selecting its convert program not the IM one. I beleve you can rename the IM convert program to something like imconvert and use imconvert instead of convert.
Also this post may be helpful: viewtopic.php?f=1&t=15240&p=53702#p53702
To start put inline.pdf in the same folder as the file, run the code and the jpg will be created in the same folder.
I can not remember if you need to install ghostscript first or second.
I do not get the problem but some people have a problem with windows selecting its convert program not the IM one. I beleve you can rename the IM convert program to something like imconvert and use imconvert instead of convert.
Also this post may be helpful: viewtopic.php?f=1&t=15240&p=53702#p53702