Ilyes-El-Majouti / pdftopic

Built for Node.js, this package empowers users to effortlessly convert PDF files into images of exceptional quality, supporting multiple formats including PNG, JPG, GIF, and others. Its streamlined functionality ensures a smooth and reliable conversion process, providing users with the flexibility to obtain top-notch images from their PDF documents
Apache License 2.0
27 stars 7 forks source link

ImageMagick Error (Resolved) #3

Closed bug249286 closed 9 months ago

bug249286 commented 1 year ago

Docker FROM node:16-slim

Error Message: Ignore the error in ImageMagick.: convert-im6.q16: attempt to perform an operation not allowed by the security policyPDF' @ error/constitute.c/IsCoderAuthorized/408. convert-im6.q16: no images defined png:-' @ error/convert.c/ConvertImageCommand/3258.

how to fix. Thanks.

bug249286 commented 1 year ago

Resolved


# Open the file 
sudo nano /etc/ImageMagick-6/policy.xml

# find and edit the line
<policy domain="coder" rights="none" pattern="PDF" />
# to :
<policy domain="coder" rights="read|write" pattern="PDF" />

ref : https://askubuntu.com/questions/1127260/imagemagick-convert-not-allowed

Ilyes-El-Majouti commented 1 year ago

Thank you for the report and the solution don't forget to drop a star on the project it will make me happy