mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-08 00:22:14 +01:00
60 lines
2.1 KiB
YAML
60 lines
2.1 KiB
YAML
# The port the application will listen to.
|
|
port: 3000
|
|
|
|
logs:
|
|
# Accepted values, in order of severity: DEBUG, INFO, WARN, ERROR, FATAL, PANIC.
|
|
# Messages at and above the selected level will be logged.
|
|
level: "INFO"
|
|
|
|
# Accepted values: text, json.
|
|
# When a TTY is not attached, the output will be in the defined format.
|
|
formatter: "text"
|
|
|
|
# You don't like a library which is used for a conversion? You want to handle a new file type?
|
|
# You may provide here your own implementation!
|
|
commands:
|
|
|
|
# Some libraries like unoconv cannot perform concurrent conversions. That's why the API does only one conversion at a time.
|
|
# If your current implementation uses libraries which are able to perform concurrent conversions, you may
|
|
# change this value to false.
|
|
lock: true
|
|
|
|
# Unlike others commands' templates, you have access to FilesPaths instead of FilePath: it gathers all PDF files which should be merged.
|
|
merge:
|
|
template: "pdftk {{ range $filePath := .FilesPaths }} {{ $filePath }} {{ end }} cat output {{ .ResultFilePath }}"
|
|
interpreter: "/bin/sh -c"
|
|
timeout: 30
|
|
|
|
# You may add more commands (or less, or even none).
|
|
conversions:
|
|
|
|
# The command template: you have access to FilePath and ResultFilePath variables.
|
|
- template: "markdown-pdf {{ .FilePath }} -o {{ .ResultFilePath }}"
|
|
# The binary which will call the command.
|
|
interpreter: "/bin/sh -c"
|
|
# Duration in seconds after which the command will be killed if it has not finished.
|
|
timeout: 30
|
|
# Files with the following extensions will be converted by the current command.
|
|
extensions:
|
|
- ".md"
|
|
|
|
- template: "xvfb-run -e /dev/stdout wkhtmltopdf {{ .FilePath }} {{ .ResultFilePath }}"
|
|
interpreter: "/bin/sh -c"
|
|
timeout: 30
|
|
extensions:
|
|
- ".html"
|
|
- ".htm"
|
|
|
|
- template: "unoconv --format pdf --output \"{{ .ResultFilePath }}\" \"{{ .FilePath }}\""
|
|
interpreter: "/bin/sh -c"
|
|
timeout: 30
|
|
extensions:
|
|
- ".doc"
|
|
- ".docx"
|
|
- ".odt"
|
|
- ".xls"
|
|
- ".xlsx"
|
|
- ".ods"
|
|
- ".ppt"
|
|
- ".pptx"
|
|
- ".odp" |