Ceci est une ancienne révision du document !
imageMagik convert pdf to jpg :
convert monfichier.pdf %d.jpg
ou
convert -density 400 file.pdf -scale 2000×1000 hi-res%d.jpg
Pour les options voir la doc: http://www.imagemagick.org/script/comma … ptions.php
sudo apt install imagemagick Install ImageMagick
Once it is installed, You can convert your pdf files to images with the following command.
convert sample.pdf output_image.jpg Convert PDF to PNG using imagemagick
You can see that PDF file conversions are not authorized by policy. If you get this output, go to the Imagemagick policy XML file with the following command.
sudo nano /etc/ImageMagick-6/policy.xml You will see the following code snippet at the end of the file.
Code à modifier
<!– disable ghostscript format types –>
<policy domain=“coder” rights=“none” pattern=“PS” /> <policy domain=“coder” rights=“none” pattern=“PS2” /> <policy domain=“coder” rights=“none” pattern=“PS3” /> <policy domain=“coder” rights=“none” pattern=“EPS” /> <policy domain=“coder” rights=“none” pattern=“PDF” /> <policy domain=“coder” rights=“none” pattern=“XPS” />
Comment it out in the following format.
<!– code –>