Table of contents
Open Table of contents
Installation pdftoppm
To use the pdftoppm
command-line tool, you need to first install pdftoppm
which is a part of the poppler / poppler-utils / poppler-tools package. Install this package as follows depending on your Linux distribution
On Debian
sudo apt install poppler-utils
On RHEL/CentOS & Fedora
sudo dnf install poppler-utils
On Arch Linux
sudo pacman -S poppler
Convert
PDF Document to Image
pdftoppm -<image_format> <pdf_filename> <image_name>
Installation Imagemagick
(image to pdf)
On Debian
sudo apt install imagemagick
On RHEL/CentOS & Fedora
sudo dnf install imagemagick
Read/Write Issue
In that case, all you need is to edit the policy.xml file using an editor like vim.
sudo vim /etc/ImageMagick-6/policy.xml
Look for the line in the following example:
<policy domain="coder" rights="none" pattern="PDF" />
To fix the error, replace the rights from “none” to “read|write”
Convert
To jpg to pdf
convert *.jpg all.pdf