Error Convert Jpg to Pdf

Error Convert Jpg to Pdf

There are lots of command in Linux console that we can use to do office things. For example converting jpg to pdf. Many jpg at once to single pdf as pages.

Here is the command

#convert 01.jpg 02.jpg 03.jpg book.pdf

It will result book.pdf with 3 pages. But in my case, there is an error. Display like this :

convert: not authorized `01.pdf' @ error/constitute.c/WriteImage/1028.

I found the solution in this link.

#sudo sed -i 's#<policy domain="coder" rights="none" pattern="PDF" />#<policy domain="coder" rights="read|write" pattern="PDF" />#' /etc/ImageMagick-6/policy.xml

So it seems there is a right problem. The default of the convert program is none. Change it to read|write. The setting is connected to imagemagick as the main library for the convert command.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.