This webservice is intended to be used to convert documents and url to PDF or other formats.
You can build the image using docker
docker build -t magicspooler .
docker run --rm -p "5000:5000" magicspooler
Protect the API with Basic Auth
docker run --rm -p "5000:5000" -e MAGICSPOOLER_USER=hackerman -e MAGICSPOOLER_PASSWORD=h4ckm3 magicspooler
Use Chrome to make a PDF
curl -u 'hackerman:h4ckm3' -X GET 'http://localhost:5000/chrome/pdf' -d 'url=https://www.google.com' --output document.pdf
Use Chrome to make a PNG
curl -u 'hackerman:h4ckm3' -X GET 'http://localhost:5000/chrome/image' -d 'url=https://www.google.com' --output document.png
Use LibreOffice to make a PDF
curl -u 'hackerman:h4ckm3' -X POST 'http://localhost:5000/libreoffice/pdf' -F 'file=@/home/hackerman/document.odt' --output document.pdf