Uses libreoffice to convert from any document (txt, doc, docx, xls, xlsx, rtf, jpg, ...) to pdf
Dirty and ugly wrapper
- Run service
docker build -t goconvpdf .
docker run -p 8080:8080 --rm --mount type=tmpfs,destination=/tmpfs goconvpdfUsing --mount type=tmpfs,destination=/tmpfs is optional: it provides ramdisk instead of HDD and might be slightly faster for large files.
- Send your file via curl or custom HTTP call:
curl -XPOST localhost:8080 -H "Content-Type: multipart/form-data" -F fileName=@routers.go --output res.pdfres.pdf - is your converted file