Open VassilisPallas opened 4 years ago
I removed the restriction with the command
sudo sed -i 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/g' /etc/ImageMagick-6/policy.xml
but know the image is blank [43]. Also the convert doesn't work if the density is not given.
const pdfImage = new PDFImage(file, {
combinedImage: true,
convertOptions: {
'-resize': '200x200',
'-quality': '75',
'-density': '800',
},
});
I am also having this issue. Any luck?
This isn't an issue with this tool, rather an issue with the environment where it's being run.
As far as the image being blank, i would need a replicable test case to investigate.
It runs inside a docker image which is using ubuntu
as base image. The pdf file is just a file inside /tmp
. I have already provided to you the code I'm using. In saveTemp
you can use fs
to store the file.
Sorry, the code above does not run, nor is there a Dockerfile to build it. If you'd like help with this, I'd be happy to help, but I need a fully replicable test case first.
sudo sed -i 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/g' /etc/ImageMagick-6/policy.xml
This fixed my problem, thanks alot
Environment: Node: 10 Os: ubuntu:18.04 (docker)