Sign inSign up

tryton/document-converter

Sponsored OSS

By Tryton Private Foundation

•Updated 16 days ago

Convert document into various formats

Image
Languages & frameworks
0

6.9K

tryton/document-converter repository overview

⁠Document Converter

The Document Converter image provides an HTTP API to convert Document into other format (ex: OpenDocument to PDF).

⁠Start the service instance

$ docker run -p 8000:8000 -e API_KEY=mysecretkey tryton/document-converter
⁠Environment variables
namedata typedescription
API_KEYstringThe shared secret to access the service
MAX_CONTENT_LENGTHintegerThe maximum content length for the request (default: 200Mb)
MAX_FORM_MEMORY_SIZEintegerThe maximum form field size (default: MAX_CONTENT_LENGTH)

⁠Converting a document

POST /

⁠Headers
nametypedata typedescription
AuthorizationoptionalstringThe API key of the service
⁠Content-Type: multipart/form-data
nametypedata typedescription
documentrequiredfileThe file to convert
formatoptionalstringThe format to convert to (default: pdf)
⁠Responses
HTTP codeContent-Typeresponse
200the mimetype of the requested formatdata
400text/htmlstring
401text/htmlstring
405text/htmlstring
413text/htmlstring
500text/htmlstring
⁠Example cURL
$ curl -X POST -F "document=@/path/document.odt" -F "format=pdf" -H "Authorization: mysecretkey" http://localhost:8000/

Tag summary

Content type

Image

Digest

sha256:c33771aa0…

Size

246.2 MB

Last updated

16 days ago

docker pull tryton/document-converter

This week's pulls

Pulls:

28

Last week