Skip to content

dcoppari/magicspooler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MagicSpooler API

This webservice is intended to be used to convert documents and url to PDF or other formats.

Installation

You can build the image using docker

docker build -t magicspooler .

Running the container

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

Using the API

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

License

MIT

About

Document Converter API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published