{
  "openapi": "3.1.0",
  "info": {
    "title": "Marqius Kern",
    "version": "8.40.0",
    "summary": "Gotenberg-compatible document conversion on the marqius engine",
    "description": "Marqius Kern converts documents to PDF and works on PDFs, answering Gotenberg's API: 8.40.0's, and 9.10.3's beside it on the same server.\n\n## Getting started\n\nMarqius Kern listens on port 3000. If you are reading this from a running server, it is ready: every operation's samples call `http://localhost:3000` (put your server's address in its place). They are POSIX shell (macOS, Linux, WSL) and make their own inputs, so each one runs as printed.\n\nYour first PDF:\n\n    printf '<!doctype html><html><body><h1>Hello</h1></body></html>' > index.html\n    curl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o hello.pdf\n\nWith no server at hand, `marqius-kern run` answers one request the same way, taking curl's form flags as they are:\n\n    marqius-kern run /forms/chromium/convert/html -F files=@index.html -o hello.pdf\n\n## What comes back\n\nA file (a PDF, a picture, several as a ZIP) or JSON, with 200. A request that cannot be answered gets 4xx or 5xx and a plain-text message, in Gotenberg's words. Every answer carries the `Gotenberg-Trace` header, which finds the request in the server's log; `X-Marqius-Kern-Note` says what Marqius Kern did that you may want to know.\n\n## Gotenberg 8 and 9\n\nEach request is answered in one of the two APIs. A `/forms/pdf/` route, or a field only Gotenberg 9 reads (`stages`, `paperSize`, the `native...` names), makes it 9.x's; otherwise it is 8.x's, as Gotenberg 8.40.0 answers it. A server started with `--kern-api=8` or `--kern-api=9` answers one alone, and its document describes that one.\n\n## Reading this document\n\nEach operation and field says whose API it is (`x-kern-api`: `gotenberg-8.40.0`, `gotenberg-9.10.3`, or `kern` for Marqius Kern's own, which change nothing unless a request uses them), and each field what Marqius Kern does with it (`x-kern-effect`: `honoured`; `checked` for a field Marqius Kern reads and checks, a wrong value refused in Gotenberg's words, but which changes nothing in its answer, as it tunes only Chromium or LibreOffice or the route does not use it; `noted` for one that does nothing on that route, which Marqius Kern says in its X-Marqius-Kern-Note header). The samples are each operation's `x-codeSamples`. The version is the API's, as `GET /version` answers it.",
    "contact": {
      "name": "marqius",
      "url": "https://marqius.com",
      "email": "hello@marqius.com"
    },
    "license": {
      "name": "Proprietary: the Marqius Kern licence",
      "identifier": "LicenseRef-marqius-kern"
    }
  },
  "servers": [
    {
      "url": "{scheme}://{host}:{port}",
      "description": "Your Marqius Kern server",
      "variables": {
        "scheme": {
          "enum": [
            "http",
            "https"
          ],
          "default": "http",
          "description": "https where a proxy in front serves it"
        },
        "host": {
          "default": "localhost",
          "description": "Where the server runs"
        },
        "port": {
          "default": "3000",
          "description": "--api-port: Gotenberg's port unless set"
        }
      }
    }
  ],
  "security": [
    {},
    {
      "basicAuth": []
    }
  ],
  "tags": [
    {
      "name": "Chromium",
      "description": "HTML, web pages and Markdown to PDF or to pictures, laid out as Chromium prints them."
    },
    {
      "name": "LibreOffice",
      "description": "Office documents (Word, Excel, PowerPoint, OpenDocument, RTF, CSV, text) to PDF, laid out as LibreOffice prints them."
    },
    {
      "name": "PDF engines",
      "description": "Gotenberg 8's PDF tools: merge, split, rotate, protect, stamp, PDF/A, Factur-X, metadata and bookmarks."
    },
    {
      "name": "PDF (Gotenberg 9)",
      "description": "Gotenberg 9's PDF routes: one operation each, or several in order with pipe."
    },
    {
      "name": "Marqius Kern",
      "description": "Marqius Kern's own routes: emails to PDF, scans made searchable, any document as Markdown, and this document."
    },
    {
      "name": "System",
      "description": "The server's own: whether it is up, its version, its metrics."
    }
  ],
  "paths": {
    "/": {
      "get": {
        "operationId": "root",
        "summary": "Root",
        "description": "Gotenberg's root sentence, word for word.",
        "tags": [
          "System"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "responses": {
          "200": {
            "description": "HTML.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl http://localhost:3000/"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nr = requests.get(\"http://localhost:3000/\")\nr.raise_for_status()\nprint(r.text)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { writeFile } from \"node:fs/promises\";\n\n{\n  const res = await fetch(\"http://localhost:3000/\");\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  console.log(await res.text());\n}"
          }
        ]
      },
      "head": {
        "operationId": "rootHead",
        "summary": "Root",
        "description": "Gotenberg's root sentence, word for word.",
        "tags": [
          "System"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "responses": {
          "200": {
            "description": "HTML.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Health",
        "description": "Whether the server is up: {\"status\":\"up\",\"details\":{...}}. Never behind authentication.",
        "tags": [
          "System"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                },
                "example": {
                  "details": {
                    "chromium": {
                      "status": "up",
                      "timestamp": "2026-11-30T16:49:15.315Z"
                    },
                    "libreoffice": {
                      "status": "up",
                      "timestamp": "2026-11-30T16:49:15.315Z"
                    }
                  },
                  "status": "up"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl http://localhost:3000/health"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nr = requests.get(\"http://localhost:3000/health\")\nr.raise_for_status()\nprint(r.text)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { writeFile } from \"node:fs/promises\";\n\n{\n  const res = await fetch(\"http://localhost:3000/health\");\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  console.log(await res.text());\n}"
          }
        ]
      },
      "head": {
        "operationId": "healthHead",
        "summary": "Health",
        "description": "Whether the server is up: {\"status\":\"up\",\"details\":{...}}. Never behind authentication.",
        "tags": [
          "System"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                },
                "example": {
                  "details": {
                    "chromium": {
                      "status": "up",
                      "timestamp": "2026-11-30T16:49:15.315Z"
                    },
                    "libreoffice": {
                      "status": "up",
                      "timestamp": "2026-11-30T16:49:15.315Z"
                    }
                  },
                  "status": "up"
                }
              }
            }
          }
        }
      }
    },
    "/version": {
      "get": {
        "operationId": "version",
        "summary": "Version",
        "description": "The version of Gotenberg's API answered: 8.40.0 (the Gotenberg-Version header says the same, X-Marqius-Kern names Marqius Kern's own).",
        "tags": [
          "System"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "responses": {
          "200": {
            "description": "Plain text.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "\"8.40.0\""
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl http://localhost:3000/version"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nr = requests.get(\"http://localhost:3000/version\")\nr.raise_for_status()\nprint(r.text)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { writeFile } from \"node:fs/promises\";\n\n{\n  const res = await fetch(\"http://localhost:3000/version\");\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  console.log(await res.text());\n}"
          }
        ]
      },
      "head": {
        "operationId": "versionHead",
        "summary": "Version",
        "description": "The version of Gotenberg's API answered: 8.40.0 (the Gotenberg-Version header says the same, X-Marqius-Kern names Marqius Kern's own).",
        "tags": [
          "System"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "responses": {
          "200": {
            "description": "Plain text.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "\"8.40.0\""
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          }
        }
      }
    },
    "/prometheus/metrics": {
      "get": {
        "operationId": "metrics",
        "summary": "Metrics",
        "description": "The server's metrics in Prometheus's text format, named under --prometheus-namespace (gotenberg): the queues, and the conversions and their times. --prometheus-metrics-path moves the route. Off with `--prometheus-disable-collect`.",
        "tags": [
          "System"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "responses": {
          "200": {
            "description": "Plain text.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--prometheus-disable-collect",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl http://localhost:3000/prometheus/metrics"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nr = requests.get(\"http://localhost:3000/prometheus/metrics\")\nr.raise_for_status()\nprint(r.text)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { writeFile } from \"node:fs/promises\";\n\n{\n  const res = await fetch(\"http://localhost:3000/prometheus/metrics\");\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  console.log(await res.text());\n}"
          }
        ]
      },
      "head": {
        "operationId": "metricsHead",
        "summary": "Metrics",
        "description": "The server's metrics in Prometheus's text format, named under --prometheus-namespace (gotenberg): the queues, and the conversions and their times. --prometheus-metrics-path moves the route. Off with `--prometheus-disable-collect`.",
        "tags": [
          "System"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "responses": {
          "200": {
            "description": "Plain text.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--prometheus-disable-collect"
      }
    },
    "/debug": {
      "get": {
        "operationId": "debug",
        "summary": "Debug",
        "description": "The server's version, settings and modules as JSON, as Gotenberg's debug route gives them. Answered only with --api-enable-debug-route.",
        "tags": [
          "System"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "# (a server started with --api-enable-debug-route)\ncurl http://localhost:3000/debug"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\n# (a server started with --api-enable-debug-route)\n\nr = requests.get(\"http://localhost:3000/debug\")\nr.raise_for_status()\nprint(r.text)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { writeFile } from \"node:fs/promises\";\n\n// (a server started with --api-enable-debug-route)\n\n{\n  const res = await fetch(\"http://localhost:3000/debug\");\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  console.log(await res.text());\n}"
          }
        ]
      },
      "head": {
        "operationId": "debugHead",
        "summary": "Debug",
        "description": "The server's version, settings and modules as JSON, as Gotenberg's debug route gives them. Answered only with --api-enable-debug-route.",
        "tags": [
          "System"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          }
        }
      }
    },
    "/forms/chromium/convert/html": {
      "post": {
        "operationId": "chromiumConvertHtml",
        "summary": "Convert HTML to PDF",
        "description": "Prints index.html, with the files it names, to PDF, laid out as Chromium prints it. Off with `--chromium-disable-routes`.",
        "tags": [
          "Chromium"
        ],
        "x-kern-api": [
          "gotenberg-8.40.0",
          "gotenberg-9.10.3"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "index.html and the files it names (stylesheets, pictures, fonts, scripts), each by its name alone. header.html and footer.html are printed in the top and bottom margins of every page (classes date, title, url, pageNumber and totalPages take those values); Marqius Kern's own header-first.html and footer-first.html stand in for them on the first page (an empty one: none there).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "skipNetworkIdleEvent": {
                    "type": "boolean",
                    "description": "Prints without waiting for the network to go idle. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "skipNetworkAlmostIdleEvent": {
                    "type": "boolean",
                    "description": "Prints without waiting for the network to go almost idle. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "failOnHttpStatusCodes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when the page itself answers one of these statuses: 499 stands for 400 to 499, 599 for 500 to 599.\n\nDefault: `[499,599]`.",
                    "examples": [
                      "[499,599]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnResourceHttpStatusCodes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when a file the page loads (a picture, a stylesheet, a script) answers one of these statuses; ranges as for failOnHttpStatusCodes.",
                    "examples": [
                      "[499,599]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "ignoreResourceHttpStatusDomains": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Domains, their subdomains included, that failOnResourceHttpStatusCodes leaves out: [\"sentry-cdn.com\"].",
                    "examples": [
                      "[\"example.com\"]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnResourceLoadingFailed": {
                    "type": "boolean",
                    "description": "Answers 409 when a file the page loads cannot be fetched at all.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnConsoleExceptions": {
                    "type": "boolean",
                    "description": "Answers 409 when the page's script throws an exception.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnConsoleMessageTypes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when the page writes one of these console types: log, debug, info, warning, error or assert.",
                    "examples": [
                      "[\"error\"]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitDelay": {
                    "type": "string",
                    "description": "Waits this long once the page has loaded, before printing: 500ms, 2s.",
                    "pattern": "^([0-9]+(\\.[0-9]+)?(ns|us|ms|s|m|h))+$",
                    "examples": [
                      "1ms"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitForExpression": {
                    "type": "string",
                    "description": "Waits until this JavaScript expression is true, such as `window.ready === true`.",
                    "examples": [
                      "true"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitForSelector": {
                    "type": "string",
                    "description": "Waits until an element matching this CSS selector is on the page, such as `#chart.ready`.",
                    "examples": [
                      "body"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "cookies": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Cookies to set before the page loads: objects with a `name`, a `value` and a `domain`, and optionally a `path`, `secure`, `httpOnly` and `sameSite` (Strict, Lax or None).",
                    "examples": [
                      "[{\"name\":\"a\",\"value\":\"b\",\"domain\":\"example.com\"}]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "userAgent": {
                    "type": "string",
                    "description": "The User-Agent header the page's requests send.",
                    "examples": [
                      "kern-tests"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "extraHttpHeaders": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Headers the page's requests send: {\"X-Token\": \"abc\"}. A value ending in `;scope=<regex>` is sent only to the addresses the regex matches.",
                    "examples": [
                      "{\"X-Test\":\"1\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "emulatedMediaType": {
                    "type": "string",
                    "enum": [
                      "print",
                      "screen"
                    ],
                    "description": "The CSS media type the page is laid out for.\n\nDefault: `print`.",
                    "default": "print",
                    "examples": [
                      "print"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "emulatedMediaFeatures": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "CSS media features the page sees: {\"prefers-color-scheme\": \"dark\"}.",
                    "examples": [
                      "{\"prefers-color-scheme\":\"light\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "omitBackground": {
                    "type": "boolean",
                    "description": "Leaves out the white background, for a transparent page or picture; a PDF needs printBackground too.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "landscape": {
                    "type": "boolean",
                    "description": "Prints the page on its side.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "printBackground": {
                    "type": "boolean",
                    "description": "Prints the page's backgrounds; without it only what the page marks `print-color-adjust: exact` keeps them, as in Chromium.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "scale": {
                    "type": "number",
                    "description": "Draws the content this many times as big, from 0.1 to 2.\n\nDefault: `1.0`.",
                    "minimum": 0.1,
                    "maximum": 2.0,
                    "examples": [
                      "1.0"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "singlePage": {
                    "type": "boolean",
                    "description": "Prints the whole content on one page, as tall as the content.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "paperWidth": {
                    "type": "string",
                    "description": "The paper's width: inches, or a number with a unit (210mm, 21cm, 595pt, 794px).\n\nDefault: `8.5`.",
                    "default": "8.5",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "8.5"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "paperHeight": {
                    "type": "string",
                    "description": "The paper's height.\n\nDefault: `11`.",
                    "default": "11",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "11"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "marginTop": {
                    "type": "string",
                    "description": "The top margin; header.html prints in it.\n\nDefault: `0.39`.",
                    "default": "0.39",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "0.39"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "marginBottom": {
                    "type": "string",
                    "description": "The bottom margin; footer.html prints in it.\n\nDefault: `0.39`.",
                    "default": "0.39",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "0.39"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "marginLeft": {
                    "type": "string",
                    "description": "The left margin.\n\nDefault: `0.39`.",
                    "default": "0.39",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "0.39"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "marginRight": {
                    "type": "string",
                    "description": "The right margin.\n\nDefault: `0.39`.",
                    "default": "0.39",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "0.39"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "preferCssPageSize": {
                    "type": "boolean",
                    "description": "Gives the page's own CSS @page size priority over paperWidth and paperHeight. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "generateDocumentOutline": {
                    "type": "boolean",
                    "description": "Makes bookmarks from the page's headings.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "generateTaggedPdf": {
                    "type": "boolean",
                    "description": "Makes a tagged PDF, whose structure screen readers follow.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "nativePageRanges": {
                    "type": "string",
                    "description": "The pages to print, in Chromium's syntax: 1-5, 8, 11-13.",
                    "examples": [
                      "1"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitMode": {
                    "type": "string",
                    "enum": [
                      "intervals",
                      "pages"
                    ],
                    "description": "Splits the PDF: `intervals` into parts of splitSpan pages, `pages` into the pages splitSpan names. Several parts are answered as a ZIP.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitSpan": {
                    "type": "string",
                    "description": "The pages of each part: a number of pages for intervals, page ranges (1-3, 5) for pages.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitUnify": {
                    "type": "boolean",
                    "description": "With splitMode pages: the pages chosen in one PDF instead of one PDF each.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "metadata": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "The PDF's metadata to write: {\"Author\": \"…\", \"Title\": \"…\", \"Keywords\": [\"…\"]}.",
                    "examples": [
                      "{\"Title\":\"Marqius Kern\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "flatten": {
                    "type": "boolean",
                    "description": "Turns form fields and annotations into the page's own drawing.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "userPassword": {
                    "type": "string",
                    "description": "The password that opens the PDF.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "ownerPassword": {
                    "type": "string",
                    "description": "The password that lifts the PDF's restrictions.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowPrinting": {
                    "type": "boolean",
                    "description": "With a password: printing allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowModifying": {
                    "type": "boolean",
                    "description": "With a password: changes allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowCopying": {
                    "type": "boolean",
                    "description": "With a password: copying text and pictures allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAnnotating": {
                    "type": "boolean",
                    "description": "With a password: comments allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowFillingForms": {
                    "type": "boolean",
                    "description": "With a password: filling in forms allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAssembling": {
                    "type": "boolean",
                    "description": "With a password: inserting, rotating and deleting pages allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stamp": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A picture or a PDF drawn over the pages (stampSource image or pdf).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the stamp is: text (stampExpression), or the picture or PDF sent as `stamp`.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampExpression": {
                    "type": "string",
                    "description": "The stamp's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampPages": {
                    "type": "string",
                    "description": "The pages stamped: 1-3, 5; all when not given.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the stamp is drawn: {\"font\": \"Helvetica\", \"fontSize\": 24, \"color\": \"#ff0000\", \"opacity\": 0.5, \"rotation\": 45, \"position\": \"center\"}.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermark": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A picture or a PDF drawn under the pages' content (watermarkSource image or pdf).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the watermark is: text (watermarkExpression), or the picture or PDF sent as `watermark`.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkExpression": {
                    "type": "string",
                    "description": "The watermark's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkPages": {
                    "type": "string",
                    "description": "The pages watermarked: 1-3, 5; all when not given.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the watermark is drawn, as for stampOptions.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotateAngle": {
                    "type": "string",
                    "enum": [
                      "90",
                      "180",
                      "270"
                    ],
                    "description": "Turns the pages by this angle, clockwise.",
                    "examples": [
                      "90"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotatePages": {
                    "type": "string",
                    "description": "With rotateAngle: the pages turned: 1-3, 5; all when not given.",
                    "examples": [
                      "1"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "optimizeImages": {
                    "type": "boolean",
                    "description": "Packs the pictures again as JPEG, for a smaller file.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "imageQuality": {
                    "type": "integer",
                    "description": "With optimizeImages: the JPEG quality, from 1 to 100.",
                    "minimum": 1,
                    "maximum": 100,
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcr": {
                    "type": "string",
                    "enum": [
                      "true",
                      "false",
                      "auto"
                    ],
                    "description": "true (or auto): the pages that need it (scans: little text and a large picture) are read and laid over with hidden text, so the PDF can be searched and copied; the pages look as they did. The summary is in the X-Marqius-Kern-Ocr header.\n\nDefault: `false`.",
                    "default": "false",
                    "examples": [
                      "false"
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrEngine": {
                    "type": "string",
                    "description": "The engine that reads: Marqius Kern's own (the server's --kern-ocr-engine unless sent: ppocr-v6-tiny; ppocr-v6-small reads more accurately), tesseract, a folder added with `marqius-kern ocr add`, or an OCR server's name (--kern-ocr-server).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrLanguages": {
                    "type": "string",
                    "description": "The languages or scripts on the pages, comma-separated (ara, heb, hi, korean...): the default engine is swapped for Marqius Kern's engine that reads them.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrPages": {
                    "type": "string",
                    "description": "The pages to read if they need it: 1-3,5, even, odd, !1; all unless sent.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrOptional": {
                    "type": "boolean",
                    "description": "When OCR cannot run (no engine, a model not fetched yet), the file is answered as it is, with a note, instead of an error.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "pdfa": {
                    "type": "string",
                    "enum": [
                      "PDF/A-1b",
                      "PDF/A-2b",
                      "PDF/A-3b"
                    ],
                    "description": "Makes the PDF this PDF/A level, for archiving.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "pdfua": {
                    "type": "boolean",
                    "description": "Makes the PDF accessible (PDF/UA).\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "embeds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "Files carried inside the PDF as attachments.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "embedsMetadata": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "For each file carried inside, by its name: {\"invoice.xml\": {\"mimeType\": \"text/xml\", \"relationship\": \"Data\"}}.",
                    "examples": [
                      "{\"note.txt\":{\"mimeType\":\"text/plain\"}}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxXml": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A Factur-X or ZUGFeRD invoice's XML: the PDF is made an e-invoice carrying it (PDF/A-3b).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxVersion": {
                    "type": "string",
                    "description": "The Factur-X version written in the PDF's metadata.\n\nDefault: `1.0`.",
                    "default": "1.0",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxConformanceLevel": {
                    "type": "string",
                    "enum": [
                      "MINIMUM",
                      "BASIC WL",
                      "BASIC",
                      "EN 16931",
                      "EXTENDED",
                      "XRECHNUNG"
                    ],
                    "description": "The invoice XML's profile, when the XML does not say it.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxDocumentType": {
                    "type": "string",
                    "enum": [
                      "INVOICE",
                      "ORDER",
                      "ORDER_RESPONSE",
                      "ORDER_CHANGE"
                    ],
                    "description": "What the XML is.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernBookFeatures": {
                    "type": "boolean",
                    "description": "Prints what Chromium does not know: running headers (string-set, position: running()), page numbers in contents and cross-references (target-counter), leaders, footnotes (the server's --kern-book-features unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernFitHeaderFooter": {
                    "type": "boolean",
                    "description": "A header.html or footer.html taller than its margin moves the page's text away rather than covering it (the server's --kern-fit-header-footer unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernContents": {
                    "type": "boolean",
                    "description": "A contents page at the front: the headings, each a link, with their page numbers.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernContentsDepth": {
                    "type": "integer",
                    "description": "With kernContents: the heading levels listed, 1 to 6.\n\nDefault: `3`.",
                    "default": 3,
                    "minimum": 1,
                    "maximum": 6,
                    "examples": [
                      3
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernContentsTitle": {
                    "type": "string",
                    "description": "With kernContents: the contents page's title.\n\nDefault: `Contents`.",
                    "default": "Contents",
                    "examples": [
                      "Contents"
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernFirstPageNumber": {
                    "type": "integer",
                    "description": "The number the first page is given; the rest count on from it.\n\nDefault: `1`.",
                    "default": 1,
                    "examples": [
                      1
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernFontReport": {
                    "type": "boolean",
                    "description": "Says in the X-Marqius-Kern-Fonts header which fonts each conversion used, their files, and what stood in for what (the server's --kern-font-report unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernRequireFonts": {
                    "type": "string",
                    "description": "Families this request must have, comma-separated: a conversion that cannot have one is refused (409) instead of printed in another font.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "stages": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Operations run on the PDFs in order, each with its options as /forms/pdf's routes take them: a JSON array such as [{\"op\":\"set-metadata\",\"title\":\"Report\"},{\"op\":\"encrypt\",\"userPassword\":\"open\"}].",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "paperSize": {
                    "type": "string",
                    "description": "A paper by name, such as A4 or Letter, in place of paperWidth and paperHeight.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativePages": {
                    "type": "string",
                    "description": "The pages to print, in Chromium's syntax (1-5, 8, 11-13): Gotenberg 9's name for nativePageRanges.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativeBookmarks": {
                    "type": "boolean",
                    "description": "Makes bookmarks from the page's headings: Gotenberg 9's name for generateDocumentOutline.\n\nDefault: `false`.",
                    "default": false,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativeTaggedPdf": {
                    "type": "boolean",
                    "description": "Makes a tagged PDF: Gotenberg 9's name for generateTaggedPdf.\n\nDefault: `false`.",
                    "default": false,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "waitForWindowStatus": {
                    "type": "string",
                    "description": "Waits until the page sets window.status to this value, before printing.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              },
              "encoding": {
                "stampSource": {
                  "explode": true
                },
                "stampExpression": {
                  "explode": true
                },
                "stampPages": {
                  "explode": true
                },
                "stampOptions": {
                  "explode": true
                },
                "watermarkSource": {
                  "explode": true
                },
                "watermarkExpression": {
                  "explode": true
                },
                "watermarkPages": {
                  "explode": true
                },
                "watermarkOptions": {
                  "explode": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "403": {
            "$ref": "#/components/responses/Status403"
          },
          "409": {
            "$ref": "#/components/responses/Status409"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--chromium-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o hello.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o hello.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"hello.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"hello.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          },
          {
            "lang": "Shell",
            "label": "curl (Gotenberg 9's fields)",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -F paperSize=A4 -F 'stages=[{\"op\":\"set-metadata\",\"title\":\"Hello\"}]' -o hello-a4.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run (Gotenberg 9's fields), no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -F paperSize=A4 -F 'stages=[{\"op\":\"set-metadata\",\"title\":\"Hello\"}]' -o hello-a4.pdf"
          },
          {
            "lang": "Python",
            "label": "Python (Gotenberg 9's fields)",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n    (\"paperSize\", (None, \"A4\")),\n    (\"stages\", (None, \"[{\\\"op\\\":\\\"set-metadata\\\",\\\"title\\\":\\\"Hello\\\"}]\")),\n])\nr.raise_for_status()\nwith open(\"hello-a4.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript (Gotenberg 9's fields)",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  form.append(\"paperSize\", \"A4\");\n  form.append(\"stages\", \"[{\\\"op\\\":\\\"set-metadata\\\",\\\"title\\\":\\\"Hello\\\"}]\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"hello-a4.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/chromium/convert/url": {
      "post": {
        "operationId": "chromiumConvertUrl",
        "summary": "Convert a web page to PDF",
        "description": "Prints the page at a web address to PDF, laid out as Chromium prints it. Off with `--chromium-disable-routes`.",
        "tags": [
          "Chromium"
        ],
        "x-kern-api": [
          "gotenberg-8.40.0",
          "gotenberg-9.10.3"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "The address of the page to print: http or https.",
                    "format": "uri",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "header.html and footer.html, and the files they name; Marqius Kern's own header-first.html and footer-first.html stand in for them on the first page.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "skipNetworkIdleEvent": {
                    "type": "boolean",
                    "description": "Prints without waiting for the network to go idle. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "skipNetworkAlmostIdleEvent": {
                    "type": "boolean",
                    "description": "Prints without waiting for the network to go almost idle. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "failOnHttpStatusCodes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when the page itself answers one of these statuses: 499 stands for 400 to 499, 599 for 500 to 599.\n\nDefault: `[499,599]`.",
                    "examples": [
                      "[499,599]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnResourceHttpStatusCodes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when a file the page loads (a picture, a stylesheet, a script) answers one of these statuses; ranges as for failOnHttpStatusCodes.",
                    "examples": [
                      "[499,599]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "ignoreResourceHttpStatusDomains": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Domains, their subdomains included, that failOnResourceHttpStatusCodes leaves out: [\"sentry-cdn.com\"].",
                    "examples": [
                      "[\"example.com\"]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnResourceLoadingFailed": {
                    "type": "boolean",
                    "description": "Answers 409 when a file the page loads cannot be fetched at all.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnConsoleExceptions": {
                    "type": "boolean",
                    "description": "Answers 409 when the page's script throws an exception.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnConsoleMessageTypes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when the page writes one of these console types: log, debug, info, warning, error or assert.",
                    "examples": [
                      "[\"error\"]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitDelay": {
                    "type": "string",
                    "description": "Waits this long once the page has loaded, before printing: 500ms, 2s.",
                    "pattern": "^([0-9]+(\\.[0-9]+)?(ns|us|ms|s|m|h))+$",
                    "examples": [
                      "1ms"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitForExpression": {
                    "type": "string",
                    "description": "Waits until this JavaScript expression is true, such as `window.ready === true`.",
                    "examples": [
                      "true"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitForSelector": {
                    "type": "string",
                    "description": "Waits until an element matching this CSS selector is on the page, such as `#chart.ready`.",
                    "examples": [
                      "body"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "cookies": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Cookies to set before the page loads: objects with a `name`, a `value` and a `domain`, and optionally a `path`, `secure`, `httpOnly` and `sameSite` (Strict, Lax or None).",
                    "examples": [
                      "[{\"name\":\"a\",\"value\":\"b\",\"domain\":\"example.com\"}]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "userAgent": {
                    "type": "string",
                    "description": "The User-Agent header the page's requests send.",
                    "examples": [
                      "kern-tests"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "extraHttpHeaders": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Headers the page's requests send: {\"X-Token\": \"abc\"}. A value ending in `;scope=<regex>` is sent only to the addresses the regex matches.",
                    "examples": [
                      "{\"X-Test\":\"1\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "emulatedMediaType": {
                    "type": "string",
                    "enum": [
                      "print",
                      "screen"
                    ],
                    "description": "The CSS media type the page is laid out for.\n\nDefault: `print`.",
                    "default": "print",
                    "examples": [
                      "print"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "emulatedMediaFeatures": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "CSS media features the page sees: {\"prefers-color-scheme\": \"dark\"}.",
                    "examples": [
                      "{\"prefers-color-scheme\":\"light\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "omitBackground": {
                    "type": "boolean",
                    "description": "Leaves out the white background, for a transparent page or picture; a PDF needs printBackground too.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "landscape": {
                    "type": "boolean",
                    "description": "Prints the page on its side.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "printBackground": {
                    "type": "boolean",
                    "description": "Prints the page's backgrounds; without it only what the page marks `print-color-adjust: exact` keeps them, as in Chromium.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "scale": {
                    "type": "number",
                    "description": "Draws the content this many times as big, from 0.1 to 2.\n\nDefault: `1.0`.",
                    "minimum": 0.1,
                    "maximum": 2.0,
                    "examples": [
                      "1.0"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "singlePage": {
                    "type": "boolean",
                    "description": "Prints the whole content on one page, as tall as the content.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "paperWidth": {
                    "type": "string",
                    "description": "The paper's width: inches, or a number with a unit (210mm, 21cm, 595pt, 794px).\n\nDefault: `8.5`.",
                    "default": "8.5",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "8.5"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "paperHeight": {
                    "type": "string",
                    "description": "The paper's height.\n\nDefault: `11`.",
                    "default": "11",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "11"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "marginTop": {
                    "type": "string",
                    "description": "The top margin; header.html prints in it.\n\nDefault: `0.39`.",
                    "default": "0.39",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "0.39"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "marginBottom": {
                    "type": "string",
                    "description": "The bottom margin; footer.html prints in it.\n\nDefault: `0.39`.",
                    "default": "0.39",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "0.39"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "marginLeft": {
                    "type": "string",
                    "description": "The left margin.\n\nDefault: `0.39`.",
                    "default": "0.39",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "0.39"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "marginRight": {
                    "type": "string",
                    "description": "The right margin.\n\nDefault: `0.39`.",
                    "default": "0.39",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "0.39"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "preferCssPageSize": {
                    "type": "boolean",
                    "description": "Gives the page's own CSS @page size priority over paperWidth and paperHeight. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "generateDocumentOutline": {
                    "type": "boolean",
                    "description": "Makes bookmarks from the page's headings.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "generateTaggedPdf": {
                    "type": "boolean",
                    "description": "Makes a tagged PDF, whose structure screen readers follow.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "nativePageRanges": {
                    "type": "string",
                    "description": "The pages to print, in Chromium's syntax: 1-5, 8, 11-13.",
                    "examples": [
                      "1"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitMode": {
                    "type": "string",
                    "enum": [
                      "intervals",
                      "pages"
                    ],
                    "description": "Splits the PDF: `intervals` into parts of splitSpan pages, `pages` into the pages splitSpan names. Several parts are answered as a ZIP.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitSpan": {
                    "type": "string",
                    "description": "The pages of each part: a number of pages for intervals, page ranges (1-3, 5) for pages.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitUnify": {
                    "type": "boolean",
                    "description": "With splitMode pages: the pages chosen in one PDF instead of one PDF each.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "metadata": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "The PDF's metadata to write: {\"Author\": \"…\", \"Title\": \"…\", \"Keywords\": [\"…\"]}.",
                    "examples": [
                      "{\"Title\":\"Marqius Kern\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "flatten": {
                    "type": "boolean",
                    "description": "Turns form fields and annotations into the page's own drawing.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "userPassword": {
                    "type": "string",
                    "description": "The password that opens the PDF.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "ownerPassword": {
                    "type": "string",
                    "description": "The password that lifts the PDF's restrictions.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowPrinting": {
                    "type": "boolean",
                    "description": "With a password: printing allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowModifying": {
                    "type": "boolean",
                    "description": "With a password: changes allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowCopying": {
                    "type": "boolean",
                    "description": "With a password: copying text and pictures allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAnnotating": {
                    "type": "boolean",
                    "description": "With a password: comments allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowFillingForms": {
                    "type": "boolean",
                    "description": "With a password: filling in forms allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAssembling": {
                    "type": "boolean",
                    "description": "With a password: inserting, rotating and deleting pages allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stamp": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A picture or a PDF drawn over the pages (stampSource image or pdf).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the stamp is: text (stampExpression), or the picture or PDF sent as `stamp`.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampExpression": {
                    "type": "string",
                    "description": "The stamp's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampPages": {
                    "type": "string",
                    "description": "The pages stamped: 1-3, 5; all when not given.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the stamp is drawn: {\"font\": \"Helvetica\", \"fontSize\": 24, \"color\": \"#ff0000\", \"opacity\": 0.5, \"rotation\": 45, \"position\": \"center\"}.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermark": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A picture or a PDF drawn under the pages' content (watermarkSource image or pdf).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the watermark is: text (watermarkExpression), or the picture or PDF sent as `watermark`.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkExpression": {
                    "type": "string",
                    "description": "The watermark's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkPages": {
                    "type": "string",
                    "description": "The pages watermarked: 1-3, 5; all when not given.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the watermark is drawn, as for stampOptions.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotateAngle": {
                    "type": "string",
                    "enum": [
                      "90",
                      "180",
                      "270"
                    ],
                    "description": "Turns the pages by this angle, clockwise.",
                    "examples": [
                      "90"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotatePages": {
                    "type": "string",
                    "description": "With rotateAngle: the pages turned: 1-3, 5; all when not given.",
                    "examples": [
                      "1"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "optimizeImages": {
                    "type": "boolean",
                    "description": "Packs the pictures again as JPEG, for a smaller file.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "imageQuality": {
                    "type": "integer",
                    "description": "With optimizeImages: the JPEG quality, from 1 to 100.",
                    "minimum": 1,
                    "maximum": 100,
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcr": {
                    "type": "string",
                    "enum": [
                      "true",
                      "false",
                      "auto"
                    ],
                    "description": "true (or auto): the pages that need it (scans: little text and a large picture) are read and laid over with hidden text, so the PDF can be searched and copied; the pages look as they did. The summary is in the X-Marqius-Kern-Ocr header.\n\nDefault: `false`.",
                    "default": "false",
                    "examples": [
                      "false"
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrEngine": {
                    "type": "string",
                    "description": "The engine that reads: Marqius Kern's own (the server's --kern-ocr-engine unless sent: ppocr-v6-tiny; ppocr-v6-small reads more accurately), tesseract, a folder added with `marqius-kern ocr add`, or an OCR server's name (--kern-ocr-server).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrLanguages": {
                    "type": "string",
                    "description": "The languages or scripts on the pages, comma-separated (ara, heb, hi, korean...): the default engine is swapped for Marqius Kern's engine that reads them.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrPages": {
                    "type": "string",
                    "description": "The pages to read if they need it: 1-3,5, even, odd, !1; all unless sent.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrOptional": {
                    "type": "boolean",
                    "description": "When OCR cannot run (no engine, a model not fetched yet), the file is answered as it is, with a note, instead of an error.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "pdfa": {
                    "type": "string",
                    "enum": [
                      "PDF/A-1b",
                      "PDF/A-2b",
                      "PDF/A-3b"
                    ],
                    "description": "Makes the PDF this PDF/A level, for archiving.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "pdfua": {
                    "type": "boolean",
                    "description": "Makes the PDF accessible (PDF/UA).\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "embeds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "Files carried inside the PDF as attachments.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "embedsMetadata": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "For each file carried inside, by its name: {\"invoice.xml\": {\"mimeType\": \"text/xml\", \"relationship\": \"Data\"}}.",
                    "examples": [
                      "{\"note.txt\":{\"mimeType\":\"text/plain\"}}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxXml": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A Factur-X or ZUGFeRD invoice's XML: the PDF is made an e-invoice carrying it (PDF/A-3b).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxVersion": {
                    "type": "string",
                    "description": "The Factur-X version written in the PDF's metadata.\n\nDefault: `1.0`.",
                    "default": "1.0",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxConformanceLevel": {
                    "type": "string",
                    "enum": [
                      "MINIMUM",
                      "BASIC WL",
                      "BASIC",
                      "EN 16931",
                      "EXTENDED",
                      "XRECHNUNG"
                    ],
                    "description": "The invoice XML's profile, when the XML does not say it.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxDocumentType": {
                    "type": "string",
                    "enum": [
                      "INVOICE",
                      "ORDER",
                      "ORDER_RESPONSE",
                      "ORDER_CHANGE"
                    ],
                    "description": "What the XML is.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernBookFeatures": {
                    "type": "boolean",
                    "description": "Prints what Chromium does not know: running headers (string-set, position: running()), page numbers in contents and cross-references (target-counter), leaders, footnotes (the server's --kern-book-features unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernFitHeaderFooter": {
                    "type": "boolean",
                    "description": "A header.html or footer.html taller than its margin moves the page's text away rather than covering it (the server's --kern-fit-header-footer unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernContents": {
                    "type": "boolean",
                    "description": "A contents page at the front: the headings, each a link, with their page numbers.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernContentsDepth": {
                    "type": "integer",
                    "description": "With kernContents: the heading levels listed, 1 to 6.\n\nDefault: `3`.",
                    "default": 3,
                    "minimum": 1,
                    "maximum": 6,
                    "examples": [
                      3
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernContentsTitle": {
                    "type": "string",
                    "description": "With kernContents: the contents page's title.\n\nDefault: `Contents`.",
                    "default": "Contents",
                    "examples": [
                      "Contents"
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernFirstPageNumber": {
                    "type": "integer",
                    "description": "The number the first page is given; the rest count on from it.\n\nDefault: `1`.",
                    "default": 1,
                    "examples": [
                      1
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernFontReport": {
                    "type": "boolean",
                    "description": "Says in the X-Marqius-Kern-Fonts header which fonts each conversion used, their files, and what stood in for what (the server's --kern-font-report unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernRequireFonts": {
                    "type": "string",
                    "description": "Families this request must have, comma-separated: a conversion that cannot have one is refused (409) instead of printed in another font.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "stages": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Operations run on the PDFs in order, each with its options as /forms/pdf's routes take them: a JSON array such as [{\"op\":\"set-metadata\",\"title\":\"Report\"},{\"op\":\"encrypt\",\"userPassword\":\"open\"}].",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "paperSize": {
                    "type": "string",
                    "description": "A paper by name, such as A4 or Letter, in place of paperWidth and paperHeight.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativePages": {
                    "type": "string",
                    "description": "The pages to print, in Chromium's syntax (1-5, 8, 11-13): Gotenberg 9's name for nativePageRanges.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativeBookmarks": {
                    "type": "boolean",
                    "description": "Makes bookmarks from the page's headings: Gotenberg 9's name for generateDocumentOutline.\n\nDefault: `false`.",
                    "default": false,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativeTaggedPdf": {
                    "type": "boolean",
                    "description": "Makes a tagged PDF: Gotenberg 9's name for generateTaggedPdf.\n\nDefault: `false`.",
                    "default": false,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "waitForWindowStatus": {
                    "type": "string",
                    "description": "Waits until the page sets window.status to this value, before printing.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "url"
                ]
              },
              "encoding": {
                "stampSource": {
                  "explode": true
                },
                "stampExpression": {
                  "explode": true
                },
                "stampPages": {
                  "explode": true
                },
                "stampOptions": {
                  "explode": true
                },
                "watermarkSource": {
                  "explode": true
                },
                "watermarkExpression": {
                  "explode": true
                },
                "watermarkPages": {
                  "explode": true
                },
                "watermarkOptions": {
                  "explode": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "403": {
            "$ref": "#/components/responses/Status403"
          },
          "409": {
            "$ref": "#/components/responses/Status409"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--chromium-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl http://localhost:3000/forms/chromium/convert/url -F url=https://example.com -o example.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "marqius-kern run /forms/chromium/convert/url -F url=https://example.com -o example.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/url\", files=[\n    (\"url\", (None, \"https://example.com\")),\n])\nr.raise_for_status()\nwith open(\"example.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { writeFile } from \"node:fs/promises\";\n\n{\n  const form = new FormData();\n  form.append(\"url\", \"https://example.com\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/url\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"example.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          },
          {
            "lang": "Shell",
            "label": "curl (Gotenberg 9's fields)",
            "source": "curl http://localhost:3000/forms/chromium/convert/url -F url=https://example.com -F paperSize=A4 -o example-a4.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run (Gotenberg 9's fields), no server",
            "source": "marqius-kern run /forms/chromium/convert/url -F url=https://example.com -F paperSize=A4 -o example-a4.pdf"
          },
          {
            "lang": "Python",
            "label": "Python (Gotenberg 9's fields)",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/url\", files=[\n    (\"url\", (None, \"https://example.com\")),\n    (\"paperSize\", (None, \"A4\")),\n])\nr.raise_for_status()\nwith open(\"example-a4.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript (Gotenberg 9's fields)",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { writeFile } from \"node:fs/promises\";\n\n{\n  const form = new FormData();\n  form.append(\"url\", \"https://example.com\");\n  form.append(\"paperSize\", \"A4\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/url\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"example-a4.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/chromium/convert/markdown": {
      "post": {
        "operationId": "chromiumConvertMarkdown",
        "summary": "Convert Markdown to PDF",
        "description": "Prints Markdown files, placed in index.html, to PDF. Off with `--chromium-disable-routes`.",
        "tags": [
          "Chromium"
        ],
        "x-kern-api": [
          "gotenberg-8.40.0",
          "gotenberg-9.10.3"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "index.html, which places each Markdown file with {{ toHTML \"file.md\" }}, the .md files, and the files the page names; header.html and footer.html as on the HTML route.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "skipNetworkIdleEvent": {
                    "type": "boolean",
                    "description": "Prints without waiting for the network to go idle. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "skipNetworkAlmostIdleEvent": {
                    "type": "boolean",
                    "description": "Prints without waiting for the network to go almost idle. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "failOnHttpStatusCodes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when the page itself answers one of these statuses: 499 stands for 400 to 499, 599 for 500 to 599.\n\nDefault: `[499,599]`.",
                    "examples": [
                      "[499,599]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnResourceHttpStatusCodes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when a file the page loads (a picture, a stylesheet, a script) answers one of these statuses; ranges as for failOnHttpStatusCodes.",
                    "examples": [
                      "[499,599]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "ignoreResourceHttpStatusDomains": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Domains, their subdomains included, that failOnResourceHttpStatusCodes leaves out: [\"sentry-cdn.com\"].",
                    "examples": [
                      "[\"example.com\"]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnResourceLoadingFailed": {
                    "type": "boolean",
                    "description": "Answers 409 when a file the page loads cannot be fetched at all.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnConsoleExceptions": {
                    "type": "boolean",
                    "description": "Answers 409 when the page's script throws an exception.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnConsoleMessageTypes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when the page writes one of these console types: log, debug, info, warning, error or assert.",
                    "examples": [
                      "[\"error\"]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitDelay": {
                    "type": "string",
                    "description": "Waits this long once the page has loaded, before printing: 500ms, 2s.",
                    "pattern": "^([0-9]+(\\.[0-9]+)?(ns|us|ms|s|m|h))+$",
                    "examples": [
                      "1ms"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitForExpression": {
                    "type": "string",
                    "description": "Waits until this JavaScript expression is true, such as `window.ready === true`.",
                    "examples": [
                      "true"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitForSelector": {
                    "type": "string",
                    "description": "Waits until an element matching this CSS selector is on the page, such as `#chart.ready`.",
                    "examples": [
                      "body"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "cookies": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Cookies to set before the page loads: objects with a `name`, a `value` and a `domain`, and optionally a `path`, `secure`, `httpOnly` and `sameSite` (Strict, Lax or None).",
                    "examples": [
                      "[{\"name\":\"a\",\"value\":\"b\",\"domain\":\"example.com\"}]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "userAgent": {
                    "type": "string",
                    "description": "The User-Agent header the page's requests send.",
                    "examples": [
                      "kern-tests"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "extraHttpHeaders": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Headers the page's requests send: {\"X-Token\": \"abc\"}. A value ending in `;scope=<regex>` is sent only to the addresses the regex matches.",
                    "examples": [
                      "{\"X-Test\":\"1\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "emulatedMediaType": {
                    "type": "string",
                    "enum": [
                      "print",
                      "screen"
                    ],
                    "description": "The CSS media type the page is laid out for.\n\nDefault: `print`.",
                    "default": "print",
                    "examples": [
                      "print"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "emulatedMediaFeatures": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "CSS media features the page sees: {\"prefers-color-scheme\": \"dark\"}.",
                    "examples": [
                      "{\"prefers-color-scheme\":\"light\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "omitBackground": {
                    "type": "boolean",
                    "description": "Leaves out the white background, for a transparent page or picture; a PDF needs printBackground too.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "landscape": {
                    "type": "boolean",
                    "description": "Prints the page on its side.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "printBackground": {
                    "type": "boolean",
                    "description": "Prints the page's backgrounds; without it only what the page marks `print-color-adjust: exact` keeps them, as in Chromium.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "scale": {
                    "type": "number",
                    "description": "Draws the content this many times as big, from 0.1 to 2.\n\nDefault: `1.0`.",
                    "minimum": 0.1,
                    "maximum": 2.0,
                    "examples": [
                      "1.0"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "singlePage": {
                    "type": "boolean",
                    "description": "Prints the whole content on one page, as tall as the content.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "paperWidth": {
                    "type": "string",
                    "description": "The paper's width: inches, or a number with a unit (210mm, 21cm, 595pt, 794px).\n\nDefault: `8.5`.",
                    "default": "8.5",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "8.5"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "paperHeight": {
                    "type": "string",
                    "description": "The paper's height.\n\nDefault: `11`.",
                    "default": "11",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "11"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "marginTop": {
                    "type": "string",
                    "description": "The top margin; header.html prints in it.\n\nDefault: `0.39`.",
                    "default": "0.39",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "0.39"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "marginBottom": {
                    "type": "string",
                    "description": "The bottom margin; footer.html prints in it.\n\nDefault: `0.39`.",
                    "default": "0.39",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "0.39"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "marginLeft": {
                    "type": "string",
                    "description": "The left margin.\n\nDefault: `0.39`.",
                    "default": "0.39",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "0.39"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "marginRight": {
                    "type": "string",
                    "description": "The right margin.\n\nDefault: `0.39`.",
                    "default": "0.39",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "examples": [
                      "0.39"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "preferCssPageSize": {
                    "type": "boolean",
                    "description": "Gives the page's own CSS @page size priority over paperWidth and paperHeight. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "generateDocumentOutline": {
                    "type": "boolean",
                    "description": "Makes bookmarks from the page's headings.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "generateTaggedPdf": {
                    "type": "boolean",
                    "description": "Makes a tagged PDF, whose structure screen readers follow.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "nativePageRanges": {
                    "type": "string",
                    "description": "The pages to print, in Chromium's syntax: 1-5, 8, 11-13.",
                    "examples": [
                      "1"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitMode": {
                    "type": "string",
                    "enum": [
                      "intervals",
                      "pages"
                    ],
                    "description": "Splits the PDF: `intervals` into parts of splitSpan pages, `pages` into the pages splitSpan names. Several parts are answered as a ZIP.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitSpan": {
                    "type": "string",
                    "description": "The pages of each part: a number of pages for intervals, page ranges (1-3, 5) for pages.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitUnify": {
                    "type": "boolean",
                    "description": "With splitMode pages: the pages chosen in one PDF instead of one PDF each.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "metadata": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "The PDF's metadata to write: {\"Author\": \"…\", \"Title\": \"…\", \"Keywords\": [\"…\"]}.",
                    "examples": [
                      "{\"Title\":\"Marqius Kern\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "flatten": {
                    "type": "boolean",
                    "description": "Turns form fields and annotations into the page's own drawing.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "userPassword": {
                    "type": "string",
                    "description": "The password that opens the PDF.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "ownerPassword": {
                    "type": "string",
                    "description": "The password that lifts the PDF's restrictions.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowPrinting": {
                    "type": "boolean",
                    "description": "With a password: printing allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowModifying": {
                    "type": "boolean",
                    "description": "With a password: changes allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowCopying": {
                    "type": "boolean",
                    "description": "With a password: copying text and pictures allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAnnotating": {
                    "type": "boolean",
                    "description": "With a password: comments allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowFillingForms": {
                    "type": "boolean",
                    "description": "With a password: filling in forms allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAssembling": {
                    "type": "boolean",
                    "description": "With a password: inserting, rotating and deleting pages allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stamp": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A picture or a PDF drawn over the pages (stampSource image or pdf).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the stamp is: text (stampExpression), or the picture or PDF sent as `stamp`.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampExpression": {
                    "type": "string",
                    "description": "The stamp's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampPages": {
                    "type": "string",
                    "description": "The pages stamped: 1-3, 5; all when not given.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the stamp is drawn: {\"font\": \"Helvetica\", \"fontSize\": 24, \"color\": \"#ff0000\", \"opacity\": 0.5, \"rotation\": 45, \"position\": \"center\"}.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermark": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A picture or a PDF drawn under the pages' content (watermarkSource image or pdf).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the watermark is: text (watermarkExpression), or the picture or PDF sent as `watermark`.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkExpression": {
                    "type": "string",
                    "description": "The watermark's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkPages": {
                    "type": "string",
                    "description": "The pages watermarked: 1-3, 5; all when not given.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the watermark is drawn, as for stampOptions.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotateAngle": {
                    "type": "string",
                    "enum": [
                      "90",
                      "180",
                      "270"
                    ],
                    "description": "Turns the pages by this angle, clockwise.",
                    "examples": [
                      "90"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotatePages": {
                    "type": "string",
                    "description": "With rotateAngle: the pages turned: 1-3, 5; all when not given.",
                    "examples": [
                      "1"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "optimizeImages": {
                    "type": "boolean",
                    "description": "Packs the pictures again as JPEG, for a smaller file.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "imageQuality": {
                    "type": "integer",
                    "description": "With optimizeImages: the JPEG quality, from 1 to 100.",
                    "minimum": 1,
                    "maximum": 100,
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcr": {
                    "type": "string",
                    "enum": [
                      "true",
                      "false",
                      "auto"
                    ],
                    "description": "true (or auto): the pages that need it (scans: little text and a large picture) are read and laid over with hidden text, so the PDF can be searched and copied; the pages look as they did. The summary is in the X-Marqius-Kern-Ocr header.\n\nDefault: `false`.",
                    "default": "false",
                    "examples": [
                      "false"
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrEngine": {
                    "type": "string",
                    "description": "The engine that reads: Marqius Kern's own (the server's --kern-ocr-engine unless sent: ppocr-v6-tiny; ppocr-v6-small reads more accurately), tesseract, a folder added with `marqius-kern ocr add`, or an OCR server's name (--kern-ocr-server).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrLanguages": {
                    "type": "string",
                    "description": "The languages or scripts on the pages, comma-separated (ara, heb, hi, korean...): the default engine is swapped for Marqius Kern's engine that reads them.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrPages": {
                    "type": "string",
                    "description": "The pages to read if they need it: 1-3,5, even, odd, !1; all unless sent.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrOptional": {
                    "type": "boolean",
                    "description": "When OCR cannot run (no engine, a model not fetched yet), the file is answered as it is, with a note, instead of an error.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "pdfa": {
                    "type": "string",
                    "enum": [
                      "PDF/A-1b",
                      "PDF/A-2b",
                      "PDF/A-3b"
                    ],
                    "description": "Makes the PDF this PDF/A level, for archiving.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "pdfua": {
                    "type": "boolean",
                    "description": "Makes the PDF accessible (PDF/UA).\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "embeds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "Files carried inside the PDF as attachments.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "embedsMetadata": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "For each file carried inside, by its name: {\"invoice.xml\": {\"mimeType\": \"text/xml\", \"relationship\": \"Data\"}}.",
                    "examples": [
                      "{\"note.txt\":{\"mimeType\":\"text/plain\"}}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxXml": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A Factur-X or ZUGFeRD invoice's XML: the PDF is made an e-invoice carrying it (PDF/A-3b).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxVersion": {
                    "type": "string",
                    "description": "The Factur-X version written in the PDF's metadata.\n\nDefault: `1.0`.",
                    "default": "1.0",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxConformanceLevel": {
                    "type": "string",
                    "enum": [
                      "MINIMUM",
                      "BASIC WL",
                      "BASIC",
                      "EN 16931",
                      "EXTENDED",
                      "XRECHNUNG"
                    ],
                    "description": "The invoice XML's profile, when the XML does not say it.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxDocumentType": {
                    "type": "string",
                    "enum": [
                      "INVOICE",
                      "ORDER",
                      "ORDER_RESPONSE",
                      "ORDER_CHANGE"
                    ],
                    "description": "What the XML is.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernBookFeatures": {
                    "type": "boolean",
                    "description": "Prints what Chromium does not know: running headers (string-set, position: running()), page numbers in contents and cross-references (target-counter), leaders, footnotes (the server's --kern-book-features unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernFitHeaderFooter": {
                    "type": "boolean",
                    "description": "A header.html or footer.html taller than its margin moves the page's text away rather than covering it (the server's --kern-fit-header-footer unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernContents": {
                    "type": "boolean",
                    "description": "A contents page at the front: the headings, each a link, with their page numbers.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernContentsDepth": {
                    "type": "integer",
                    "description": "With kernContents: the heading levels listed, 1 to 6.\n\nDefault: `3`.",
                    "default": 3,
                    "minimum": 1,
                    "maximum": 6,
                    "examples": [
                      3
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernContentsTitle": {
                    "type": "string",
                    "description": "With kernContents: the contents page's title.\n\nDefault: `Contents`.",
                    "default": "Contents",
                    "examples": [
                      "Contents"
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernFirstPageNumber": {
                    "type": "integer",
                    "description": "The number the first page is given; the rest count on from it.\n\nDefault: `1`.",
                    "default": 1,
                    "examples": [
                      1
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernFontReport": {
                    "type": "boolean",
                    "description": "Says in the X-Marqius-Kern-Fonts header which fonts each conversion used, their files, and what stood in for what (the server's --kern-font-report unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernRequireFonts": {
                    "type": "string",
                    "description": "Families this request must have, comma-separated: a conversion that cannot have one is refused (409) instead of printed in another font.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "stages": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Operations run on the PDFs in order, each with its options as /forms/pdf's routes take them: a JSON array such as [{\"op\":\"set-metadata\",\"title\":\"Report\"},{\"op\":\"encrypt\",\"userPassword\":\"open\"}].",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "paperSize": {
                    "type": "string",
                    "description": "A paper by name, such as A4 or Letter, in place of paperWidth and paperHeight.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativePages": {
                    "type": "string",
                    "description": "The pages to print, in Chromium's syntax (1-5, 8, 11-13): Gotenberg 9's name for nativePageRanges.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativeBookmarks": {
                    "type": "boolean",
                    "description": "Makes bookmarks from the page's headings: Gotenberg 9's name for generateDocumentOutline.\n\nDefault: `false`.",
                    "default": false,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativeTaggedPdf": {
                    "type": "boolean",
                    "description": "Makes a tagged PDF: Gotenberg 9's name for generateTaggedPdf.\n\nDefault: `false`.",
                    "default": false,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "waitForWindowStatus": {
                    "type": "string",
                    "description": "Waits until the page sets window.status to this value, before printing.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              },
              "encoding": {
                "stampSource": {
                  "explode": true
                },
                "stampExpression": {
                  "explode": true
                },
                "stampPages": {
                  "explode": true
                },
                "stampOptions": {
                  "explode": true
                },
                "watermarkSource": {
                  "explode": true
                },
                "watermarkExpression": {
                  "explode": true
                },
                "watermarkPages": {
                  "explode": true
                },
                "watermarkOptions": {
                  "explode": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "403": {
            "$ref": "#/components/responses/Status403"
          },
          "409": {
            "$ref": "#/components/responses/Status409"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--chromium-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body>{{ toHTML \"notes.md\" }}</body></html>' > index.html\nprintf '# Notes\\n\\n- Agreed on Monday\\n- Ships on Friday\\n' > notes.md\ncurl http://localhost:3000/forms/chromium/convert/markdown -F files=@index.html -F files=@notes.md -o notes.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body>{{ toHTML \"notes.md\" }}</body></html>' > index.html\nprintf '# Notes\\n\\n- Agreed on Monday\\n- Ships on Friday\\n' > notes.md\nmarqius-kern run /forms/chromium/convert/markdown -F files=@index.html -F files=@notes.md -o notes.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body>{{ toHTML \\\"notes.md\\\" }}</body></html>\")\n\nwith open(\"notes.md\", \"w\") as f:\n    f.write('''# Notes\n\n- Agreed on Monday\n- Ships on Friday\n''')\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/markdown\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n    (\"files\", (\"notes.md\", open(\"notes.md\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"notes.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body>{{ toHTML \\\"notes.md\\\" }}</body></html>\");\n\nawait writeFile(\"notes.md\", `# Notes\n\n- Agreed on Monday\n- Ships on Friday\n`);\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  form.append(\"files\", new Blob([await readFile(\"notes.md\")]), \"notes.md\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/markdown\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"notes.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          },
          {
            "lang": "Shell",
            "label": "curl (Gotenberg 9's fields)",
            "source": "printf '<!doctype html><html><body>{{ toHTML \"notes.md\" }}</body></html>' > index.html\nprintf '# Notes\\n\\n- Agreed on Monday\\n- Ships on Friday\\n' > notes.md\ncurl http://localhost:3000/forms/chromium/convert/markdown -F files=@index.html -F files=@notes.md -F nativeBookmarks=true -F paperSize=A5 -o notes-a5.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run (Gotenberg 9's fields), no server",
            "source": "printf '<!doctype html><html><body>{{ toHTML \"notes.md\" }}</body></html>' > index.html\nprintf '# Notes\\n\\n- Agreed on Monday\\n- Ships on Friday\\n' > notes.md\nmarqius-kern run /forms/chromium/convert/markdown -F files=@index.html -F files=@notes.md -F nativeBookmarks=true -F paperSize=A5 -o notes-a5.pdf"
          },
          {
            "lang": "Python",
            "label": "Python (Gotenberg 9's fields)",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body>{{ toHTML \\\"notes.md\\\" }}</body></html>\")\n\nwith open(\"notes.md\", \"w\") as f:\n    f.write('''# Notes\n\n- Agreed on Monday\n- Ships on Friday\n''')\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/markdown\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n    (\"files\", (\"notes.md\", open(\"notes.md\", \"rb\"))),\n    (\"nativeBookmarks\", (None, \"true\")),\n    (\"paperSize\", (None, \"A5\")),\n])\nr.raise_for_status()\nwith open(\"notes-a5.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript (Gotenberg 9's fields)",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body>{{ toHTML \\\"notes.md\\\" }}</body></html>\");\n\nawait writeFile(\"notes.md\", `# Notes\n\n- Agreed on Monday\n- Ships on Friday\n`);\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  form.append(\"files\", new Blob([await readFile(\"notes.md\")]), \"notes.md\");\n  form.append(\"nativeBookmarks\", \"true\");\n  form.append(\"paperSize\", \"A5\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/markdown\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"notes-a5.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/chromium/screenshot/html": {
      "post": {
        "operationId": "chromiumScreenshotHtml",
        "summary": "Take a picture of HTML",
        "description": "A picture of index.html, with the files it names. Off with `--chromium-disable-routes`.",
        "tags": [
          "Chromium"
        ],
        "x-kern-api": [
          "gotenberg-8.40.0",
          "gotenberg-9.10.3"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "index.html and the files it names (stylesheets, pictures, fonts, scripts), each by its name alone. header.html and footer.html are printed in the top and bottom margins of every page (classes date, title, url, pageNumber and totalPages take those values); Marqius Kern's own header-first.html and footer-first.html stand in for them on the first page (an empty one: none there).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "skipNetworkIdleEvent": {
                    "type": "boolean",
                    "description": "Prints without waiting for the network to go idle. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "skipNetworkAlmostIdleEvent": {
                    "type": "boolean",
                    "description": "Prints without waiting for the network to go almost idle. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "failOnHttpStatusCodes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when the page itself answers one of these statuses: 499 stands for 400 to 499, 599 for 500 to 599.\n\nDefault: `[499,599]`.",
                    "examples": [
                      "[499,599]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnResourceHttpStatusCodes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when a file the page loads (a picture, a stylesheet, a script) answers one of these statuses; ranges as for failOnHttpStatusCodes.",
                    "examples": [
                      "[499,599]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "ignoreResourceHttpStatusDomains": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Domains, their subdomains included, that failOnResourceHttpStatusCodes leaves out: [\"sentry-cdn.com\"].",
                    "examples": [
                      "[\"example.com\"]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnResourceLoadingFailed": {
                    "type": "boolean",
                    "description": "Answers 409 when a file the page loads cannot be fetched at all.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnConsoleExceptions": {
                    "type": "boolean",
                    "description": "Answers 409 when the page's script throws an exception.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnConsoleMessageTypes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when the page writes one of these console types: log, debug, info, warning, error or assert.",
                    "examples": [
                      "[\"error\"]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitDelay": {
                    "type": "string",
                    "description": "Waits this long once the page has loaded, before printing: 500ms, 2s.",
                    "pattern": "^([0-9]+(\\.[0-9]+)?(ns|us|ms|s|m|h))+$",
                    "examples": [
                      "1ms"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitForExpression": {
                    "type": "string",
                    "description": "Waits until this JavaScript expression is true, such as `window.ready === true`.",
                    "examples": [
                      "true"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitForSelector": {
                    "type": "string",
                    "description": "Waits until an element matching this CSS selector is on the page, such as `#chart.ready`.",
                    "examples": [
                      "body"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "cookies": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Cookies to set before the page loads: objects with a `name`, a `value` and a `domain`, and optionally a `path`, `secure`, `httpOnly` and `sameSite` (Strict, Lax or None).",
                    "examples": [
                      "[{\"name\":\"a\",\"value\":\"b\",\"domain\":\"example.com\"}]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "userAgent": {
                    "type": "string",
                    "description": "The User-Agent header the page's requests send.",
                    "examples": [
                      "kern-tests"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "extraHttpHeaders": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Headers the page's requests send: {\"X-Token\": \"abc\"}. A value ending in `;scope=<regex>` is sent only to the addresses the regex matches.",
                    "examples": [
                      "{\"X-Test\":\"1\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "emulatedMediaType": {
                    "type": "string",
                    "enum": [
                      "print",
                      "screen"
                    ],
                    "description": "The CSS media type the page is laid out for.\n\nDefault: `print`.",
                    "default": "print",
                    "examples": [
                      "print"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "emulatedMediaFeatures": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "CSS media features the page sees: {\"prefers-color-scheme\": \"dark\"}.",
                    "examples": [
                      "{\"prefers-color-scheme\":\"light\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "omitBackground": {
                    "type": "boolean",
                    "description": "Leaves out the white background, for a transparent page or picture; a PDF needs printBackground too.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "width": {
                    "type": "integer",
                    "description": "The window's width in pixels.\n\nDefault: `800`.",
                    "default": 800,
                    "examples": [
                      800
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "height": {
                    "type": "integer",
                    "description": "The window's height in pixels.\n\nDefault: `600`.",
                    "default": 600,
                    "examples": [
                      600
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "clip": {
                    "type": "boolean",
                    "description": "Takes the window alone, not the whole page.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "selector": {
                    "type": "string",
                    "description": "Takes the first element matching this CSS selector alone.",
                    "examples": [
                      "body"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "png",
                      "jpeg",
                      "webp"
                    ],
                    "description": "The picture's format (Marqius Kern's --kern-screenshot-format sets another default for the server).\n\nDefault: `png`.",
                    "default": "png",
                    "examples": [
                      "png"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "quality": {
                    "type": "integer",
                    "description": "JPEG and WebP quality, from 0 to 100.\n\nDefault: `100`.",
                    "default": 100,
                    "minimum": 0,
                    "maximum": 100,
                    "examples": [
                      100
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "optimizeForSpeed": {
                    "type": "boolean",
                    "description": "Lets Chromium compress faster and larger. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "deviceScaleFactor": {
                    "type": "number",
                    "description": "Pixels per CSS pixel: 2 takes a picture twice as wide and tall.\n\nDefault: `1.0`.",
                    "examples": [
                      "1"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernBookFeatures": {
                    "type": "boolean",
                    "description": "Prints what Chromium does not know: running headers (string-set, position: running()), page numbers in contents and cross-references (target-counter), leaders, footnotes (the server's --kern-book-features unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernFontReport": {
                    "type": "boolean",
                    "description": "Says in the X-Marqius-Kern-Fonts header which fonts each conversion used, their files, and what stood in for what (the server's --kern-font-report unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernRequireFonts": {
                    "type": "string",
                    "description": "Families this request must have, comma-separated: a conversion that cannot have one is refused (409) instead of printed in another font.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "waitForWindowStatus": {
                    "type": "string",
                    "description": "Waits until the page sets window.status to this value, before the picture is taken.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The picture: PNG, JPEG or WebP, as `format` asks; several as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "image/png"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "image/jpeg"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "image/webp"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "403": {
            "$ref": "#/components/responses/Status403"
          },
          "409": {
            "$ref": "#/components/responses/Status409"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--chromium-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "image/png": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "image/png"
                      }
                    },
                    "image/jpeg": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "image/jpeg"
                      }
                    },
                    "image/webp": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "image/webp"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/screenshot/html -F files=@index.html -o hello.png"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/screenshot/html -F files=@index.html -o hello.png"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/screenshot/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"hello.png\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/screenshot/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"hello.png\", Buffer.from(await res.arrayBuffer()));\n}"
          },
          {
            "lang": "Shell",
            "label": "curl (Gotenberg 9's fields)",
            "source": "printf '<!doctype html><html><body><h1 id=t>Loading</h1><script>setTimeout(function () { t.textContent = \"Ready\"; window.status = \"ready\" }, 200)</script></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/screenshot/html -F files=@index.html -F waitForWindowStatus=ready -o ready.png"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run (Gotenberg 9's fields), no server",
            "source": "printf '<!doctype html><html><body><h1 id=t>Loading</h1><script>setTimeout(function () { t.textContent = \"Ready\"; window.status = \"ready\" }, 200)</script></body></html>' > index.html\nmarqius-kern run /forms/chromium/screenshot/html -F files=@index.html -F waitForWindowStatus=ready -o ready.png"
          },
          {
            "lang": "Python",
            "label": "Python (Gotenberg 9's fields)",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1 id=t>Loading</h1><script>setTimeout(function () { t.textContent = \\\"Ready\\\"; window.status = \\\"ready\\\" }, 200)</script></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/screenshot/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n    (\"waitForWindowStatus\", (None, \"ready\")),\n])\nr.raise_for_status()\nwith open(\"ready.png\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript (Gotenberg 9's fields)",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1 id=t>Loading</h1><script>setTimeout(function () { t.textContent = \\\"Ready\\\"; window.status = \\\"ready\\\" }, 200)</script></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  form.append(\"waitForWindowStatus\", \"ready\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/screenshot/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"ready.png\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/chromium/screenshot/url": {
      "post": {
        "operationId": "chromiumScreenshotUrl",
        "summary": "Take a picture of a web page",
        "description": "A picture of the page at a web address. Off with `--chromium-disable-routes`.",
        "tags": [
          "Chromium"
        ],
        "x-kern-api": [
          "gotenberg-8.40.0",
          "gotenberg-9.10.3"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "The address of the page to print: http or https.",
                    "format": "uri",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "header.html and footer.html, and the files they name; Marqius Kern's own header-first.html and footer-first.html stand in for them on the first page.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "skipNetworkIdleEvent": {
                    "type": "boolean",
                    "description": "Prints without waiting for the network to go idle. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "skipNetworkAlmostIdleEvent": {
                    "type": "boolean",
                    "description": "Prints without waiting for the network to go almost idle. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "failOnHttpStatusCodes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when the page itself answers one of these statuses: 499 stands for 400 to 499, 599 for 500 to 599.\n\nDefault: `[499,599]`.",
                    "examples": [
                      "[499,599]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnResourceHttpStatusCodes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when a file the page loads (a picture, a stylesheet, a script) answers one of these statuses; ranges as for failOnHttpStatusCodes.",
                    "examples": [
                      "[499,599]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "ignoreResourceHttpStatusDomains": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Domains, their subdomains included, that failOnResourceHttpStatusCodes leaves out: [\"sentry-cdn.com\"].",
                    "examples": [
                      "[\"example.com\"]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnResourceLoadingFailed": {
                    "type": "boolean",
                    "description": "Answers 409 when a file the page loads cannot be fetched at all.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnConsoleExceptions": {
                    "type": "boolean",
                    "description": "Answers 409 when the page's script throws an exception.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnConsoleMessageTypes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when the page writes one of these console types: log, debug, info, warning, error or assert.",
                    "examples": [
                      "[\"error\"]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitDelay": {
                    "type": "string",
                    "description": "Waits this long once the page has loaded, before printing: 500ms, 2s.",
                    "pattern": "^([0-9]+(\\.[0-9]+)?(ns|us|ms|s|m|h))+$",
                    "examples": [
                      "1ms"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitForExpression": {
                    "type": "string",
                    "description": "Waits until this JavaScript expression is true, such as `window.ready === true`.",
                    "examples": [
                      "true"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitForSelector": {
                    "type": "string",
                    "description": "Waits until an element matching this CSS selector is on the page, such as `#chart.ready`.",
                    "examples": [
                      "body"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "cookies": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Cookies to set before the page loads: objects with a `name`, a `value` and a `domain`, and optionally a `path`, `secure`, `httpOnly` and `sameSite` (Strict, Lax or None).",
                    "examples": [
                      "[{\"name\":\"a\",\"value\":\"b\",\"domain\":\"example.com\"}]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "userAgent": {
                    "type": "string",
                    "description": "The User-Agent header the page's requests send.",
                    "examples": [
                      "kern-tests"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "extraHttpHeaders": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Headers the page's requests send: {\"X-Token\": \"abc\"}. A value ending in `;scope=<regex>` is sent only to the addresses the regex matches.",
                    "examples": [
                      "{\"X-Test\":\"1\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "emulatedMediaType": {
                    "type": "string",
                    "enum": [
                      "print",
                      "screen"
                    ],
                    "description": "The CSS media type the page is laid out for.\n\nDefault: `print`.",
                    "default": "print",
                    "examples": [
                      "print"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "emulatedMediaFeatures": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "CSS media features the page sees: {\"prefers-color-scheme\": \"dark\"}.",
                    "examples": [
                      "{\"prefers-color-scheme\":\"light\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "omitBackground": {
                    "type": "boolean",
                    "description": "Leaves out the white background, for a transparent page or picture; a PDF needs printBackground too.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "width": {
                    "type": "integer",
                    "description": "The window's width in pixels.\n\nDefault: `800`.",
                    "default": 800,
                    "examples": [
                      800
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "height": {
                    "type": "integer",
                    "description": "The window's height in pixels.\n\nDefault: `600`.",
                    "default": 600,
                    "examples": [
                      600
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "clip": {
                    "type": "boolean",
                    "description": "Takes the window alone, not the whole page.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "selector": {
                    "type": "string",
                    "description": "Takes the first element matching this CSS selector alone.",
                    "examples": [
                      "body"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "png",
                      "jpeg",
                      "webp"
                    ],
                    "description": "The picture's format (Marqius Kern's --kern-screenshot-format sets another default for the server).\n\nDefault: `png`.",
                    "default": "png",
                    "examples": [
                      "png"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "quality": {
                    "type": "integer",
                    "description": "JPEG and WebP quality, from 0 to 100.\n\nDefault: `100`.",
                    "default": 100,
                    "minimum": 0,
                    "maximum": 100,
                    "examples": [
                      100
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "optimizeForSpeed": {
                    "type": "boolean",
                    "description": "Lets Chromium compress faster and larger. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "deviceScaleFactor": {
                    "type": "number",
                    "description": "Pixels per CSS pixel: 2 takes a picture twice as wide and tall.\n\nDefault: `1.0`.",
                    "examples": [
                      "1"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernBookFeatures": {
                    "type": "boolean",
                    "description": "Prints what Chromium does not know: running headers (string-set, position: running()), page numbers in contents and cross-references (target-counter), leaders, footnotes (the server's --kern-book-features unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernFontReport": {
                    "type": "boolean",
                    "description": "Says in the X-Marqius-Kern-Fonts header which fonts each conversion used, their files, and what stood in for what (the server's --kern-font-report unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernRequireFonts": {
                    "type": "string",
                    "description": "Families this request must have, comma-separated: a conversion that cannot have one is refused (409) instead of printed in another font.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "waitForWindowStatus": {
                    "type": "string",
                    "description": "Waits until the page sets window.status to this value, before the picture is taken.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The picture: PNG, JPEG or WebP, as `format` asks; several as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "image/png"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "image/jpeg"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "image/webp"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "403": {
            "$ref": "#/components/responses/Status403"
          },
          "409": {
            "$ref": "#/components/responses/Status409"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--chromium-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "image/png": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "image/png"
                      }
                    },
                    "image/jpeg": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "image/jpeg"
                      }
                    },
                    "image/webp": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "image/webp"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl http://localhost:3000/forms/chromium/screenshot/url -F url=https://example.com -o example.png"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "marqius-kern run /forms/chromium/screenshot/url -F url=https://example.com -o example.png"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nr = requests.post(\"http://localhost:3000/forms/chromium/screenshot/url\", files=[\n    (\"url\", (None, \"https://example.com\")),\n])\nr.raise_for_status()\nwith open(\"example.png\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { writeFile } from \"node:fs/promises\";\n\n{\n  const form = new FormData();\n  form.append(\"url\", \"https://example.com\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/screenshot/url\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"example.png\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/chromium/screenshot/markdown": {
      "post": {
        "operationId": "chromiumScreenshotMarkdown",
        "summary": "Take a picture of Markdown",
        "description": "A picture of Markdown files, placed in index.html. Off with `--chromium-disable-routes`.",
        "tags": [
          "Chromium"
        ],
        "x-kern-api": [
          "gotenberg-8.40.0",
          "gotenberg-9.10.3"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "index.html, which places each Markdown file with {{ toHTML \"file.md\" }}, the .md files, and the files the page names; header.html and footer.html as on the HTML route.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "skipNetworkIdleEvent": {
                    "type": "boolean",
                    "description": "Prints without waiting for the network to go idle. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "skipNetworkAlmostIdleEvent": {
                    "type": "boolean",
                    "description": "Prints without waiting for the network to go almost idle. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "failOnHttpStatusCodes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when the page itself answers one of these statuses: 499 stands for 400 to 499, 599 for 500 to 599.\n\nDefault: `[499,599]`.",
                    "examples": [
                      "[499,599]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnResourceHttpStatusCodes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when a file the page loads (a picture, a stylesheet, a script) answers one of these statuses; ranges as for failOnHttpStatusCodes.",
                    "examples": [
                      "[499,599]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "ignoreResourceHttpStatusDomains": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Domains, their subdomains included, that failOnResourceHttpStatusCodes leaves out: [\"sentry-cdn.com\"].",
                    "examples": [
                      "[\"example.com\"]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnResourceLoadingFailed": {
                    "type": "boolean",
                    "description": "Answers 409 when a file the page loads cannot be fetched at all.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnConsoleExceptions": {
                    "type": "boolean",
                    "description": "Answers 409 when the page's script throws an exception.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "failOnConsoleMessageTypes": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Answers 409 when the page writes one of these console types: log, debug, info, warning, error or assert.",
                    "examples": [
                      "[\"error\"]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitDelay": {
                    "type": "string",
                    "description": "Waits this long once the page has loaded, before printing: 500ms, 2s.",
                    "pattern": "^([0-9]+(\\.[0-9]+)?(ns|us|ms|s|m|h))+$",
                    "examples": [
                      "1ms"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitForExpression": {
                    "type": "string",
                    "description": "Waits until this JavaScript expression is true, such as `window.ready === true`.",
                    "examples": [
                      "true"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "waitForSelector": {
                    "type": "string",
                    "description": "Waits until an element matching this CSS selector is on the page, such as `#chart.ready`.",
                    "examples": [
                      "body"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "cookies": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Cookies to set before the page loads: objects with a `name`, a `value` and a `domain`, and optionally a `path`, `secure`, `httpOnly` and `sameSite` (Strict, Lax or None).",
                    "examples": [
                      "[{\"name\":\"a\",\"value\":\"b\",\"domain\":\"example.com\"}]"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "userAgent": {
                    "type": "string",
                    "description": "The User-Agent header the page's requests send.",
                    "examples": [
                      "kern-tests"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "extraHttpHeaders": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Headers the page's requests send: {\"X-Token\": \"abc\"}. A value ending in `;scope=<regex>` is sent only to the addresses the regex matches.",
                    "examples": [
                      "{\"X-Test\":\"1\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "emulatedMediaType": {
                    "type": "string",
                    "enum": [
                      "print",
                      "screen"
                    ],
                    "description": "The CSS media type the page is laid out for.\n\nDefault: `print`.",
                    "default": "print",
                    "examples": [
                      "print"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "emulatedMediaFeatures": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "CSS media features the page sees: {\"prefers-color-scheme\": \"dark\"}.",
                    "examples": [
                      "{\"prefers-color-scheme\":\"light\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "omitBackground": {
                    "type": "boolean",
                    "description": "Leaves out the white background, for a transparent page or picture; a PDF needs printBackground too.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "width": {
                    "type": "integer",
                    "description": "The window's width in pixels.\n\nDefault: `800`.",
                    "default": 800,
                    "examples": [
                      800
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "height": {
                    "type": "integer",
                    "description": "The window's height in pixels.\n\nDefault: `600`.",
                    "default": 600,
                    "examples": [
                      600
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "clip": {
                    "type": "boolean",
                    "description": "Takes the window alone, not the whole page.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "selector": {
                    "type": "string",
                    "description": "Takes the first element matching this CSS selector alone.",
                    "examples": [
                      "body"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "png",
                      "jpeg",
                      "webp"
                    ],
                    "description": "The picture's format (Marqius Kern's --kern-screenshot-format sets another default for the server).\n\nDefault: `png`.",
                    "default": "png",
                    "examples": [
                      "png"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "quality": {
                    "type": "integer",
                    "description": "JPEG and WebP quality, from 0 to 100.\n\nDefault: `100`.",
                    "default": 100,
                    "minimum": 0,
                    "maximum": 100,
                    "examples": [
                      100
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "optimizeForSpeed": {
                    "type": "boolean",
                    "description": "Lets Chromium compress faster and larger. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "deviceScaleFactor": {
                    "type": "number",
                    "description": "Pixels per CSS pixel: 2 takes a picture twice as wide and tall.\n\nDefault: `1.0`.",
                    "examples": [
                      "1"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernBookFeatures": {
                    "type": "boolean",
                    "description": "Prints what Chromium does not know: running headers (string-set, position: running()), page numbers in contents and cross-references (target-counter), leaders, footnotes (the server's --kern-book-features unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernFontReport": {
                    "type": "boolean",
                    "description": "Says in the X-Marqius-Kern-Fonts header which fonts each conversion used, their files, and what stood in for what (the server's --kern-font-report unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernRequireFonts": {
                    "type": "string",
                    "description": "Families this request must have, comma-separated: a conversion that cannot have one is refused (409) instead of printed in another font.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "waitForWindowStatus": {
                    "type": "string",
                    "description": "Waits until the page sets window.status to this value, before the picture is taken.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The picture: PNG, JPEG or WebP, as `format` asks; several as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "image/png"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "image/jpeg"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "image/webp"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "403": {
            "$ref": "#/components/responses/Status403"
          },
          "409": {
            "$ref": "#/components/responses/Status409"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--chromium-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "image/png": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "image/png"
                      }
                    },
                    "image/jpeg": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "image/jpeg"
                      }
                    },
                    "image/webp": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "image/webp"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body>{{ toHTML \"notes.md\" }}</body></html>' > index.html\nprintf '# Notes\\n\\n- Agreed on Monday\\n- Ships on Friday\\n' > notes.md\ncurl http://localhost:3000/forms/chromium/screenshot/markdown -F files=@index.html -F files=@notes.md -o notes.png"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body>{{ toHTML \"notes.md\" }}</body></html>' > index.html\nprintf '# Notes\\n\\n- Agreed on Monday\\n- Ships on Friday\\n' > notes.md\nmarqius-kern run /forms/chromium/screenshot/markdown -F files=@index.html -F files=@notes.md -o notes.png"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body>{{ toHTML \\\"notes.md\\\" }}</body></html>\")\n\nwith open(\"notes.md\", \"w\") as f:\n    f.write('''# Notes\n\n- Agreed on Monday\n- Ships on Friday\n''')\n\nr = requests.post(\"http://localhost:3000/forms/chromium/screenshot/markdown\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n    (\"files\", (\"notes.md\", open(\"notes.md\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"notes.png\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body>{{ toHTML \\\"notes.md\\\" }}</body></html>\");\n\nawait writeFile(\"notes.md\", `# Notes\n\n- Agreed on Monday\n- Ships on Friday\n`);\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  form.append(\"files\", new Blob([await readFile(\"notes.md\")]), \"notes.md\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/screenshot/markdown\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"notes.png\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/libreoffice/convert": {
      "post": {
        "operationId": "libreofficeConvert",
        "summary": "Convert Office documents to PDF",
        "description": "Converts Word, Excel, CSV, PowerPoint, OpenDocument, RTF and text files to PDF, laid out as LibreOffice prints them; several are answered as a ZIP unless merged. Off with `--libreoffice-disable-routes`.",
        "tags": [
          "LibreOffice"
        ],
        "x-kern-api": [
          "gotenberg-8.40.0",
          "gotenberg-9.10.3"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The documents: Word (.docx, .doc, .docm, .dotx, .dot), Excel (.xlsx, .xls, .xlsm, .xltx, .xlt), CSV and TSV, PowerPoint (.pptx, .pptm, .ppsx, .ppsm, .potx), OpenDocument (.odt, .ods, .odp, their templates and flat files), RTF, plain text and PDF.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "password": {
                    "type": "string",
                    "description": "Opens password-protected documents.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "landscape": {
                    "type": "boolean",
                    "description": "Prints the documents on their side.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "nativePageRanges": {
                    "type": "string",
                    "description": "The pages to print: 1-4, 2, 1,3,5-7.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "singlePageSheets": {
                    "type": "boolean",
                    "description": "Prints each sheet of a workbook whole, on one page of its own size.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "merge": {
                    "type": "boolean",
                    "description": "Merges the PDFs into one, in the order of the documents' names.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "nativePdfFormats": {
                    "type": "boolean",
                    "description": "With pdfa or pdfua: made while converting, as LibreOffice does, rather than after.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "generateTaggedPdf": {
                    "type": "boolean",
                    "description": "Makes a tagged PDF.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "updateIndexes": {
                    "type": "boolean",
                    "description": "Updates the documents' indexes before printing. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "exportFormFields": {
                    "type": "boolean",
                    "description": "Keeps form fields as fields. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "allowDuplicateFieldNames": {
                    "type": "boolean",
                    "description": "Lets form fields share a name. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "exportBookmarks": {
                    "type": "boolean",
                    "description": "Makes bookmarks from the headings. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "exportBookmarksToPdfDestination": {
                    "type": "boolean",
                    "description": "Writes the bookmarks as named destinations. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "exportPlaceholders": {
                    "type": "boolean",
                    "description": "Prints placeholder fields' marks. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "exportNotes": {
                    "type": "boolean",
                    "description": "Prints comments as annotations. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "exportNotesPages": {
                    "type": "boolean",
                    "description": "Prints a presentation's notes pages too. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "exportOnlyNotesPages": {
                    "type": "boolean",
                    "description": "Prints a presentation's notes pages alone. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "exportNotesInMargin": {
                    "type": "boolean",
                    "description": "Prints comments in the margin. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "convertOooTargetToPdfTarget": {
                    "type": "boolean",
                    "description": "Turns links to other documents into links to their PDFs. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "exportLinksRelativeFsys": {
                    "type": "boolean",
                    "description": "Writes links to files as relative ones. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "exportHiddenSlides": {
                    "type": "boolean",
                    "description": "Prints a presentation's hidden slides. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "skipEmptyPages": {
                    "type": "boolean",
                    "description": "Leaves out pages with nothing on them. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "addOriginalDocumentAsStream": {
                    "type": "boolean",
                    "description": "Carries the document inside its PDF. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "initialView": {
                    "type": "string",
                    "enum": [
                      "0",
                      "1",
                      "2",
                      "default",
                      "outline",
                      "thumbnails"
                    ],
                    "description": "The PDF viewer's side panel: 0 none, 1 bookmarks, 2 thumbnails (Gotenberg 9's requests: default, outline, thumbnails). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `0`.",
                    "default": "0",
                    "examples": [
                      "0"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "initialPage": {
                    "type": "integer",
                    "description": "The page the viewer opens at. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `1`.",
                    "default": 1,
                    "minimum": 1,
                    "examples": [
                      1
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "magnification": {
                    "type": "string",
                    "enum": [
                      "0",
                      "1",
                      "2",
                      "3",
                      "4",
                      "default",
                      "fitWindow",
                      "fitWidth",
                      "fitVisible",
                      "zoom"
                    ],
                    "description": "The viewer's zoom: 0 default, 1 whole page, 2 page width, 3 window width, 4 zoom (Gotenberg 9's requests: default, fitWindow, fitWidth, fitVisible, zoom). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `0`.",
                    "default": "0",
                    "examples": [
                      "0"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "zoom": {
                    "type": "integer",
                    "description": "With magnification 4: the zoom in per cent. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `100`.",
                    "default": 100,
                    "examples": [
                      100
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "pageLayout": {
                    "type": "string",
                    "enum": [
                      "0",
                      "1",
                      "2",
                      "3",
                      "default",
                      "singlePage",
                      "oneColumn",
                      "twoColumnRight"
                    ],
                    "description": "The viewer's layout: 0 default, 1 one page, 2 one column, 3 two columns (Gotenberg 9's requests: default, singlePage, oneColumn, twoColumnRight). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `0`.",
                    "default": "0",
                    "examples": [
                      "0"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "firstPageOnLeft": {
                    "type": "boolean",
                    "description": "With two columns: the first page on the left. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "resizeWindowToInitialPage": {
                    "type": "boolean",
                    "description": "The viewer's window fitted to the first page. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "centerWindow": {
                    "type": "boolean",
                    "description": "The viewer's window centred. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "openInFullScreenMode": {
                    "type": "boolean",
                    "description": "The viewer opens full screen. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "displayPDFDocumentTitle": {
                    "type": "boolean",
                    "description": "The viewer shows the document's title. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "hideViewerMenubar": {
                    "type": "boolean",
                    "description": "The viewer hides its menu bar. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "hideViewerToolbar": {
                    "type": "boolean",
                    "description": "The viewer hides its toolbar. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "hideViewerWindowControls": {
                    "type": "boolean",
                    "description": "The viewer hides its window controls. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "useTransitionEffects": {
                    "type": "boolean",
                    "description": "A presentation's slide transitions. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "openBookmarkLevels": {
                    "type": "integer",
                    "description": "The bookmark levels shown open: -1 all, or 1 to 10. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `-1`.",
                    "default": -1,
                    "examples": [
                      -1
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "losslessImageCompression": {
                    "type": "boolean",
                    "description": "Keeps pictures without loss. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "quality": {
                    "type": "integer",
                    "description": "JPEG quality for pictures, 1 to 100. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `90`.",
                    "default": 90,
                    "minimum": 1,
                    "maximum": 100,
                    "examples": [
                      90
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "reduceImageResolution": {
                    "type": "boolean",
                    "description": "Lowers the pictures' resolution to maxImageResolution. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "maxImageResolution": {
                    "type": "string",
                    "enum": [
                      "75",
                      "150",
                      "300",
                      "600",
                      "1200"
                    ],
                    "description": "With reduceImageResolution: the pictures' highest resolution, in dpi. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `300`.",
                    "default": "300",
                    "examples": [
                      "300"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "nativeWatermarkText": {
                    "type": "string",
                    "description": "LibreOffice's own watermark: one line drawn across every page, as LibreOffice's PDF export draws it. It wins over nativeTiledWatermarkText. As Gotenberg hands it to LibreOffice, a value holding `=`, or one read as a whole number or as true or false, draws nothing.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "nativeTiledWatermarkText": {
                    "type": "string",
                    "description": "LibreOffice's own tiled watermark: the text repeated over every page.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "nativeWatermarkColor": {
                    "type": "string",
                    "description": "The watermark's colour: a number (0xRRGGBB; 0, LibreOffice's own green), or #rrggbb in Gotenberg 9's requests.\n\nDefault: `8388223`.",
                    "default": "8388223",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "nativeWatermarkFontHeight": {
                    "type": "integer",
                    "description": "The watermark's size, in points; 0 or none: as large as fits.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "nativeWatermarkRotateAngle": {
                    "type": "integer",
                    "description": "The watermark's angle, in tenths of a degree, anticlockwise; 0 or none: as the page's shape turns it.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "nativeWatermarkFontName": {
                    "type": "string",
                    "description": "The watermark's font (Helvetica is drawn in Liberation Sans, as LibreOffice draws it).\n\nDefault: `Helvetica`.",
                    "default": "Helvetica",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitMode": {
                    "type": "string",
                    "enum": [
                      "intervals",
                      "pages"
                    ],
                    "description": "Splits the PDF: `intervals` into parts of splitSpan pages, `pages` into the pages splitSpan names. Several parts are answered as a ZIP.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitSpan": {
                    "type": "string",
                    "description": "The pages of each part: a number of pages for intervals, page ranges (1-3, 5) for pages.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitUnify": {
                    "type": "boolean",
                    "description": "With splitMode pages: the pages chosen in one PDF instead of one PDF each.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "metadata": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "The PDF's metadata to write: {\"Author\": \"…\", \"Title\": \"…\", \"Keywords\": [\"…\"]}.",
                    "examples": [
                      "{\"Title\":\"Marqius Kern\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "flatten": {
                    "type": "boolean",
                    "description": "Turns form fields and annotations into the page's own drawing.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "userPassword": {
                    "type": "string",
                    "description": "The password that opens the PDF.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "ownerPassword": {
                    "type": "string",
                    "description": "The password that lifts the PDF's restrictions.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowPrinting": {
                    "type": "boolean",
                    "description": "With a password: printing allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowModifying": {
                    "type": "boolean",
                    "description": "With a password: changes allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowCopying": {
                    "type": "boolean",
                    "description": "With a password: copying text and pictures allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAnnotating": {
                    "type": "boolean",
                    "description": "With a password: comments allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowFillingForms": {
                    "type": "boolean",
                    "description": "With a password: filling in forms allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAssembling": {
                    "type": "boolean",
                    "description": "With a password: inserting, rotating and deleting pages allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stamp": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A picture or a PDF drawn over the pages (stampSource image or pdf).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the stamp is: text (stampExpression), or the picture or PDF sent as `stamp`.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampExpression": {
                    "type": "string",
                    "description": "The stamp's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampPages": {
                    "type": "string",
                    "description": "The pages stamped: 1-3, 5; all when not given.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the stamp is drawn: {\"font\": \"Helvetica\", \"fontSize\": 24, \"color\": \"#ff0000\", \"opacity\": 0.5, \"rotation\": 45, \"position\": \"center\"}.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermark": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A picture or a PDF drawn under the pages' content (watermarkSource image or pdf).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the watermark is: text (watermarkExpression), or the picture or PDF sent as `watermark`.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkExpression": {
                    "type": "string",
                    "description": "The watermark's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkPages": {
                    "type": "string",
                    "description": "The pages watermarked: 1-3, 5; all when not given.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the watermark is drawn, as for stampOptions.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotateAngle": {
                    "type": "string",
                    "enum": [
                      "90",
                      "180",
                      "270"
                    ],
                    "description": "Turns the pages by this angle, clockwise.",
                    "examples": [
                      "90"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotatePages": {
                    "type": "string",
                    "description": "With rotateAngle: the pages turned: 1-3, 5; all when not given.",
                    "examples": [
                      "1"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "optimizeImages": {
                    "type": "boolean",
                    "description": "Packs the pictures again as JPEG, for a smaller file.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "imageQuality": {
                    "type": "integer",
                    "description": "With optimizeImages: the JPEG quality, from 1 to 100.",
                    "minimum": 1,
                    "maximum": 100,
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcr": {
                    "type": "string",
                    "enum": [
                      "true",
                      "false",
                      "auto"
                    ],
                    "description": "true (or auto): the pages that need it (scans: little text and a large picture) are read and laid over with hidden text, so the PDF can be searched and copied; the pages look as they did. The summary is in the X-Marqius-Kern-Ocr header.\n\nDefault: `false`.",
                    "default": "false",
                    "examples": [
                      "false"
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrEngine": {
                    "type": "string",
                    "description": "The engine that reads: Marqius Kern's own (the server's --kern-ocr-engine unless sent: ppocr-v6-tiny; ppocr-v6-small reads more accurately), tesseract, a folder added with `marqius-kern ocr add`, or an OCR server's name (--kern-ocr-server).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrLanguages": {
                    "type": "string",
                    "description": "The languages or scripts on the pages, comma-separated (ara, heb, hi, korean...): the default engine is swapped for Marqius Kern's engine that reads them.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrPages": {
                    "type": "string",
                    "description": "The pages to read if they need it: 1-3,5, even, odd, !1; all unless sent.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrOptional": {
                    "type": "boolean",
                    "description": "When OCR cannot run (no engine, a model not fetched yet), the file is answered as it is, with a note, instead of an error.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "pdfa": {
                    "type": "string",
                    "enum": [
                      "PDF/A-1b",
                      "PDF/A-2b",
                      "PDF/A-3b"
                    ],
                    "description": "Makes the PDF this PDF/A level, for archiving.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "pdfua": {
                    "type": "boolean",
                    "description": "Makes the PDF accessible (PDF/UA).\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "embeds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "Files carried inside the PDF as attachments.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "embedsMetadata": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "For each file carried inside, by its name: {\"invoice.xml\": {\"mimeType\": \"text/xml\", \"relationship\": \"Data\"}}.",
                    "examples": [
                      "{\"note.txt\":{\"mimeType\":\"text/plain\"}}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxXml": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A Factur-X or ZUGFeRD invoice's XML: the PDF is made an e-invoice carrying it (PDF/A-3b).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxVersion": {
                    "type": "string",
                    "description": "The Factur-X version written in the PDF's metadata.\n\nDefault: `1.0`.",
                    "default": "1.0",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxConformanceLevel": {
                    "type": "string",
                    "enum": [
                      "MINIMUM",
                      "BASIC WL",
                      "BASIC",
                      "EN 16931",
                      "EXTENDED",
                      "XRECHNUNG"
                    ],
                    "description": "The invoice XML's profile, when the XML does not say it.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxDocumentType": {
                    "type": "string",
                    "enum": [
                      "INVOICE",
                      "ORDER",
                      "ORDER_RESPONSE",
                      "ORDER_CHANGE"
                    ],
                    "description": "What the XML is.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "singlePage": {
                    "type": "boolean",
                    "description": "Gotenberg 9's name for singlePageSheets, taken here too on a server answering 8.x alone, --kern-api=8 (a value that is not a boolean is passed over, as Gotenberg 8 passes over a field it does not know); on a server answering both, it makes the request 9.x's.\n\nDefault: `false`.",
                    "default": false,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "kernContents": {
                    "type": "boolean",
                    "description": "A contents page is made on the Chromium routes alone. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernData": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "JSON that the Word files are filled from before they are converted ({{ customer.name }}, formats, loops and conditions); an array of objects makes a document for each record.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernDataStrict": {
                    "type": "boolean",
                    "description": "With kernData: a field a record does not have is refused rather than left empty.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernFirstPageNumber": {
                    "type": "integer",
                    "description": "The number the first page is given; the rest count on from it.\n\nDefault: `1`.",
                    "default": 1,
                    "examples": [
                      1
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernFontReport": {
                    "type": "boolean",
                    "description": "Says in the X-Marqius-Kern-Fonts header which fonts each conversion used, their files, and what stood in for what (the server's --kern-font-report unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernRequireFonts": {
                    "type": "string",
                    "description": "Families this request must have, comma-separated: a conversion that cannot have one is refused (409) instead of printed in another font.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "stages": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Operations run on the PDFs in order, each with its options as /forms/pdf's routes take them: a JSON array such as [{\"op\":\"set-metadata\",\"title\":\"Report\"},{\"op\":\"encrypt\",\"userPassword\":\"open\"}].",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "locale": {
                    "type": "string",
                    "description": "The language the documents are laid out in, as a BCP 47 tag such as en-AU or de-DE: dates, numbers and hyphenation follow it.",
                    "pattern": "^[A-Za-z]{2,3}(-[A-Za-z]{4})?(-([A-Za-z]{2}|[0-9]{3}))?$",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "paperSize": {
                    "type": "string",
                    "description": "A paper by name, such as A4 or Letter, for the documents' pages.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "paperWidth": {
                    "type": "string",
                    "description": "The paper's width for the documents' pages.",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "paperHeight": {
                    "type": "string",
                    "description": "The paper's height for the documents' pages.",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativePages": {
                    "type": "string",
                    "description": "The pages to print: 1-4, 2, 1,3,5-7 (Gotenberg 9's name for nativePageRanges).",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "showTrackedChanges": {
                    "type": "boolean",
                    "description": "Prints a document's tracked changes, marked up.\n\nDefault: `false`.",
                    "default": false,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativeBookmarks": {
                    "type": "boolean",
                    "description": "Makes bookmarks from the headings (Gotenberg 9's name for exportBookmarks).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativeTaggedPdf": {
                    "type": "boolean",
                    "description": "Makes a tagged PDF (Gotenberg 9's name for generateTaggedPdf).\n\nDefault: `false`.",
                    "default": false,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativeQuality": {
                    "type": "integer",
                    "description": "JPEG quality for pictures, from 1 to 100 (Gotenberg 9's name for quality).\n\nDefault: `90`.",
                    "default": 90,
                    "minimum": 1,
                    "maximum": 100,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativeLosslessImageCompression": {
                    "type": "boolean",
                    "description": "Keeps pictures without loss (Gotenberg 9's name for losslessImageCompression).\n\nDefault: `false`.",
                    "default": false,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativeReduceImageResolution": {
                    "type": "boolean",
                    "description": "Lowers the pictures' resolution to nativeMaxImageResolution.\n\nDefault: `false`.",
                    "default": false,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativeMaxImageResolution": {
                    "type": "string",
                    "enum": [
                      "75",
                      "150",
                      "300",
                      "600",
                      "1200"
                    ],
                    "description": "With nativeReduceImageResolution: the pictures' highest resolution, in dpi.\n\nDefault: `300`.",
                    "default": "300",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativeWatermarkFontSize": {
                    "type": "integer",
                    "description": "LibreOffice's own watermark: its size in points (Gotenberg 9's name for nativeWatermarkFontHeight).",
                    "minimum": 0,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativeWatermarkRotation": {
                    "type": "number",
                    "description": "LibreOffice's own watermark: its angle, in degrees.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativeWatermarkFont": {
                    "type": "string",
                    "description": "LibreOffice's own watermark: its font (Gotenberg 9's name for nativeWatermarkFontName).\n\nDefault: `Helvetica`.",
                    "default": "Helvetica",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativePdfa": {
                    "type": "string",
                    "enum": [
                      "PDF/A-1b",
                      "PDF/A-2b",
                      "PDF/A-3b",
                      "PDF/A-4"
                    ],
                    "description": "Makes the PDF this PDF/A level as LibreOffice exports it (Gotenberg 9's name for pdfa).",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "nativePdfua": {
                    "type": "string",
                    "enum": [
                      "PDF/UA-1"
                    ],
                    "description": "Makes the PDF accessible as LibreOffice exports it; PDF/UA-2 comes from a remediate stage.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              },
              "encoding": {
                "stampSource": {
                  "explode": true
                },
                "stampExpression": {
                  "explode": true
                },
                "stampPages": {
                  "explode": true
                },
                "stampOptions": {
                  "explode": true
                },
                "watermarkSource": {
                  "explode": true
                },
                "watermarkExpression": {
                  "explode": true
                },
                "watermarkPages": {
                  "explode": true
                },
                "watermarkOptions": {
                  "explode": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "409": {
            "$ref": "#/components/responses/Status409"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--libreoffice-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf 'Name,Units,Price\\nPaper,3,4.50\\nInk,1,12.00\\n' > order.csv\ncurl http://localhost:3000/forms/libreoffice/convert -F files=@order.csv -o order.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf 'Name,Units,Price\\nPaper,3,4.50\\nInk,1,12.00\\n' > order.csv\nmarqius-kern run /forms/libreoffice/convert -F files=@order.csv -o order.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"order.csv\", \"w\") as f:\n    f.write('''Name,Units,Price\nPaper,3,4.50\nInk,1,12.00\n''')\n\nr = requests.post(\"http://localhost:3000/forms/libreoffice/convert\", files=[\n    (\"files\", (\"order.csv\", open(\"order.csv\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"order.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"order.csv\", `Name,Units,Price\nPaper,3,4.50\nInk,1,12.00\n`);\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"order.csv\")]), \"order.csv\");\n  const res = await fetch(\"http://localhost:3000/forms/libreoffice/convert\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"order.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          },
          {
            "lang": "Shell",
            "label": "curl (Gotenberg 9's fields)",
            "source": "printf 'Name,Units,Price\\nPaper,3,4.50\\nInk,1,12.00\\n' > order.csv\ncurl http://localhost:3000/forms/libreoffice/convert -F files=@order.csv -F nativePages=1 -F 'stages=[{\"op\":\"set-metadata\",\"title\":\"Order\"}]' -o order.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run (Gotenberg 9's fields), no server",
            "source": "printf 'Name,Units,Price\\nPaper,3,4.50\\nInk,1,12.00\\n' > order.csv\nmarqius-kern run /forms/libreoffice/convert -F files=@order.csv -F nativePages=1 -F 'stages=[{\"op\":\"set-metadata\",\"title\":\"Order\"}]' -o order.pdf"
          },
          {
            "lang": "Python",
            "label": "Python (Gotenberg 9's fields)",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"order.csv\", \"w\") as f:\n    f.write('''Name,Units,Price\nPaper,3,4.50\nInk,1,12.00\n''')\n\nr = requests.post(\"http://localhost:3000/forms/libreoffice/convert\", files=[\n    (\"files\", (\"order.csv\", open(\"order.csv\", \"rb\"))),\n    (\"nativePages\", (None, \"1\")),\n    (\"stages\", (None, \"[{\\\"op\\\":\\\"set-metadata\\\",\\\"title\\\":\\\"Order\\\"}]\")),\n])\nr.raise_for_status()\nwith open(\"order.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript (Gotenberg 9's fields)",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"order.csv\", `Name,Units,Price\nPaper,3,4.50\nInk,1,12.00\n`);\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"order.csv\")]), \"order.csv\");\n  form.append(\"nativePages\", \"1\");\n  form.append(\"stages\", \"[{\\\"op\\\":\\\"set-metadata\\\",\\\"title\\\":\\\"Order\\\"}]\");\n  const res = await fetch(\"http://localhost:3000/forms/libreoffice/convert\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"order.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdfengines/merge": {
      "post": {
        "operationId": "pdfenginesMerge",
        "summary": "Merge PDFs",
        "description": "Merges PDFs into one, in the order of their names. Off with `--pdfengines-disable-routes`.",
        "tags": [
          "PDF engines"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, merged in the order of their names.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "autoIndexBookmarks": {
                    "type": "boolean",
                    "description": "Numbers each PDF's bookmarks under it.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "titleBookmarks": {
                    "type": "boolean",
                    "description": "A bookmark for each PDF, named after its title or file.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "bookmarks": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Bookmarks for the merged PDF, by the name of the file whose pages they point into: {\"a.pdf\": [{\"title\": \"…\", \"page\": 1, \"children\": [...]}]}.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitMode": {
                    "type": "string",
                    "enum": [
                      "intervals",
                      "pages"
                    ],
                    "description": "Read with the other fields; the merge route does not split. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "splitSpan": {
                    "type": "string",
                    "description": "Read with the other fields; the merge route does not split. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "splitUnify": {
                    "type": "boolean",
                    "description": "Read with the other fields; the merge route does not split. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "metadata": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "The PDF's metadata to write: {\"Author\": \"…\", \"Title\": \"…\", \"Keywords\": [\"…\"]}.",
                    "examples": [
                      "{\"Title\":\"Marqius Kern\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "flatten": {
                    "type": "boolean",
                    "description": "Turns form fields and annotations into the page's own drawing.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "userPassword": {
                    "type": "string",
                    "description": "The password that opens the PDF.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "ownerPassword": {
                    "type": "string",
                    "description": "The password that lifts the PDF's restrictions.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowPrinting": {
                    "type": "boolean",
                    "description": "With a password: printing allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowModifying": {
                    "type": "boolean",
                    "description": "With a password: changes allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowCopying": {
                    "type": "boolean",
                    "description": "With a password: copying text and pictures allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAnnotating": {
                    "type": "boolean",
                    "description": "With a password: comments allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowFillingForms": {
                    "type": "boolean",
                    "description": "With a password: filling in forms allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAssembling": {
                    "type": "boolean",
                    "description": "With a password: inserting, rotating and deleting pages allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stamp": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A picture or a PDF drawn over the pages (stampSource image or pdf).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the stamp is: text (stampExpression), or the picture or PDF sent as `stamp`.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampExpression": {
                    "type": "string",
                    "description": "The stamp's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampPages": {
                    "type": "string",
                    "description": "The pages stamped: 1-3, 5; all when not given.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the stamp is drawn: {\"font\": \"Helvetica\", \"fontSize\": 24, \"color\": \"#ff0000\", \"opacity\": 0.5, \"rotation\": 45, \"position\": \"center\"}.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermark": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A picture or a PDF drawn under the pages' content (watermarkSource image or pdf).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the watermark is: text (watermarkExpression), or the picture or PDF sent as `watermark`.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkExpression": {
                    "type": "string",
                    "description": "The watermark's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkPages": {
                    "type": "string",
                    "description": "The pages watermarked: 1-3, 5; all when not given.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the watermark is drawn, as for stampOptions.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotateAngle": {
                    "type": "string",
                    "enum": [
                      "90",
                      "180",
                      "270"
                    ],
                    "description": "Turns the pages by this angle, clockwise.",
                    "examples": [
                      "90"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotatePages": {
                    "type": "string",
                    "description": "With rotateAngle: the pages turned: 1-3, 5; all when not given.",
                    "examples": [
                      "1"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "optimizeImages": {
                    "type": "boolean",
                    "description": "Packs the pictures again as JPEG, for a smaller file.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "imageQuality": {
                    "type": "integer",
                    "description": "With optimizeImages: the JPEG quality, from 1 to 100.",
                    "minimum": 1,
                    "maximum": 100,
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcr": {
                    "type": "string",
                    "enum": [
                      "true",
                      "false",
                      "auto"
                    ],
                    "description": "true (or auto): the pages that need it (scans: little text and a large picture) are read and laid over with hidden text, so the PDF can be searched and copied; the pages look as they did. The summary is in the X-Marqius-Kern-Ocr header.\n\nDefault: `false`.",
                    "default": "false",
                    "examples": [
                      "false"
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrEngine": {
                    "type": "string",
                    "description": "The engine that reads: Marqius Kern's own (the server's --kern-ocr-engine unless sent: ppocr-v6-tiny; ppocr-v6-small reads more accurately), tesseract, a folder added with `marqius-kern ocr add`, or an OCR server's name (--kern-ocr-server).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrLanguages": {
                    "type": "string",
                    "description": "The languages or scripts on the pages, comma-separated (ara, heb, hi, korean...): the default engine is swapped for Marqius Kern's engine that reads them.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrPages": {
                    "type": "string",
                    "description": "The pages to read if they need it: 1-3,5, even, odd, !1; all unless sent.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrOptional": {
                    "type": "boolean",
                    "description": "When OCR cannot run (no engine, a model not fetched yet), the file is answered as it is, with a note, instead of an error.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "pdfa": {
                    "type": "string",
                    "enum": [
                      "PDF/A-1b",
                      "PDF/A-2b",
                      "PDF/A-3b"
                    ],
                    "description": "Makes the PDF this PDF/A level, for archiving.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "pdfua": {
                    "type": "boolean",
                    "description": "Makes the PDF accessible (PDF/UA).\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "embeds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "Files carried inside the PDF as attachments.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "embedsMetadata": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "For each file carried inside, by its name: {\"invoice.xml\": {\"mimeType\": \"text/xml\", \"relationship\": \"Data\"}}.",
                    "examples": [
                      "{\"note.txt\":{\"mimeType\":\"text/plain\"}}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxXml": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A Factur-X or ZUGFeRD invoice's XML: the PDF is made an e-invoice carrying it (PDF/A-3b).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxVersion": {
                    "type": "string",
                    "description": "The Factur-X version written in the PDF's metadata.\n\nDefault: `1.0`.",
                    "default": "1.0",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxConformanceLevel": {
                    "type": "string",
                    "enum": [
                      "MINIMUM",
                      "BASIC WL",
                      "BASIC",
                      "EN 16931",
                      "EXTENDED",
                      "XRECHNUNG"
                    ],
                    "description": "The invoice XML's profile, when the XML does not say it.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxDocumentType": {
                    "type": "string",
                    "enum": [
                      "INVOICE",
                      "ORDER",
                      "ORDER_RESPONSE",
                      "ORDER_CHANGE"
                    ],
                    "description": "What the XML is.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              },
              "encoding": {
                "stampSource": {
                  "explode": true
                },
                "stampExpression": {
                  "explode": true
                },
                "stampPages": {
                  "explode": true
                },
                "stampOptions": {
                  "explode": true
                },
                "watermarkSource": {
                  "explode": true
                },
                "watermarkExpression": {
                  "explode": true
                },
                "watermarkPages": {
                  "explode": true
                },
                "watermarkOptions": {
                  "explode": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdfengines-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\nmkdir -p cover && printf '<!doctype html><html><body style=\"background: #0b3d91\"><h1 style=\"color: white\">Cover</h1></body></html>' > cover/index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@cover/index.html -F printBackground=true -o cover.pdf\ncurl http://localhost:3000/forms/pdfengines/merge -F files=@cover.pdf -F files=@a.pdf -o merged.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmkdir -p cover && printf '<!doctype html><html><body style=\"background: #0b3d91\"><h1 style=\"color: white\">Cover</h1></body></html>' > cover/index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@cover/index.html -F printBackground=true -o cover.pdf\nmarqius-kern run /forms/pdfengines/merge -F files=@cover.pdf -F files=@a.pdf -o merged.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport os\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nos.makedirs(\"cover\", exist_ok=True)\n\nwith open(\"cover/index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body style=\\\"background: #0b3d91\\\"><h1 style=\\\"color: white\\\">Cover</h1></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"cover/index.html\", \"rb\"))),\n    (\"printBackground\", (None, \"true\")),\n])\nr.raise_for_status()\nwith open(\"cover.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdfengines/merge\", files=[\n    (\"files\", (\"cover.pdf\", open(\"cover.pdf\", \"rb\"))),\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"merged.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { mkdir, readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\nawait mkdir(\"cover\", { recursive: true });\n\nawait writeFile(\"cover/index.html\", \"<!doctype html><html><body style=\\\"background: #0b3d91\\\"><h1 style=\\\"color: white\\\">Cover</h1></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"cover/index.html\")]), \"index.html\");\n  form.append(\"printBackground\", \"true\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"cover.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"cover.pdf\")]), \"cover.pdf\");\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  const res = await fetch(\"http://localhost:3000/forms/pdfengines/merge\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"merged.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdfengines/split": {
      "post": {
        "operationId": "pdfenginesSplit",
        "summary": "Split PDFs",
        "description": "Splits each PDF into parts. Off with `--pdfengines-disable-routes`.",
        "tags": [
          "PDF engines"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitMode": {
                    "type": "string",
                    "enum": [
                      "intervals",
                      "pages"
                    ],
                    "description": "intervals: parts of splitSpan pages; pages: the pages splitSpan names.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitSpan": {
                    "type": "string",
                    "description": "A number of pages for intervals, page ranges for pages.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitUnify": {
                    "type": "boolean",
                    "description": "With pages: the pages chosen in one PDF.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "metadata": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "The PDF's metadata to write: {\"Author\": \"…\", \"Title\": \"…\", \"Keywords\": [\"…\"]}.",
                    "examples": [
                      "{\"Title\":\"Marqius Kern\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "flatten": {
                    "type": "boolean",
                    "description": "Turns form fields and annotations into the page's own drawing.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "userPassword": {
                    "type": "string",
                    "description": "The password that opens the PDF.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "ownerPassword": {
                    "type": "string",
                    "description": "The password that lifts the PDF's restrictions.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowPrinting": {
                    "type": "boolean",
                    "description": "With a password: printing allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowModifying": {
                    "type": "boolean",
                    "description": "With a password: changes allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowCopying": {
                    "type": "boolean",
                    "description": "With a password: copying text and pictures allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAnnotating": {
                    "type": "boolean",
                    "description": "With a password: comments allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowFillingForms": {
                    "type": "boolean",
                    "description": "With a password: filling in forms allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAssembling": {
                    "type": "boolean",
                    "description": "With a password: inserting, rotating and deleting pages allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stamp": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A picture or a PDF drawn over the pages (stampSource image or pdf).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the stamp is: text (stampExpression), or the picture or PDF sent as `stamp`.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampExpression": {
                    "type": "string",
                    "description": "The stamp's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampPages": {
                    "type": "string",
                    "description": "The pages stamped: 1-3, 5; all when not given.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the stamp is drawn: {\"font\": \"Helvetica\", \"fontSize\": 24, \"color\": \"#ff0000\", \"opacity\": 0.5, \"rotation\": 45, \"position\": \"center\"}.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermark": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A picture or a PDF drawn under the pages' content (watermarkSource image or pdf).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the watermark is: text (watermarkExpression), or the picture or PDF sent as `watermark`.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkExpression": {
                    "type": "string",
                    "description": "The watermark's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkPages": {
                    "type": "string",
                    "description": "The pages watermarked: 1-3, 5; all when not given.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the watermark is drawn, as for stampOptions.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotateAngle": {
                    "type": "string",
                    "enum": [
                      "90",
                      "180",
                      "270"
                    ],
                    "description": "Turns the pages by this angle, clockwise.",
                    "examples": [
                      "90"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotatePages": {
                    "type": "string",
                    "description": "With rotateAngle: the pages turned: 1-3, 5; all when not given.",
                    "examples": [
                      "1"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "optimizeImages": {
                    "type": "boolean",
                    "description": "Packs the pictures again as JPEG, for a smaller file.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "imageQuality": {
                    "type": "integer",
                    "description": "With optimizeImages: the JPEG quality, from 1 to 100.",
                    "minimum": 1,
                    "maximum": 100,
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcr": {
                    "type": "string",
                    "enum": [
                      "true",
                      "false",
                      "auto"
                    ],
                    "description": "true (or auto): the pages that need it (scans: little text and a large picture) are read and laid over with hidden text, so the PDF can be searched and copied; the pages look as they did. The summary is in the X-Marqius-Kern-Ocr header.\n\nDefault: `false`.",
                    "default": "false",
                    "examples": [
                      "false"
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrEngine": {
                    "type": "string",
                    "description": "The engine that reads: Marqius Kern's own (the server's --kern-ocr-engine unless sent: ppocr-v6-tiny; ppocr-v6-small reads more accurately), tesseract, a folder added with `marqius-kern ocr add`, or an OCR server's name (--kern-ocr-server).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrLanguages": {
                    "type": "string",
                    "description": "The languages or scripts on the pages, comma-separated (ara, heb, hi, korean...): the default engine is swapped for Marqius Kern's engine that reads them.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrPages": {
                    "type": "string",
                    "description": "The pages to read if they need it: 1-3,5, even, odd, !1; all unless sent.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrOptional": {
                    "type": "boolean",
                    "description": "When OCR cannot run (no engine, a model not fetched yet), the file is answered as it is, with a note, instead of an error.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "pdfa": {
                    "type": "string",
                    "enum": [
                      "PDF/A-1b",
                      "PDF/A-2b",
                      "PDF/A-3b"
                    ],
                    "description": "Makes the PDF this PDF/A level, for archiving.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "pdfua": {
                    "type": "boolean",
                    "description": "Makes the PDF accessible (PDF/UA).\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "embeds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "Files carried inside the PDF as attachments.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "embedsMetadata": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "For each file carried inside, by its name: {\"invoice.xml\": {\"mimeType\": \"text/xml\", \"relationship\": \"Data\"}}.",
                    "examples": [
                      "{\"note.txt\":{\"mimeType\":\"text/plain\"}}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxXml": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A Factur-X or ZUGFeRD invoice's XML: the PDF is made an e-invoice carrying it (PDF/A-3b).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxVersion": {
                    "type": "string",
                    "description": "The Factur-X version written in the PDF's metadata.\n\nDefault: `1.0`.",
                    "default": "1.0",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxConformanceLevel": {
                    "type": "string",
                    "enum": [
                      "MINIMUM",
                      "BASIC WL",
                      "BASIC",
                      "EN 16931",
                      "EXTENDED",
                      "XRECHNUNG"
                    ],
                    "description": "The invoice XML's profile, when the XML does not say it.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxDocumentType": {
                    "type": "string",
                    "enum": [
                      "INVOICE",
                      "ORDER",
                      "ORDER_RESPONSE",
                      "ORDER_CHANGE"
                    ],
                    "description": "What the XML is.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "splitMode",
                  "splitSpan"
                ]
              },
              "encoding": {
                "stampSource": {
                  "explode": true
                },
                "stampExpression": {
                  "explode": true
                },
                "stampPages": {
                  "explode": true
                },
                "stampOptions": {
                  "explode": true
                },
                "watermarkSource": {
                  "explode": true
                },
                "watermarkExpression": {
                  "explode": true
                },
                "watermarkPages": {
                  "explode": true
                },
                "watermarkOptions": {
                  "explode": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdfengines-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "mkdir -p three && printf '<!doctype html><html><body><h1 style=\"break-after: page\">One</h1><h1 style=\"break-after: page\">Two</h1><h1>Three</h1></body></html>' > three/index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@three/index.html -o pages.pdf\ncurl http://localhost:3000/forms/pdfengines/split -F files=@pages.pdf -F splitMode=intervals -F splitSpan=1 -o parts.zip"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "mkdir -p three && printf '<!doctype html><html><body><h1 style=\"break-after: page\">One</h1><h1 style=\"break-after: page\">Two</h1><h1>Three</h1></body></html>' > three/index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@three/index.html -o pages.pdf\nmarqius-kern run /forms/pdfengines/split -F files=@pages.pdf -F splitMode=intervals -F splitSpan=1 -o parts.zip"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport os\nimport requests\n\nos.makedirs(\"three\", exist_ok=True)\n\nwith open(\"three/index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1 style=\\\"break-after: page\\\">One</h1><h1 style=\\\"break-after: page\\\">Two</h1><h1>Three</h1></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"three/index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"pages.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdfengines/split\", files=[\n    (\"files\", (\"pages.pdf\", open(\"pages.pdf\", \"rb\"))),\n    (\"splitMode\", (None, \"intervals\")),\n    (\"splitSpan\", (None, \"1\")),\n])\nr.raise_for_status()\nwith open(\"parts.zip\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { mkdir, readFile, writeFile } from \"node:fs/promises\";\n\nawait mkdir(\"three\", { recursive: true });\n\nawait writeFile(\"three/index.html\", \"<!doctype html><html><body><h1 style=\\\"break-after: page\\\">One</h1><h1 style=\\\"break-after: page\\\">Two</h1><h1>Three</h1></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"three/index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"pages.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"pages.pdf\")]), \"pages.pdf\");\n  form.append(\"splitMode\", \"intervals\");\n  form.append(\"splitSpan\", \"1\");\n  const res = await fetch(\"http://localhost:3000/forms/pdfengines/split\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"parts.zip\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdfengines/flatten": {
      "post": {
        "operationId": "pdfenginesFlatten",
        "summary": "Flatten PDFs",
        "description": "Turns form fields and annotations into the pages' own drawing. Off with `--pdfengines-disable-routes`.",
        "tags": [
          "PDF engines"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdfengines-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "cat > form.pdf <<'PDF'\n%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R /AcroForm << /Fields [4 0 R] /DA (/Helv 12 Tf 0 g) /DR << /Font << /Helv 5 0 R >> >> >> >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Annots [4 0 R] /Contents 6 0 R /Resources << /Font << /Helv 5 0 R >> >> >>\nendobj\n4 0 obj\n<< /Type /Annot /Subtype /Widget /FT /Tx /T (name) /V () /Rect [72 700 372 728] /P 3 0 R /F 4 /DA (/Helv 12 Tf 0 g) /MK << /BC [0 0 0] >> >>\nendobj\n5 0 obj\n<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>\nendobj\n6 0 obj\n<< /Length 43 >>\nstream\nBT /Helv 14 Tf 72 740 Td (Your name:) Tj ET\nendstream\nendobj\nxref\n0 7\n0000000000 65535 f \n0000000009 00000 n \n0000000146 00000 n \n0000000203 00000 n \n0000000347 00000 n \n0000000503 00000 n \n0000000600 00000 n \ntrailer\n<< /Size 7 /Root 1 0 R >>\nstartxref\n693\n%%EOF\nPDF\ncurl http://localhost:3000/forms/pdfengines/flatten -F files=@form.pdf -o flat.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "cat > form.pdf <<'PDF'\n%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R /AcroForm << /Fields [4 0 R] /DA (/Helv 12 Tf 0 g) /DR << /Font << /Helv 5 0 R >> >> >> >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Annots [4 0 R] /Contents 6 0 R /Resources << /Font << /Helv 5 0 R >> >> >>\nendobj\n4 0 obj\n<< /Type /Annot /Subtype /Widget /FT /Tx /T (name) /V () /Rect [72 700 372 728] /P 3 0 R /F 4 /DA (/Helv 12 Tf 0 g) /MK << /BC [0 0 0] >> >>\nendobj\n5 0 obj\n<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>\nendobj\n6 0 obj\n<< /Length 43 >>\nstream\nBT /Helv 14 Tf 72 740 Td (Your name:) Tj ET\nendstream\nendobj\nxref\n0 7\n0000000000 65535 f \n0000000009 00000 n \n0000000146 00000 n \n0000000203 00000 n \n0000000347 00000 n \n0000000503 00000 n \n0000000600 00000 n \ntrailer\n<< /Size 7 /Root 1 0 R >>\nstartxref\n693\n%%EOF\nPDF\nmarqius-kern run /forms/pdfengines/flatten -F files=@form.pdf -o flat.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"form.pdf\", \"w\") as f:\n    f.write('''%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R /AcroForm << /Fields [4 0 R] /DA (/Helv 12 Tf 0 g) /DR << /Font << /Helv 5 0 R >> >> >> >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Annots [4 0 R] /Contents 6 0 R /Resources << /Font << /Helv 5 0 R >> >> >>\nendobj\n4 0 obj\n<< /Type /Annot /Subtype /Widget /FT /Tx /T (name) /V () /Rect [72 700 372 728] /P 3 0 R /F 4 /DA (/Helv 12 Tf 0 g) /MK << /BC [0 0 0] >> >>\nendobj\n5 0 obj\n<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>\nendobj\n6 0 obj\n<< /Length 43 >>\nstream\nBT /Helv 14 Tf 72 740 Td (Your name:) Tj ET\nendstream\nendobj\nxref\n0 7\n0000000000 65535 f \n0000000009 00000 n \n0000000146 00000 n \n0000000203 00000 n \n0000000347 00000 n \n0000000503 00000 n \n0000000600 00000 n \ntrailer\n<< /Size 7 /Root 1 0 R >>\nstartxref\n693\n%%EOF\n''')\n\nr = requests.post(\"http://localhost:3000/forms/pdfengines/flatten\", files=[\n    (\"files\", (\"form.pdf\", open(\"form.pdf\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"flat.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"form.pdf\", `%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R /AcroForm << /Fields [4 0 R] /DA (/Helv 12 Tf 0 g) /DR << /Font << /Helv 5 0 R >> >> >> >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Annots [4 0 R] /Contents 6 0 R /Resources << /Font << /Helv 5 0 R >> >> >>\nendobj\n4 0 obj\n<< /Type /Annot /Subtype /Widget /FT /Tx /T (name) /V () /Rect [72 700 372 728] /P 3 0 R /F 4 /DA (/Helv 12 Tf 0 g) /MK << /BC [0 0 0] >> >>\nendobj\n5 0 obj\n<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>\nendobj\n6 0 obj\n<< /Length 43 >>\nstream\nBT /Helv 14 Tf 72 740 Td (Your name:) Tj ET\nendstream\nendobj\nxref\n0 7\n0000000000 65535 f \n0000000009 00000 n \n0000000146 00000 n \n0000000203 00000 n \n0000000347 00000 n \n0000000503 00000 n \n0000000600 00000 n \ntrailer\n<< /Size 7 /Root 1 0 R >>\nstartxref\n693\n%%EOF\n`);\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"form.pdf\")]), \"form.pdf\");\n  const res = await fetch(\"http://localhost:3000/forms/pdfengines/flatten\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"flat.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdfengines/optimize": {
      "post": {
        "operationId": "pdfenginesOptimize",
        "summary": "Optimise PDFs",
        "description": "Makes PDFs smaller: pictures packed again as JPEG when asked. Off with `--pdfengines-disable-routes`.",
        "tags": [
          "PDF engines"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, their pictures packed again as JPEG.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "optimizeImages": {
                    "type": "boolean",
                    "description": "Read as true or false, as Gotenberg 8.40.0's form reads it (anything else is refused); the route packs the pictures either way, as 8.40.0's does. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "imageQuality": {
                    "type": "integer",
                    "description": "The JPEG quality, from 1 to 100.",
                    "minimum": 1,
                    "maximum": 100,
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdfengines-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdfengines/optimize -F files=@a.pdf -F imageQuality=80 -o small.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdfengines/optimize -F files=@a.pdf -F imageQuality=80 -o small.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdfengines/optimize\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"imageQuality\", (None, \"80\")),\n])\nr.raise_for_status()\nwith open(\"small.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"imageQuality\", \"80\");\n  const res = await fetch(\"http://localhost:3000/forms/pdfengines/optimize\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"small.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdfengines/convert": {
      "post": {
        "operationId": "pdfenginesConvert",
        "summary": "Make PDFs PDF/A or PDF/UA",
        "description": "Makes PDFs a PDF/A level, accessible (PDF/UA), or both. Off with `--pdfengines-disable-routes`.",
        "tags": [
          "PDF engines"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "pdfa": {
                    "type": "string",
                    "enum": [
                      "PDF/A-1b",
                      "PDF/A-2b",
                      "PDF/A-3b"
                    ],
                    "description": "The PDF/A level.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "pdfua": {
                    "type": "boolean",
                    "description": "Makes the PDFs accessible (PDF/UA).\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdfengines-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdfengines/convert -F files=@a.pdf -F pdfa=PDF/A-2b -o archive.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdfengines/convert -F files=@a.pdf -F pdfa=PDF/A-2b -o archive.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdfengines/convert\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"pdfa\", (None, \"PDF/A-2b\")),\n])\nr.raise_for_status()\nwith open(\"archive.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"pdfa\", \"PDF/A-2b\");\n  const res = await fetch(\"http://localhost:3000/forms/pdfengines/convert\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"archive.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdfengines/rotate": {
      "post": {
        "operationId": "pdfenginesRotate",
        "summary": "Rotate pages",
        "description": "Turns pages by 90, 180 or 270 degrees. Off with `--pdfengines-disable-routes`.",
        "tags": [
          "PDF engines"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotateAngle": {
                    "type": "string",
                    "enum": [
                      "90",
                      "180",
                      "270"
                    ],
                    "description": "The angle, clockwise.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotatePages": {
                    "type": "string",
                    "description": "The pages turned: 1-3, 5; all when not given.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "rotateAngle"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdfengines-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdfengines/rotate -F files=@a.pdf -F rotateAngle=90 -o turned.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdfengines/rotate -F files=@a.pdf -F rotateAngle=90 -o turned.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdfengines/rotate\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"rotateAngle\", (None, \"90\")),\n])\nr.raise_for_status()\nwith open(\"turned.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"rotateAngle\", \"90\");\n  const res = await fetch(\"http://localhost:3000/forms/pdfengines/rotate\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"turned.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdfengines/encrypt": {
      "post": {
        "operationId": "pdfenginesEncrypt",
        "summary": "Protect PDFs with a password",
        "description": "Sets the passwords that open a PDF and lift its restrictions, and what is allowed. Off with `--pdfengines-disable-routes`.",
        "tags": [
          "PDF engines"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "userPassword": {
                    "type": "string",
                    "description": "The password that opens the PDF.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "ownerPassword": {
                    "type": "string",
                    "description": "The password that lifts its restrictions.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowPrinting": {
                    "type": "boolean",
                    "description": "Printing allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowModifying": {
                    "type": "boolean",
                    "description": "Changes allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowCopying": {
                    "type": "boolean",
                    "description": "Copying allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAnnotating": {
                    "type": "boolean",
                    "description": "Comments allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowFillingForms": {
                    "type": "boolean",
                    "description": "Filling in forms allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAssembling": {
                    "type": "boolean",
                    "description": "Changing pages allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "userPassword"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdfengines-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdfengines/encrypt -F files=@a.pdf -F userPassword=open -o locked.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdfengines/encrypt -F files=@a.pdf -F userPassword=open -o locked.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdfengines/encrypt\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"userPassword\", (None, \"open\")),\n])\nr.raise_for_status()\nwith open(\"locked.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"userPassword\", \"open\");\n  const res = await fetch(\"http://localhost:3000/forms/pdfengines/encrypt\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"locked.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdfengines/embed": {
      "post": {
        "operationId": "pdfenginesEmbed",
        "summary": "Carry files inside PDFs",
        "description": "Carries files inside each PDF as attachments. Off with `--pdfengines-disable-routes`.",
        "tags": [
          "PDF engines"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "embeds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The files carried inside each PDF.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "embedsMetadata": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "For each file carried inside, by its name: its mimeType and relationship.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxXml": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A Factur-X or ZUGFeRD invoice's XML, carried as the e-invoice (with facturxConformanceLevel).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxVersion": {
                    "type": "string",
                    "description": "The Factur-X version written.\n\nDefault: `1.0`.",
                    "default": "1.0",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxConformanceLevel": {
                    "type": "string",
                    "enum": [
                      "MINIMUM",
                      "BASIC WL",
                      "BASIC",
                      "EN 16931",
                      "EXTENDED",
                      "XRECHNUNG"
                    ],
                    "description": "The XML's profile.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxDocumentType": {
                    "type": "string",
                    "enum": [
                      "INVOICE",
                      "ORDER",
                      "ORDER_RESPONSE",
                      "ORDER_CHANGE"
                    ],
                    "description": "What the XML is.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "embeds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdfengines-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\nprintf 'Shipped on Friday.\\n' > note.txt\ncurl http://localhost:3000/forms/pdfengines/embed -F files=@a.pdf -F embeds=@note.txt -o with-note.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nprintf 'Shipped on Friday.\\n' > note.txt\nmarqius-kern run /forms/pdfengines/embed -F files=@a.pdf -F embeds=@note.txt -o with-note.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nwith open(\"note.txt\", \"w\") as f:\n    f.write(\"Shipped on Friday.\\n\")\n\nr = requests.post(\"http://localhost:3000/forms/pdfengines/embed\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"embeds\", (\"note.txt\", open(\"note.txt\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"with-note.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\nawait writeFile(\"note.txt\", \"Shipped on Friday.\\n\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"embeds\", new Blob([await readFile(\"note.txt\")]), \"note.txt\");\n  const res = await fetch(\"http://localhost:3000/forms/pdfengines/embed\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"with-note.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdfengines/factur-x": {
      "post": {
        "operationId": "pdfenginesFacturX",
        "summary": "Make PDFs Factur-X invoices",
        "description": "Makes each PDF a Factur-X / ZUGFeRD e-invoice carrying the XML sent. Off with `--pdfengines-disable-routes`.",
        "tags": [
          "PDF engines"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxXml": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The invoice's XML.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxVersion": {
                    "type": "string",
                    "description": "The Factur-X version written.\n\nDefault: `1.0`.",
                    "default": "1.0",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxConformanceLevel": {
                    "type": "string",
                    "enum": [
                      "MINIMUM",
                      "BASIC WL",
                      "BASIC",
                      "EN 16931",
                      "EXTENDED",
                      "XRECHNUNG"
                    ],
                    "description": "The XML's profile, when it does not say it.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "facturxDocumentType": {
                    "type": "string",
                    "enum": [
                      "INVOICE",
                      "ORDER",
                      "ORDER_RESPONSE",
                      "ORDER_CHANGE"
                    ],
                    "description": "What the XML is.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "pdfa": {
                    "type": "string",
                    "enum": [
                      "PDF/A-3b"
                    ],
                    "description": "PDF/A-3b, which Factur-X asks for.",
                    "examples": [
                      "PDF/A-3b"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "pdfua": {
                    "type": "boolean",
                    "description": "Makes the PDFs accessible too.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "userPassword": {
                    "type": "string",
                    "description": "Read only to refuse it: a PDF/A file, which a Factur-X invoice is, is never locked with a password. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "facturxXml"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdfengines-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o invoice-print.pdf\ncat > invoice.xml <<'XML'\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\" xmlns:ram=\"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100\" xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100\">\n  <rsm:ExchangedDocumentContext>\n    <ram:GuidelineSpecifiedDocumentContextParameter><ram:ID>urn:factur-x.eu:1p0:minimum</ram:ID></ram:GuidelineSpecifiedDocumentContextParameter>\n  </rsm:ExchangedDocumentContext>\n  <rsm:ExchangedDocument>\n    <ram:ID>INV-2026-001</ram:ID>\n    <ram:TypeCode>380</ram:TypeCode>\n    <ram:IssueDateTime><udt:DateTimeString format=\"102\">20261130</udt:DateTimeString></ram:IssueDateTime>\n  </rsm:ExchangedDocument>\n  <rsm:SupplyChainTradeTransaction>\n    <ram:ApplicableHeaderTradeAgreement>\n      <ram:SellerTradeParty>\n        <ram:Name>Example Ltd</ram:Name>\n        <ram:SpecifiedLegalOrganization><ram:ID>123456789</ram:ID></ram:SpecifiedLegalOrganization>\n        <ram:PostalTradeAddress><ram:CountryID>FR</ram:CountryID></ram:PostalTradeAddress>\n        <ram:SpecifiedTaxRegistration><ram:ID schemeID=\"VA\">FR32123456789</ram:ID></ram:SpecifiedTaxRegistration>\n      </ram:SellerTradeParty>\n      <ram:BuyerTradeParty><ram:Name>Client SA</ram:Name></ram:BuyerTradeParty>\n    </ram:ApplicableHeaderTradeAgreement>\n    <ram:ApplicableHeaderTradeDelivery/>\n    <ram:ApplicableHeaderTradeSettlement>\n      <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>\n      <ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n        <ram:TaxBasisTotalAmount>100.00</ram:TaxBasisTotalAmount>\n        <ram:TaxTotalAmount currencyID=\"EUR\">20.00</ram:TaxTotalAmount>\n        <ram:GrandTotalAmount>120.00</ram:GrandTotalAmount>\n        <ram:DuePayableAmount>120.00</ram:DuePayableAmount>\n      </ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n    </ram:ApplicableHeaderTradeSettlement>\n  </rsm:SupplyChainTradeTransaction>\n</rsm:CrossIndustryInvoice>\nXML\ncurl http://localhost:3000/forms/pdfengines/factur-x -F files=@invoice-print.pdf -F facturxXml=@invoice.xml -F facturxConformanceLevel=MINIMUM -o invoice.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o invoice-print.pdf\ncat > invoice.xml <<'XML'\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\" xmlns:ram=\"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100\" xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100\">\n  <rsm:ExchangedDocumentContext>\n    <ram:GuidelineSpecifiedDocumentContextParameter><ram:ID>urn:factur-x.eu:1p0:minimum</ram:ID></ram:GuidelineSpecifiedDocumentContextParameter>\n  </rsm:ExchangedDocumentContext>\n  <rsm:ExchangedDocument>\n    <ram:ID>INV-2026-001</ram:ID>\n    <ram:TypeCode>380</ram:TypeCode>\n    <ram:IssueDateTime><udt:DateTimeString format=\"102\">20261130</udt:DateTimeString></ram:IssueDateTime>\n  </rsm:ExchangedDocument>\n  <rsm:SupplyChainTradeTransaction>\n    <ram:ApplicableHeaderTradeAgreement>\n      <ram:SellerTradeParty>\n        <ram:Name>Example Ltd</ram:Name>\n        <ram:SpecifiedLegalOrganization><ram:ID>123456789</ram:ID></ram:SpecifiedLegalOrganization>\n        <ram:PostalTradeAddress><ram:CountryID>FR</ram:CountryID></ram:PostalTradeAddress>\n        <ram:SpecifiedTaxRegistration><ram:ID schemeID=\"VA\">FR32123456789</ram:ID></ram:SpecifiedTaxRegistration>\n      </ram:SellerTradeParty>\n      <ram:BuyerTradeParty><ram:Name>Client SA</ram:Name></ram:BuyerTradeParty>\n    </ram:ApplicableHeaderTradeAgreement>\n    <ram:ApplicableHeaderTradeDelivery/>\n    <ram:ApplicableHeaderTradeSettlement>\n      <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>\n      <ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n        <ram:TaxBasisTotalAmount>100.00</ram:TaxBasisTotalAmount>\n        <ram:TaxTotalAmount currencyID=\"EUR\">20.00</ram:TaxTotalAmount>\n        <ram:GrandTotalAmount>120.00</ram:GrandTotalAmount>\n        <ram:DuePayableAmount>120.00</ram:DuePayableAmount>\n      </ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n    </ram:ApplicableHeaderTradeSettlement>\n  </rsm:SupplyChainTradeTransaction>\n</rsm:CrossIndustryInvoice>\nXML\nmarqius-kern run /forms/pdfengines/factur-x -F files=@invoice-print.pdf -F facturxXml=@invoice.xml -F facturxConformanceLevel=MINIMUM -o invoice.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"invoice-print.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nwith open(\"invoice.xml\", \"w\") as f:\n    f.write('''<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\" xmlns:ram=\"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100\" xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100\">\n  <rsm:ExchangedDocumentContext>\n    <ram:GuidelineSpecifiedDocumentContextParameter><ram:ID>urn:factur-x.eu:1p0:minimum</ram:ID></ram:GuidelineSpecifiedDocumentContextParameter>\n  </rsm:ExchangedDocumentContext>\n  <rsm:ExchangedDocument>\n    <ram:ID>INV-2026-001</ram:ID>\n    <ram:TypeCode>380</ram:TypeCode>\n    <ram:IssueDateTime><udt:DateTimeString format=\"102\">20261130</udt:DateTimeString></ram:IssueDateTime>\n  </rsm:ExchangedDocument>\n  <rsm:SupplyChainTradeTransaction>\n    <ram:ApplicableHeaderTradeAgreement>\n      <ram:SellerTradeParty>\n        <ram:Name>Example Ltd</ram:Name>\n        <ram:SpecifiedLegalOrganization><ram:ID>123456789</ram:ID></ram:SpecifiedLegalOrganization>\n        <ram:PostalTradeAddress><ram:CountryID>FR</ram:CountryID></ram:PostalTradeAddress>\n        <ram:SpecifiedTaxRegistration><ram:ID schemeID=\"VA\">FR32123456789</ram:ID></ram:SpecifiedTaxRegistration>\n      </ram:SellerTradeParty>\n      <ram:BuyerTradeParty><ram:Name>Client SA</ram:Name></ram:BuyerTradeParty>\n    </ram:ApplicableHeaderTradeAgreement>\n    <ram:ApplicableHeaderTradeDelivery/>\n    <ram:ApplicableHeaderTradeSettlement>\n      <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>\n      <ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n        <ram:TaxBasisTotalAmount>100.00</ram:TaxBasisTotalAmount>\n        <ram:TaxTotalAmount currencyID=\"EUR\">20.00</ram:TaxTotalAmount>\n        <ram:GrandTotalAmount>120.00</ram:GrandTotalAmount>\n        <ram:DuePayableAmount>120.00</ram:DuePayableAmount>\n      </ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n    </ram:ApplicableHeaderTradeSettlement>\n  </rsm:SupplyChainTradeTransaction>\n</rsm:CrossIndustryInvoice>\n''')\n\nr = requests.post(\"http://localhost:3000/forms/pdfengines/factur-x\", files=[\n    (\"files\", (\"invoice-print.pdf\", open(\"invoice-print.pdf\", \"rb\"))),\n    (\"facturxXml\", (\"invoice.xml\", open(\"invoice.xml\", \"rb\"))),\n    (\"facturxConformanceLevel\", (None, \"MINIMUM\")),\n])\nr.raise_for_status()\nwith open(\"invoice.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"invoice-print.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\nawait writeFile(\"invoice.xml\", `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\" xmlns:ram=\"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100\" xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100\">\n  <rsm:ExchangedDocumentContext>\n    <ram:GuidelineSpecifiedDocumentContextParameter><ram:ID>urn:factur-x.eu:1p0:minimum</ram:ID></ram:GuidelineSpecifiedDocumentContextParameter>\n  </rsm:ExchangedDocumentContext>\n  <rsm:ExchangedDocument>\n    <ram:ID>INV-2026-001</ram:ID>\n    <ram:TypeCode>380</ram:TypeCode>\n    <ram:IssueDateTime><udt:DateTimeString format=\"102\">20261130</udt:DateTimeString></ram:IssueDateTime>\n  </rsm:ExchangedDocument>\n  <rsm:SupplyChainTradeTransaction>\n    <ram:ApplicableHeaderTradeAgreement>\n      <ram:SellerTradeParty>\n        <ram:Name>Example Ltd</ram:Name>\n        <ram:SpecifiedLegalOrganization><ram:ID>123456789</ram:ID></ram:SpecifiedLegalOrganization>\n        <ram:PostalTradeAddress><ram:CountryID>FR</ram:CountryID></ram:PostalTradeAddress>\n        <ram:SpecifiedTaxRegistration><ram:ID schemeID=\"VA\">FR32123456789</ram:ID></ram:SpecifiedTaxRegistration>\n      </ram:SellerTradeParty>\n      <ram:BuyerTradeParty><ram:Name>Client SA</ram:Name></ram:BuyerTradeParty>\n    </ram:ApplicableHeaderTradeAgreement>\n    <ram:ApplicableHeaderTradeDelivery/>\n    <ram:ApplicableHeaderTradeSettlement>\n      <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>\n      <ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n        <ram:TaxBasisTotalAmount>100.00</ram:TaxBasisTotalAmount>\n        <ram:TaxTotalAmount currencyID=\"EUR\">20.00</ram:TaxTotalAmount>\n        <ram:GrandTotalAmount>120.00</ram:GrandTotalAmount>\n        <ram:DuePayableAmount>120.00</ram:DuePayableAmount>\n      </ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n    </ram:ApplicableHeaderTradeSettlement>\n  </rsm:SupplyChainTradeTransaction>\n</rsm:CrossIndustryInvoice>\n`);\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"invoice-print.pdf\")]), \"invoice-print.pdf\");\n  form.append(\"facturxXml\", new Blob([await readFile(\"invoice.xml\")]), \"invoice.xml\");\n  form.append(\"facturxConformanceLevel\", \"MINIMUM\");\n  const res = await fetch(\"http://localhost:3000/forms/pdfengines/factur-x\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"invoice.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdfengines/stamp": {
      "post": {
        "operationId": "pdfenginesStamp",
        "summary": "Stamp pages",
        "description": "Draws text, a picture or a PDF over the pages. Off with `--pdfengines-disable-routes`.",
        "tags": [
          "PDF engines"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stamp": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The picture or PDF drawn over the pages.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the stamp is.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampExpression": {
                    "type": "string",
                    "description": "The stamp's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampPages": {
                    "type": "string",
                    "description": "The pages stamped.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the stamp is drawn: font, fontSize, color, opacity, rotation, position.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              },
              "encoding": {
                "stampSource": {
                  "explode": true
                },
                "stampExpression": {
                  "explode": true
                },
                "stampPages": {
                  "explode": true
                },
                "stampOptions": {
                  "explode": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdfengines-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdfengines/stamp -F files=@a.pdf -F stampSource=text -F stampExpression=PAID -o paid.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdfengines/stamp -F files=@a.pdf -F stampSource=text -F stampExpression=PAID -o paid.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdfengines/stamp\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"stampSource\", (None, \"text\")),\n    (\"stampExpression\", (None, \"PAID\")),\n])\nr.raise_for_status()\nwith open(\"paid.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"stampSource\", \"text\");\n  form.append(\"stampExpression\", \"PAID\");\n  const res = await fetch(\"http://localhost:3000/forms/pdfengines/stamp\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"paid.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdfengines/watermark": {
      "post": {
        "operationId": "pdfenginesWatermark",
        "summary": "Watermark pages",
        "description": "Draws text, a picture or a PDF under the pages' content. Off with `--pdfengines-disable-routes`.",
        "tags": [
          "PDF engines"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermark": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The picture or PDF drawn under the pages' content.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the watermark is.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkExpression": {
                    "type": "string",
                    "description": "The watermark's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkPages": {
                    "type": "string",
                    "description": "The pages watermarked.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the watermark is drawn, as for stamps.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              },
              "encoding": {
                "watermarkSource": {
                  "explode": true
                },
                "watermarkExpression": {
                  "explode": true
                },
                "watermarkPages": {
                  "explode": true
                },
                "watermarkOptions": {
                  "explode": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdfengines-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdfengines/watermark -F files=@a.pdf -F watermarkSource=text -F watermarkExpression=DRAFT -o draft.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdfengines/watermark -F files=@a.pdf -F watermarkSource=text -F watermarkExpression=DRAFT -o draft.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdfengines/watermark\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"watermarkSource\", (None, \"text\")),\n    (\"watermarkExpression\", (None, \"DRAFT\")),\n])\nr.raise_for_status()\nwith open(\"draft.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"watermarkSource\", \"text\");\n  form.append(\"watermarkExpression\", \"DRAFT\");\n  const res = await fetch(\"http://localhost:3000/forms/pdfengines/watermark\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"draft.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdfengines/metadata/read": {
      "post": {
        "operationId": "pdfenginesMetadataRead",
        "summary": "Read PDFs' metadata",
        "description": "Each PDF's metadata, as JSON by file name. Off with `--pdfengines-disable-routes`.",
        "tags": [
          "PDF engines"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "description": "Each PDF's metadata, by file name, under the names ExifTool gives it.",
                  "type": "object"
                },
                "example": {
                  "report.pdf": {
                    "CreateDate": "2026:11:30 16:44:37Z",
                    "Creator": "marqius",
                    "FileType": "PDF",
                    "MIMEType": "application/pdf",
                    "ModifyDate": "2026:11:30 16:44:37Z",
                    "PDFVersion": 1.7,
                    "PageCount": 1,
                    "Producer": "marqius 0.12.18",
                    "Title": "Quarterly report"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdfengines-disable-routes",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdfengines/metadata/read -F files=@a.pdf -o metadata.json"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdfengines/metadata/read -F files=@a.pdf -o metadata.json"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdfengines/metadata/read\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"metadata.json\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  const res = await fetch(\"http://localhost:3000/forms/pdfengines/metadata/read\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"metadata.json\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdfengines/metadata/write": {
      "post": {
        "operationId": "pdfenginesMetadataWrite",
        "summary": "Write PDFs' metadata",
        "description": "Writes metadata into each PDF. Off with `--pdfengines-disable-routes`.",
        "tags": [
          "PDF engines"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "metadata": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "The metadata to write: {\"Author\": \"…\", \"Title\": \"…\"}.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "metadata"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdfengines-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdfengines/metadata/write -F files=@a.pdf -F 'metadata={\"Title\":\"Hello\",\"Author\":\"Ada\"}' -o titled.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdfengines/metadata/write -F files=@a.pdf -F 'metadata={\"Title\":\"Hello\",\"Author\":\"Ada\"}' -o titled.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdfengines/metadata/write\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"metadata\", (None, \"{\\\"Title\\\":\\\"Hello\\\",\\\"Author\\\":\\\"Ada\\\"}\")),\n])\nr.raise_for_status()\nwith open(\"titled.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"metadata\", \"{\\\"Title\\\":\\\"Hello\\\",\\\"Author\\\":\\\"Ada\\\"}\");\n  const res = await fetch(\"http://localhost:3000/forms/pdfengines/metadata/write\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"titled.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdfengines/bookmarks/read": {
      "post": {
        "operationId": "pdfenginesBookmarksRead",
        "summary": "Read PDFs' bookmarks",
        "description": "Each PDF's bookmarks, as JSON by file name. Off with `--pdfengines-disable-routes`.",
        "tags": [
          "PDF engines"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "items": {
                      "$ref": "#/components/schemas/Bookmark"
                    },
                    "type": "array"
                  },
                  "description": "Each PDF's bookmarks, by file name.",
                  "type": "object"
                },
                "example": {
                  "report.pdf": [
                    {
                      "children": [
                        {
                          "page": 1,
                          "title": "Detail"
                        }
                      ],
                      "page": 1,
                      "title": "Start"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdfengines-disable-routes",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdfengines/bookmarks/read -F files=@a.pdf -o bookmarks.json"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdfengines/bookmarks/read -F files=@a.pdf -o bookmarks.json"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdfengines/bookmarks/read\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"bookmarks.json\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  const res = await fetch(\"http://localhost:3000/forms/pdfengines/bookmarks/read\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"bookmarks.json\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdfengines/bookmarks/write": {
      "post": {
        "operationId": "pdfenginesBookmarksWrite",
        "summary": "Write PDFs' bookmarks",
        "description": "Writes bookmarks into each PDF. Off with `--pdfengines-disable-routes`.",
        "tags": [
          "PDF engines"
        ],
        "x-kern-api": "gotenberg-8.40.0",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "bookmarks": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "The bookmarks: [{\"title\": \"…\", \"page\": 1, \"children\": [...]}], or by file name for several PDFs.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "bookmarks"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdfengines-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdfengines/bookmarks/write -F files=@a.pdf -F 'bookmarks=[{\"title\":\"Start\",\"page\":1}]' -o marked.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdfengines/bookmarks/write -F files=@a.pdf -F 'bookmarks=[{\"title\":\"Start\",\"page\":1}]' -o marked.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdfengines/bookmarks/write\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"bookmarks\", (None, \"[{\\\"title\\\":\\\"Start\\\",\\\"page\\\":1}]\")),\n])\nr.raise_for_status()\nwith open(\"marked.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"bookmarks\", \"[{\\\"title\\\":\\\"Start\\\",\\\"page\\\":1}]\");\n  const res = await fetch(\"http://localhost:3000/forms/pdfengines/bookmarks/write\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"marked.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/kern/convert/email": {
      "post": {
        "operationId": "kernConvertEmail",
        "summary": "Convert emails to PDF",
        "description": "Makes emails and mailboxes into PDFs that keep them whole; what did not reach the pages is said in the X-Marqius-Kern-Note header. Off with `--kern-disable-routes`.",
        "tags": [
          "Marqius Kern"
        ],
        "x-kern-api": "kern",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "Emails (.eml, .msg) and mailboxes (.mbox, .pst, .ost).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "profile": {
                    "type": "string",
                    "enum": [
                      "archive",
                      "court",
                      "plain"
                    ],
                    "description": "archive: an EA-PDF with the message and its attachments inside; court: for filing; plain: the message alone.\n\nDefault: `archive`.",
                    "default": "archive",
                    "examples": [
                      "archive"
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernReport": {
                    "type": "boolean",
                    "description": "Answers a ZIP of the PDFs and report.json: what each email became and what did not reach its pages.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitMode": {
                    "type": "string",
                    "enum": [
                      "intervals",
                      "pages"
                    ],
                    "description": "Splits the PDF: `intervals` into parts of splitSpan pages, `pages` into the pages splitSpan names. Several parts are answered as a ZIP.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitSpan": {
                    "type": "string",
                    "description": "The pages of each part: a number of pages for intervals, page ranges (1-3, 5) for pages.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitUnify": {
                    "type": "boolean",
                    "description": "With splitMode pages: the pages chosen in one PDF instead of one PDF each.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "metadata": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "The PDF's metadata to write: {\"Author\": \"…\", \"Title\": \"…\", \"Keywords\": [\"…\"]}.",
                    "examples": [
                      "{\"Title\":\"Marqius Kern\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "flatten": {
                    "type": "boolean",
                    "description": "Turns form fields and annotations into the page's own drawing.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "userPassword": {
                    "type": "string",
                    "description": "The password that opens the PDF.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "ownerPassword": {
                    "type": "string",
                    "description": "The password that lifts the PDF's restrictions.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowPrinting": {
                    "type": "boolean",
                    "description": "With a password: printing allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowModifying": {
                    "type": "boolean",
                    "description": "With a password: changes allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowCopying": {
                    "type": "boolean",
                    "description": "With a password: copying text and pictures allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAnnotating": {
                    "type": "boolean",
                    "description": "With a password: comments allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowFillingForms": {
                    "type": "boolean",
                    "description": "With a password: filling in forms allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAssembling": {
                    "type": "boolean",
                    "description": "With a password: inserting, rotating and deleting pages allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stamp": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A picture or a PDF drawn over the pages (stampSource image or pdf).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the stamp is: text (stampExpression), or the picture or PDF sent as `stamp`.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampExpression": {
                    "type": "string",
                    "description": "The stamp's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampPages": {
                    "type": "string",
                    "description": "The pages stamped: 1-3, 5; all when not given.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the stamp is drawn: {\"font\": \"Helvetica\", \"fontSize\": 24, \"color\": \"#ff0000\", \"opacity\": 0.5, \"rotation\": 45, \"position\": \"center\"}.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermark": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A picture or a PDF drawn under the pages' content (watermarkSource image or pdf).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the watermark is: text (watermarkExpression), or the picture or PDF sent as `watermark`.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkExpression": {
                    "type": "string",
                    "description": "The watermark's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkPages": {
                    "type": "string",
                    "description": "The pages watermarked: 1-3, 5; all when not given.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the watermark is drawn, as for stampOptions.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotateAngle": {
                    "type": "string",
                    "enum": [
                      "90",
                      "180",
                      "270"
                    ],
                    "description": "Turns the pages by this angle, clockwise.",
                    "examples": [
                      "90"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotatePages": {
                    "type": "string",
                    "description": "With rotateAngle: the pages turned: 1-3, 5; all when not given.",
                    "examples": [
                      "1"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "optimizeImages": {
                    "type": "boolean",
                    "description": "Packs the pictures again as JPEG, for a smaller file.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "imageQuality": {
                    "type": "integer",
                    "description": "With optimizeImages: the JPEG quality, from 1 to 100.",
                    "minimum": 1,
                    "maximum": 100,
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcr": {
                    "type": "string",
                    "enum": [
                      "true",
                      "false",
                      "auto"
                    ],
                    "description": "true (or auto): the pages that need it (scans: little text and a large picture) are read and laid over with hidden text, so the PDF can be searched and copied; the pages look as they did. The summary is in the X-Marqius-Kern-Ocr header.\n\nDefault: `false`.",
                    "default": "false",
                    "examples": [
                      "false"
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrEngine": {
                    "type": "string",
                    "description": "The engine that reads: Marqius Kern's own (the server's --kern-ocr-engine unless sent: ppocr-v6-tiny; ppocr-v6-small reads more accurately), tesseract, a folder added with `marqius-kern ocr add`, or an OCR server's name (--kern-ocr-server).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrLanguages": {
                    "type": "string",
                    "description": "The languages or scripts on the pages, comma-separated (ara, heb, hi, korean...): the default engine is swapped for Marqius Kern's engine that reads them.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrPages": {
                    "type": "string",
                    "description": "The pages to read if they need it: 1-3,5, even, odd, !1; all unless sent.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrOptional": {
                    "type": "boolean",
                    "description": "When OCR cannot run (no engine, a model not fetched yet), the file is answered as it is, with a note, instead of an error.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "pdfa": {
                    "type": "string",
                    "description": "Read only to refuse passwords with it, as Gotenberg refuses PDF/A with encryption: the profile decides what kind of PDF each email becomes. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "checked"
                  },
                  "kernFontReport": {
                    "type": "boolean",
                    "description": "Says in the X-Marqius-Kern-Fonts header which fonts each conversion used, their files, and what stood in for what (the server's --kern-font-report unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernRequireFonts": {
                    "type": "string",
                    "description": "Families this request must have, comma-separated: a conversion that cannot have one is refused (409) instead of printed in another font.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              },
              "encoding": {
                "stampSource": {
                  "explode": true
                },
                "stampExpression": {
                  "explode": true
                },
                "stampPages": {
                  "explode": true
                },
                "stampOptions": {
                  "explode": true
                },
                "watermarkSource": {
                  "explode": true
                },
                "watermarkExpression": {
                  "explode": true
                },
                "watermarkPages": {
                  "explode": true
                },
                "watermarkOptions": {
                  "explode": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "409": {
            "$ref": "#/components/responses/Status409"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--kern-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf 'From: Ada <ada@example.com>\\nTo: Bob <bob@example.com>\\nSubject: Hello\\nDate: Mon, 30 Nov 2026 10:00:00 +0000\\nContent-Type: text/plain; charset=utf-8\\n\\nThe report is attached in spirit.\\n' > hello.eml\ncurl http://localhost:3000/forms/kern/convert/email -F files=@hello.eml -o hello-email.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf 'From: Ada <ada@example.com>\\nTo: Bob <bob@example.com>\\nSubject: Hello\\nDate: Mon, 30 Nov 2026 10:00:00 +0000\\nContent-Type: text/plain; charset=utf-8\\n\\nThe report is attached in spirit.\\n' > hello.eml\nmarqius-kern run /forms/kern/convert/email -F files=@hello.eml -o hello-email.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"hello.eml\", \"w\") as f:\n    f.write('''From: Ada <ada@example.com>\nTo: Bob <bob@example.com>\nSubject: Hello\nDate: Mon, 30 Nov 2026 10:00:00 +0000\nContent-Type: text/plain; charset=utf-8\n\nThe report is attached in spirit.\n''')\n\nr = requests.post(\"http://localhost:3000/forms/kern/convert/email\", files=[\n    (\"files\", (\"hello.eml\", open(\"hello.eml\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"hello-email.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"hello.eml\", `From: Ada <ada@example.com>\nTo: Bob <bob@example.com>\nSubject: Hello\nDate: Mon, 30 Nov 2026 10:00:00 +0000\nContent-Type: text/plain; charset=utf-8\n\nThe report is attached in spirit.\n`);\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"hello.eml\")]), \"hello.eml\");\n  const res = await fetch(\"http://localhost:3000/forms/kern/convert/email\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"hello-email.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/kern/ocr": {
      "post": {
        "operationId": "kernOcr",
        "summary": "Make scans searchable",
        "description": "Scans (PDFs and pictures) as searchable PDFs: each page read and laid over with hidden text, the pages as they were; several documents are answered as a ZIP. The summary is in the X-Marqius-Kern-Ocr header. Off with `--kern-disable-routes`.",
        "tags": [
          "Marqius Kern"
        ],
        "x-kern-api": "kern",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The scans: PDFs and pictures (TIFF, of one page or many; JPEG, PNG, WebP, GIF, BMP), each answered as a PDF; with kernOcrFrom, the results beside them (scan.hocr for scan.pdf).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrEngine": {
                    "type": "string",
                    "description": "The engine that reads: Marqius Kern's own (the server's --kern-ocr-engine unless sent: ppocr-v6-tiny; ppocr-v6-small reads more accurately), tesseract, a folder added with `marqius-kern ocr add`, or an OCR server's name (--kern-ocr-server).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrLanguages": {
                    "type": "string",
                    "description": "The languages or scripts on the pages, comma-separated (ara, heb, hi, korean...): the default engine is swapped for Marqius Kern's engine that reads them.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrPages": {
                    "type": "string",
                    "description": "The pages to read if they need it: 1-3,5, even, odd, !1; all unless sent.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrOptional": {
                    "type": "boolean",
                    "description": "When OCR cannot run (no engine, a model not fetched yet), the file is answered as it is, with a note, instead of an error.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcrFrom": {
                    "type": "string",
                    "enum": [
                      "hocr",
                      "alto",
                      "json"
                    ],
                    "description": "Builds the layer from another engine's results sent with the documents (scan.hocr beside scan.pdf) instead of reading.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "pdfa": {
                    "type": "string",
                    "enum": [
                      "PDF/A-1b",
                      "PDF/A-2b",
                      "PDF/A-2u",
                      "PDF/A-3b",
                      "PDF/A-3u",
                      "PDF/A-4"
                    ],
                    "description": "The PDF/A level, Marqius Kern's PDF/A-2u and 3u included, where every letter of the text keeps its Unicode meaning.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "pdfua": {
                    "type": "boolean",
                    "description": "Makes the PDFs accessible (PDF/UA).\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitMode": {
                    "type": "string",
                    "enum": [
                      "intervals",
                      "pages"
                    ],
                    "description": "Splits the PDF: `intervals` into parts of splitSpan pages, `pages` into the pages splitSpan names. Several parts are answered as a ZIP.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitSpan": {
                    "type": "string",
                    "description": "The pages of each part: a number of pages for intervals, page ranges (1-3, 5) for pages.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "splitUnify": {
                    "type": "boolean",
                    "description": "With splitMode pages: the pages chosen in one PDF instead of one PDF each.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "metadata": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "The PDF's metadata to write: {\"Author\": \"…\", \"Title\": \"…\", \"Keywords\": [\"…\"]}.",
                    "examples": [
                      "{\"Title\":\"Marqius Kern\"}"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "flatten": {
                    "type": "boolean",
                    "description": "Turns form fields and annotations into the page's own drawing.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "userPassword": {
                    "type": "string",
                    "description": "The password that opens the PDF.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "ownerPassword": {
                    "type": "string",
                    "description": "The password that lifts the PDF's restrictions.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowPrinting": {
                    "type": "boolean",
                    "description": "With a password: printing allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowModifying": {
                    "type": "boolean",
                    "description": "With a password: changes allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowCopying": {
                    "type": "boolean",
                    "description": "With a password: copying text and pictures allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAnnotating": {
                    "type": "boolean",
                    "description": "With a password: comments allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowFillingForms": {
                    "type": "boolean",
                    "description": "With a password: filling in forms allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "allowAssembling": {
                    "type": "boolean",
                    "description": "With a password: inserting, rotating and deleting pages allowed.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stamp": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A picture or a PDF drawn over the pages (stampSource image or pdf).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the stamp is: text (stampExpression), or the picture or PDF sent as `stamp`.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampExpression": {
                    "type": "string",
                    "description": "The stamp's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampPages": {
                    "type": "string",
                    "description": "The pages stamped: 1-3, 5; all when not given.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "stampOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the stamp is drawn: {\"font\": \"Helvetica\", \"fontSize\": 24, \"color\": \"#ff0000\", \"opacity\": 0.5, \"rotation\": 45, \"position\": \"center\"}.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermark": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "A picture or a PDF drawn under the pages' content (watermarkSource image or pdf).",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkSource": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "pdf"
                    ],
                    "description": "What the watermark is: text (watermarkExpression), or the picture or PDF sent as `watermark`.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkExpression": {
                    "type": "string",
                    "description": "The watermark's text, or the name of its file.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkPages": {
                    "type": "string",
                    "description": "The pages watermarked: 1-3, 5; all when not given.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "watermarkOptions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "How the watermark is drawn, as for stampOptions.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotateAngle": {
                    "type": "string",
                    "enum": [
                      "90",
                      "180",
                      "270"
                    ],
                    "description": "Turns the pages by this angle, clockwise.",
                    "examples": [
                      "90"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "rotatePages": {
                    "type": "string",
                    "description": "With rotateAngle: the pages turned: 1-3, 5; all when not given.",
                    "examples": [
                      "1"
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "optimizeImages": {
                    "type": "boolean",
                    "description": "Packs the pictures again as JPEG, for a smaller file.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "imageQuality": {
                    "type": "integer",
                    "description": "With optimizeImages: the JPEG quality, from 1 to 100.",
                    "minimum": 1,
                    "maximum": 100,
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernOcr": {
                    "type": "string",
                    "enum": [
                      "true",
                      "false",
                      "auto"
                    ],
                    "description": "true (or auto): the pages that need it (scans: little text and a large picture) are read and laid over with hidden text, so the PDF can be searched and copied; the pages look as they did. The summary is in the X-Marqius-Kern-Ocr header.\n\nDefault: `false`.",
                    "default": "false",
                    "examples": [
                      "false"
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              },
              "encoding": {
                "stampSource": {
                  "explode": true
                },
                "stampExpression": {
                  "explode": true
                },
                "stampPages": {
                  "explode": true
                },
                "stampOptions": {
                  "explode": true
                },
                "watermarkSource": {
                  "explode": true
                },
                "watermarkExpression": {
                  "explode": true
                },
                "watermarkPages": {
                  "explode": true
                },
                "watermarkOptions": {
                  "explode": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "403": {
            "$ref": "#/components/responses/Status403"
          },
          "409": {
            "$ref": "#/components/responses/Status409"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--kern-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/screenshot/html -F files=@index.html -o scan.png\ncurl http://localhost:3000/forms/kern/ocr -F files=@scan.png -o searchable.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/screenshot/html -F files=@index.html -o scan.png\nmarqius-kern run /forms/kern/ocr -F files=@scan.png -o searchable.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/screenshot/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"scan.png\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/kern/ocr\", files=[\n    (\"files\", (\"scan.png\", open(\"scan.png\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"searchable.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/screenshot/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"scan.png\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"scan.png\")]), \"scan.png\");\n  const res = await fetch(\"http://localhost:3000/forms/kern/ocr\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"searchable.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/kern/extract/markdown": {
      "post": {
        "operationId": "kernExtractMarkdown",
        "summary": "Read documents as Markdown",
        "description": "Any document Marqius Kern converts, and emails, as Markdown (or plain text, or JSON) in reading order, with no PDF made from it: for search, AI agents and no-code tools. What could not be read (a scanned page, a hidden sheet) is said in the X-Marqius-Kern-Note header. Off with `--kern-disable-routes`.",
        "tags": [
          "Marqius Kern"
        ],
        "x-kern-api": "kern",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The documents: PDF, Word, Excel, PowerPoint, OpenDocument, RTF, Word 97-2003, text, HTML and Markdown, and emails (.eml, .msg).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "markdown",
                      "text",
                      "json"
                    ],
                    "description": "markdown; text, plain; or json, one document for them all: each file's name, kind, title and pages, its whole text and each part's (page, slide, sheet, attachment), and what could not be read.\n\nDefault: `markdown`.",
                    "default": "markdown",
                    "examples": [
                      "markdown"
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "pages": {
                    "type": "string",
                    "description": "A PDF's pages: 1-3,5, even, !last.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "pageMarks": {
                    "type": "boolean",
                    "description": "In Markdown, `<!-- page 3 -->` before each page of a PDF.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "annotations": {
                    "type": "boolean",
                    "description": "The text of form fields, comments and stamps, as a viewer shows it.\n\nDefault: `true`.",
                    "default": true,
                    "examples": [
                      true
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "artifacts": {
                    "type": "boolean",
                    "description": "The running heads and feet and the page numbers.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "invisible": {
                    "type": "boolean",
                    "description": "Text drawn invisible: true reads every page's, false none. Unless sent, only a searchable scan's text under its picture is read, since invisible text elsewhere can hide words from the people who read the page.",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "asText": {
                    "type": "boolean",
                    "description": "With format json: the text in it as plain text, not Markdown.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "password": {
                    "type": "string",
                    "description": "Opens a password-protected Office or OpenDocument file.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The text: Markdown, plain text or JSON, as `format` asks; several documents' texts as a ZIP (one JSON document for them all with `format` json).",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "text/markdown"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "text/plain"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "409": {
            "$ref": "#/components/responses/Status409"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--kern-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "text/markdown": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "text/markdown"
                      }
                    },
                    "text/plain": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "text/plain"
                      }
                    },
                    "application/json": {
                      "schema": {
                        "type": "object"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/kern/extract/markdown -F files=@a.pdf -o a.md"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/kern/extract/markdown -F files=@a.pdf -o a.md"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/kern/extract/markdown\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.md\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  const res = await fetch(\"http://localhost:3000/forms/kern/extract/markdown\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.md\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/kern/openapi.yaml": {
      "get": {
        "operationId": "kernOpenapiYaml",
        "summary": "Marqius Kern's OpenAPI document",
        "description": "This document, as YAML: the routes this server answers, and every field each reads. Off with `--kern-disable-routes`.",
        "tags": [
          "Marqius Kern"
        ],
        "x-kern-api": "kern",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "responses": {
          "200": {
            "description": "Marqius Kern's OpenAPI document.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "application/yaml": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--kern-disable-routes",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl http://localhost:3000/forms/kern/openapi.yaml -o kern-openapi.yaml"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nr = requests.get(\"http://localhost:3000/forms/kern/openapi.yaml\")\nr.raise_for_status()\nwith open(\"kern-openapi.yaml\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { writeFile } from \"node:fs/promises\";\n\n{\n  const res = await fetch(\"http://localhost:3000/forms/kern/openapi.yaml\");\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"kern-openapi.yaml\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      },
      "head": {
        "operationId": "kernOpenapiYamlHead",
        "summary": "Marqius Kern's OpenAPI document",
        "description": "This document, as YAML: the routes this server answers, and every field each reads. Off with `--kern-disable-routes`.",
        "tags": [
          "Marqius Kern"
        ],
        "x-kern-api": "kern",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "responses": {
          "200": {
            "description": "Marqius Kern's OpenAPI document.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "application/yaml": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--kern-disable-routes"
      }
    },
    "/forms/kern/openapi.json": {
      "get": {
        "operationId": "kernOpenapiJson",
        "summary": "Marqius Kern's OpenAPI document, as JSON",
        "description": "This document, as JSON. Off with `--kern-disable-routes`.",
        "tags": [
          "Marqius Kern"
        ],
        "x-kern-api": "kern",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "responses": {
          "200": {
            "description": "Marqius Kern's OpenAPI document.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--kern-disable-routes",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "curl http://localhost:3000/forms/kern/openapi.json -o kern-openapi.json"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nr = requests.get(\"http://localhost:3000/forms/kern/openapi.json\")\nr.raise_for_status()\nwith open(\"kern-openapi.json\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { writeFile } from \"node:fs/promises\";\n\n{\n  const res = await fetch(\"http://localhost:3000/forms/kern/openapi.json\");\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"kern-openapi.json\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      },
      "head": {
        "operationId": "kernOpenapiJsonHead",
        "summary": "Marqius Kern's OpenAPI document, as JSON",
        "description": "This document, as JSON. Off with `--kern-disable-routes`.",
        "tags": [
          "Marqius Kern"
        ],
        "x-kern-api": "kern",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "responses": {
          "200": {
            "description": "Marqius Kern's OpenAPI document.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--kern-disable-routes"
      }
    },
    "/forms/pdf/pipe": {
      "post": {
        "operationId": "pdfPipe",
        "summary": "Run operations on PDFs",
        "description": "Runs the operations of `stages` on the PDFs, in order: what one operation leaves, the next takes. A last operation that reads (render, extract-text, extract-attachments) answers its files beside the PDFs, as a ZIP. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "stages": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Operations run on the PDFs in order, each with its options as /forms/pdf's routes take them: a JSON array such as [{\"op\":\"set-metadata\",\"title\":\"Report\"},{\"op\":\"encrypt\",\"userPassword\":\"open\"}].",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "stages"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/pipe -F files=@a.pdf -F 'stages=[{\"op\":\"rotate\",\"angle\":90},{\"op\":\"set-metadata\",\"title\":\"Turned\"}]' -o turned.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/pipe -F files=@a.pdf -F 'stages=[{\"op\":\"rotate\",\"angle\":90},{\"op\":\"set-metadata\",\"title\":\"Turned\"}]' -o turned.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/pipe\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"stages\", (None, \"[{\\\"op\\\":\\\"rotate\\\",\\\"angle\\\":90},{\\\"op\\\":\\\"set-metadata\\\",\\\"title\\\":\\\"Turned\\\"}]\")),\n])\nr.raise_for_status()\nwith open(\"turned.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"stages\", \"[{\\\"op\\\":\\\"rotate\\\",\\\"angle\\\":90},{\\\"op\\\":\\\"set-metadata\\\",\\\"title\\\":\\\"Turned\\\"}]\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/pipe\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"turned.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/merge": {
      "post": {
        "operationId": "pdfMerge",
        "summary": "Merge PDFs",
        "description": "Merges the PDFs into one, in the order of their names. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "fileBookmarks": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "A bookmark for each PDF, labelled from its title or its file name: a JSON object.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "dropSignatures": {
                    "type": "boolean",
                    "description": "true: a signed PDF has its signatures taken out, as the change would break them; otherwise a signed PDF is refused.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\nmkdir -p cover && printf '<!doctype html><html><body style=\"background: #0b3d91\"><h1 style=\"color: white\">Cover</h1></body></html>' > cover/index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@cover/index.html -F printBackground=true -o cover.pdf\ncurl http://localhost:3000/forms/pdf/merge -F files=@a.pdf -F files=@cover.pdf -o merged.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmkdir -p cover && printf '<!doctype html><html><body style=\"background: #0b3d91\"><h1 style=\"color: white\">Cover</h1></body></html>' > cover/index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@cover/index.html -F printBackground=true -o cover.pdf\nmarqius-kern run /forms/pdf/merge -F files=@a.pdf -F files=@cover.pdf -o merged.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport os\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nos.makedirs(\"cover\", exist_ok=True)\n\nwith open(\"cover/index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body style=\\\"background: #0b3d91\\\"><h1 style=\\\"color: white\\\">Cover</h1></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"cover/index.html\", \"rb\"))),\n    (\"printBackground\", (None, \"true\")),\n])\nr.raise_for_status()\nwith open(\"cover.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/merge\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"files\", (\"cover.pdf\", open(\"cover.pdf\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"merged.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { mkdir, readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\nawait mkdir(\"cover\", { recursive: true });\n\nawait writeFile(\"cover/index.html\", \"<!doctype html><html><body style=\\\"background: #0b3d91\\\"><h1 style=\\\"color: white\\\">Cover</h1></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"cover/index.html\")]), \"index.html\");\n  form.append(\"printBackground\", \"true\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"cover.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"files\", new Blob([await readFile(\"cover.pdf\")]), \"cover.pdf\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/merge\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"merged.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/split": {
      "post": {
        "operationId": "pdfSplit",
        "summary": "Split PDFs",
        "description": "Splits each PDF into parts, answered as a ZIP. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "every": {
                    "type": "integer",
                    "description": "Parts of this many pages each.",
                    "minimum": 1,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "ranges": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Or the parts by their pages: a JSON array such as [\"1-3\",\"4\"].",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "dropSignatures": {
                    "type": "boolean",
                    "description": "true: a signed PDF has its signatures taken out, as the change would break them; otherwise a signed PDF is refused.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "mkdir -p three && printf '<!doctype html><html><body><h1 style=\"break-after: page\">One</h1><h1 style=\"break-after: page\">Two</h1><h1>Three</h1></body></html>' > three/index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@three/index.html -o pages.pdf\ncurl http://localhost:3000/forms/pdf/split -F files=@pages.pdf -F every=1 -o parts.zip"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "mkdir -p three && printf '<!doctype html><html><body><h1 style=\"break-after: page\">One</h1><h1 style=\"break-after: page\">Two</h1><h1>Three</h1></body></html>' > three/index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@three/index.html -o pages.pdf\nmarqius-kern run /forms/pdf/split -F files=@pages.pdf -F every=1 -o parts.zip"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport os\nimport requests\n\nos.makedirs(\"three\", exist_ok=True)\n\nwith open(\"three/index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1 style=\\\"break-after: page\\\">One</h1><h1 style=\\\"break-after: page\\\">Two</h1><h1>Three</h1></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"three/index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"pages.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/split\", files=[\n    (\"files\", (\"pages.pdf\", open(\"pages.pdf\", \"rb\"))),\n    (\"every\", (None, \"1\")),\n])\nr.raise_for_status()\nwith open(\"parts.zip\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { mkdir, readFile, writeFile } from \"node:fs/promises\";\n\nawait mkdir(\"three\", { recursive: true });\n\nawait writeFile(\"three/index.html\", \"<!doctype html><html><body><h1 style=\\\"break-after: page\\\">One</h1><h1 style=\\\"break-after: page\\\">Two</h1><h1>Three</h1></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"three/index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"pages.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"pages.pdf\")]), \"pages.pdf\");\n  form.append(\"every\", \"1\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/split\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"parts.zip\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/select": {
      "post": {
        "operationId": "pdfSelect",
        "summary": "Keep some pages",
        "description": "Keeps the pages named, in the order named. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "pages": {
                    "type": "string",
                    "description": "The pages kept, in the order named: 1-3,5, even, odd, last.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "dropSignatures": {
                    "type": "boolean",
                    "description": "true: a signed PDF has its signatures taken out, as the change would break them; otherwise a signed PDF is refused.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "mkdir -p three && printf '<!doctype html><html><body><h1 style=\"break-after: page\">One</h1><h1 style=\"break-after: page\">Two</h1><h1>Three</h1></body></html>' > three/index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@three/index.html -o pages.pdf\ncurl http://localhost:3000/forms/pdf/select -F files=@pages.pdf -F pages=3,1 -o picked.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "mkdir -p three && printf '<!doctype html><html><body><h1 style=\"break-after: page\">One</h1><h1 style=\"break-after: page\">Two</h1><h1>Three</h1></body></html>' > three/index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@three/index.html -o pages.pdf\nmarqius-kern run /forms/pdf/select -F files=@pages.pdf -F pages=3,1 -o picked.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport os\nimport requests\n\nos.makedirs(\"three\", exist_ok=True)\n\nwith open(\"three/index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1 style=\\\"break-after: page\\\">One</h1><h1 style=\\\"break-after: page\\\">Two</h1><h1>Three</h1></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"three/index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"pages.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/select\", files=[\n    (\"files\", (\"pages.pdf\", open(\"pages.pdf\", \"rb\"))),\n    (\"pages\", (None, \"3,1\")),\n])\nr.raise_for_status()\nwith open(\"picked.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { mkdir, readFile, writeFile } from \"node:fs/promises\";\n\nawait mkdir(\"three\", { recursive: true });\n\nawait writeFile(\"three/index.html\", \"<!doctype html><html><body><h1 style=\\\"break-after: page\\\">One</h1><h1 style=\\\"break-after: page\\\">Two</h1><h1>Three</h1></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"three/index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"pages.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"pages.pdf\")]), \"pages.pdf\");\n  form.append(\"pages\", \"3,1\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/select\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"picked.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/delete": {
      "post": {
        "operationId": "pdfDelete",
        "summary": "Delete pages",
        "description": "Takes the pages named out. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "pages": {
                    "type": "string",
                    "description": "The pages taken out: 1-3,5, even, odd, last.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "dropSignatures": {
                    "type": "boolean",
                    "description": "true: a signed PDF has its signatures taken out, as the change would break them; otherwise a signed PDF is refused.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "mkdir -p three && printf '<!doctype html><html><body><h1 style=\"break-after: page\">One</h1><h1 style=\"break-after: page\">Two</h1><h1>Three</h1></body></html>' > three/index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@three/index.html -o pages.pdf\ncurl http://localhost:3000/forms/pdf/delete -F files=@pages.pdf -F pages=2 -o fewer.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "mkdir -p three && printf '<!doctype html><html><body><h1 style=\"break-after: page\">One</h1><h1 style=\"break-after: page\">Two</h1><h1>Three</h1></body></html>' > three/index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@three/index.html -o pages.pdf\nmarqius-kern run /forms/pdf/delete -F files=@pages.pdf -F pages=2 -o fewer.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport os\nimport requests\n\nos.makedirs(\"three\", exist_ok=True)\n\nwith open(\"three/index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1 style=\\\"break-after: page\\\">One</h1><h1 style=\\\"break-after: page\\\">Two</h1><h1>Three</h1></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"three/index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"pages.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/delete\", files=[\n    (\"files\", (\"pages.pdf\", open(\"pages.pdf\", \"rb\"))),\n    (\"pages\", (None, \"2\")),\n])\nr.raise_for_status()\nwith open(\"fewer.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { mkdir, readFile, writeFile } from \"node:fs/promises\";\n\nawait mkdir(\"three\", { recursive: true });\n\nawait writeFile(\"three/index.html\", \"<!doctype html><html><body><h1 style=\\\"break-after: page\\\">One</h1><h1 style=\\\"break-after: page\\\">Two</h1><h1>Three</h1></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"three/index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"pages.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"pages.pdf\")]), \"pages.pdf\");\n  form.append(\"pages\", \"2\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/delete\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"fewer.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/insert": {
      "post": {
        "operationId": "pdfInsert",
        "summary": "Insert pages",
        "description": "Inserts another PDF's pages after a page. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "source": {
                    "type": "string",
                    "description": "The name of the PDF sent with the request whose pages are inserted.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "at": {
                    "type": "integer",
                    "description": "The page after which they go: 0 puts them first.\n\nDefault: `0`.",
                    "default": 0,
                    "minimum": 0,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "sourcePages": {
                    "type": "string",
                    "description": "The source's pages inserted: 1-3,5; all unless given.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "dropSignatures": {
                    "type": "boolean",
                    "description": "true: a signed PDF has its signatures taken out, as the change would break them; otherwise a signed PDF is refused.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "source"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\nmkdir -p cover && printf '<!doctype html><html><body style=\"background: #0b3d91\"><h1 style=\"color: white\">Cover</h1></body></html>' > cover/index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@cover/index.html -F printBackground=true -o cover.pdf\ncurl http://localhost:3000/forms/pdf/insert -F files=@a.pdf -F files=@cover.pdf -F source=cover.pdf -F at=0 -o with-cover.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmkdir -p cover && printf '<!doctype html><html><body style=\"background: #0b3d91\"><h1 style=\"color: white\">Cover</h1></body></html>' > cover/index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@cover/index.html -F printBackground=true -o cover.pdf\nmarqius-kern run /forms/pdf/insert -F files=@a.pdf -F files=@cover.pdf -F source=cover.pdf -F at=0 -o with-cover.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport os\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nos.makedirs(\"cover\", exist_ok=True)\n\nwith open(\"cover/index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body style=\\\"background: #0b3d91\\\"><h1 style=\\\"color: white\\\">Cover</h1></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"cover/index.html\", \"rb\"))),\n    (\"printBackground\", (None, \"true\")),\n])\nr.raise_for_status()\nwith open(\"cover.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/insert\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"files\", (\"cover.pdf\", open(\"cover.pdf\", \"rb\"))),\n    (\"source\", (None, \"cover.pdf\")),\n    (\"at\", (None, \"0\")),\n])\nr.raise_for_status()\nwith open(\"with-cover.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { mkdir, readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\nawait mkdir(\"cover\", { recursive: true });\n\nawait writeFile(\"cover/index.html\", \"<!doctype html><html><body style=\\\"background: #0b3d91\\\"><h1 style=\\\"color: white\\\">Cover</h1></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"cover/index.html\")]), \"index.html\");\n  form.append(\"printBackground\", \"true\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"cover.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"files\", new Blob([await readFile(\"cover.pdf\")]), \"cover.pdf\");\n  form.append(\"source\", \"cover.pdf\");\n  form.append(\"at\", \"0\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/insert\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"with-cover.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/rotate": {
      "post": {
        "operationId": "pdfRotate",
        "summary": "Rotate pages",
        "description": "Turns pages by a multiple of 90 degrees. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "angle": {
                    "type": "integer",
                    "description": "The angle, clockwise: a multiple of 90.",
                    "multipleOf": 90,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "pages": {
                    "type": "string",
                    "description": "The pages turned: 1-3,5, even, odd, last; all unless given.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "angle"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/rotate -F files=@a.pdf -F angle=90 -o turned.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/rotate -F files=@a.pdf -F angle=90 -o turned.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/rotate\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"angle\", (None, \"90\")),\n])\nr.raise_for_status()\nwith open(\"turned.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"angle\", \"90\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/rotate\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"turned.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/compose": {
      "post": {
        "operationId": "pdfCompose",
        "summary": "Compose pages on new sheets",
        "description": "Places pages, scaled, on new sheets of a paper size: labels, booklets, several pages to a sheet. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "paperSize": {
                    "type": "string",
                    "description": "The new sheets' paper by name, such as A4 or Letter.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "paperWidth": {
                    "type": "string",
                    "description": "Or the new sheets' width: inches, or a number with a unit (6in, 432pt).",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "paperHeight": {
                    "type": "string",
                    "description": "And their height.",
                    "pattern": "^[0-9]*\\.?[0-9]+(in|mm|cm|pt|px|pc)?$",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "placements": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Where pages land: a JSON array of objects with source (a PDF's name), sourcePage, page (the sheet), x, y (points from the lower left) and scale.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "dropSignatures": {
                    "type": "boolean",
                    "description": "true: a signed PDF has its signatures taken out, as the change would break them; otherwise a signed PDF is refused.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "placements"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/compose -F files=@a.pdf -F paperSize=A4 -F 'placements=[{\"source\":\"a.pdf\",\"x\":0,\"y\":421,\"scale\":0.5},{\"source\":\"a.pdf\",\"x\":298,\"y\":421,\"scale\":0.5}]' -o two-up.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/compose -F files=@a.pdf -F paperSize=A4 -F 'placements=[{\"source\":\"a.pdf\",\"x\":0,\"y\":421,\"scale\":0.5},{\"source\":\"a.pdf\",\"x\":298,\"y\":421,\"scale\":0.5}]' -o two-up.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/compose\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"paperSize\", (None, \"A4\")),\n    (\"placements\", (None, \"[{\\\"source\\\":\\\"a.pdf\\\",\\\"x\\\":0,\\\"y\\\":421,\\\"scale\\\":0.5},{\\\"source\\\":\\\"a.pdf\\\",\\\"x\\\":298,\\\"y\\\":421,\\\"scale\\\":0.5}]\")),\n])\nr.raise_for_status()\nwith open(\"two-up.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"paperSize\", \"A4\");\n  form.append(\"placements\", \"[{\\\"source\\\":\\\"a.pdf\\\",\\\"x\\\":0,\\\"y\\\":421,\\\"scale\\\":0.5},{\\\"source\\\":\\\"a.pdf\\\",\\\"x\\\":298,\\\"y\\\":421,\\\"scale\\\":0.5}]\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/compose\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"two-up.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/encrypt": {
      "post": {
        "operationId": "pdfEncrypt",
        "summary": "Protect PDFs with a password",
        "description": "Sets the passwords that open a PDF and lift its restrictions, and what a reader may do. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "userPassword": {
                    "type": "string",
                    "description": "The password that opens the PDF.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "ownerPassword": {
                    "type": "string",
                    "description": "The password that lifts its restrictions.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "algorithm": {
                    "type": "string",
                    "enum": [
                      "aes256",
                      "aes128",
                      "rc4-128",
                      "rc4-40"
                    ],
                    "description": "The encryption.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "permissions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "What a reader may do without the owner password: a JSON object such as {\"print\":false,\"copy\":false}.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "dropSignatures": {
                    "type": "boolean",
                    "description": "true: a signed PDF has its signatures taken out, as the change would break them; otherwise a signed PDF is refused.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/encrypt -F files=@a.pdf -F userPassword=open -o locked.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/encrypt -F files=@a.pdf -F userPassword=open -o locked.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/encrypt\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"userPassword\", (None, \"open\")),\n])\nr.raise_for_status()\nwith open(\"locked.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"userPassword\", \"open\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/encrypt\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"locked.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/decrypt": {
      "post": {
        "operationId": "pdfDecrypt",
        "summary": "Remove PDFs' passwords",
        "description": "Opens password-protected PDFs and answers them without their encryption. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "password": {
                    "type": "string",
                    "description": "The password that opens the PDFs.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "dropSignatures": {
                    "type": "boolean",
                    "description": "true: a signed PDF has its signatures taken out, as the change would break them; otherwise a signed PDF is refused.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/encrypt -F files=@a.pdf -F userPassword=open -o locked.pdf\ncurl http://localhost:3000/forms/pdf/decrypt -F files=@locked.pdf -F password=open -o unlocked.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/encrypt -F files=@a.pdf -F userPassword=open -o locked.pdf\nmarqius-kern run /forms/pdf/decrypt -F files=@locked.pdf -F password=open -o unlocked.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/encrypt\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"userPassword\", (None, \"open\")),\n])\nr.raise_for_status()\nwith open(\"locked.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/decrypt\", files=[\n    (\"files\", (\"locked.pdf\", open(\"locked.pdf\", \"rb\"))),\n    (\"password\", (None, \"open\")),\n])\nr.raise_for_status()\nwith open(\"unlocked.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"userPassword\", \"open\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/encrypt\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"locked.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"locked.pdf\")]), \"locked.pdf\");\n  form.append(\"password\", \"open\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/decrypt\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"unlocked.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/optimize": {
      "post": {
        "operationId": "pdfOptimize",
        "summary": "Optimise PDFs",
        "description": "Makes PDFs smaller without losing anything: object streams, duplicates removed, streams and pictures compressed again without loss, fonts cut to the letters used. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "objectStreams": {
                    "type": "boolean",
                    "description": "Packs the PDF's objects into compressed object streams.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "dedup": {
                    "type": "boolean",
                    "description": "Keeps one copy of what is the same (pictures, fonts).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "recompressImages": {
                    "type": "boolean",
                    "description": "Compresses pictures again, without loss.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "compressStreams": {
                    "type": "boolean",
                    "description": "Compresses the content streams again.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "subsetFonts": {
                    "type": "boolean",
                    "description": "Cuts the fonts down to the letters used.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "dropSignatures": {
                    "type": "boolean",
                    "description": "true: a signed PDF has its signatures taken out, as the change would break them; otherwise a signed PDF is refused.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/optimize -F files=@a.pdf -o small.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/optimize -F files=@a.pdf -o small.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/optimize\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"small.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/optimize\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"small.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/set-metadata": {
      "post": {
        "operationId": "pdfSetMetadata",
        "summary": "Write PDFs' metadata",
        "description": "Writes the document's title, author and other details. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "title": {
                    "type": "string",
                    "description": "The document's title.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "author": {
                    "type": "string",
                    "description": "Its author.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "subject": {
                    "type": "string",
                    "description": "Its subject.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "keywords": {
                    "type": "string",
                    "description": "Its keywords.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "creator": {
                    "type": "string",
                    "description": "The program that made the original document.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "producer": {
                    "type": "string",
                    "description": "The program that made the PDF.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "creationDate": {
                    "type": "string",
                    "description": "When it was made, as an RFC 3339 date and time.",
                    "format": "date-time",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "modDate": {
                    "type": "string",
                    "description": "When it was last changed, as an RFC 3339 date and time.",
                    "format": "date-time",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/set-metadata -F files=@a.pdf -F title=Hello -F author=Ada -o titled.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/set-metadata -F files=@a.pdf -F title=Hello -F author=Ada -o titled.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/set-metadata\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"title\", (None, \"Hello\")),\n    (\"author\", (None, \"Ada\")),\n])\nr.raise_for_status()\nwith open(\"titled.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"title\", \"Hello\");\n  form.append(\"author\", \"Ada\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/set-metadata\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"titled.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/set-bookmarks": {
      "post": {
        "operationId": "pdfSetBookmarks",
        "summary": "Write PDFs' bookmarks",
        "description": "Replaces each PDF's bookmarks. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "bookmarks": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "The bookmarks: a JSON array of objects with title, pageNumber and children, such as [{\"title\":\"Intro\",\"pageNumber\":1}].",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "bookmarks"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/set-bookmarks -F files=@a.pdf -F 'bookmarks=[{\"title\":\"Start\",\"pageNumber\":1}]' -o marked.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/set-bookmarks -F files=@a.pdf -F 'bookmarks=[{\"title\":\"Start\",\"pageNumber\":1}]' -o marked.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/set-bookmarks\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"bookmarks\", (None, \"[{\\\"title\\\":\\\"Start\\\",\\\"pageNumber\\\":1}]\")),\n])\nr.raise_for_status()\nwith open(\"marked.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"bookmarks\", \"[{\\\"title\\\":\\\"Start\\\",\\\"pageNumber\\\":1}]\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/set-bookmarks\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"marked.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/attach": {
      "post": {
        "operationId": "pdfAttach",
        "summary": "Carry a file inside PDFs",
        "description": "Carries a file sent with the request inside each PDF, as an attachment. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "file": {
                    "type": "string",
                    "description": "The name of the file sent with the request that each PDF carries.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "name": {
                    "type": "string",
                    "description": "The name it takes in the PDF; its own unless given.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "mimeType": {
                    "type": "string",
                    "description": "Its media type, such as text/xml.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "relationship": {
                    "type": "string",
                    "enum": [
                      "Source",
                      "Data",
                      "Alternative",
                      "Supplement",
                      "Unspecified"
                    ],
                    "description": "How it relates to the PDF (PDF/A-3's AFRelationship).",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\nprintf 'Shipped on Friday.\\n' > note.txt\ncurl http://localhost:3000/forms/pdf/attach -F files=@a.pdf -F files=@note.txt -F file=note.txt -o with-note.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nprintf 'Shipped on Friday.\\n' > note.txt\nmarqius-kern run /forms/pdf/attach -F files=@a.pdf -F files=@note.txt -F file=note.txt -o with-note.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nwith open(\"note.txt\", \"w\") as f:\n    f.write(\"Shipped on Friday.\\n\")\n\nr = requests.post(\"http://localhost:3000/forms/pdf/attach\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"files\", (\"note.txt\", open(\"note.txt\", \"rb\"))),\n    (\"file\", (None, \"note.txt\")),\n])\nr.raise_for_status()\nwith open(\"with-note.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\nawait writeFile(\"note.txt\", \"Shipped on Friday.\\n\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"files\", new Blob([await readFile(\"note.txt\")]), \"note.txt\");\n  form.append(\"file\", \"note.txt\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/attach\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"with-note.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/detach": {
      "post": {
        "operationId": "pdfDetach",
        "summary": "Remove files carried in PDFs",
        "description": "Takes attachments out of each PDF. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "name": {
                    "type": "string",
                    "description": "The attachment taken out, by name; every one unless given.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\nprintf 'Shipped on Friday.\\n' > note.txt\ncurl http://localhost:3000/forms/pdf/attach -F files=@a.pdf -F files=@note.txt -F file=note.txt -o with-note.pdf\ncurl http://localhost:3000/forms/pdf/detach -F files=@with-note.pdf -F name=note.txt -o without-note.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nprintf 'Shipped on Friday.\\n' > note.txt\nmarqius-kern run /forms/pdf/attach -F files=@a.pdf -F files=@note.txt -F file=note.txt -o with-note.pdf\nmarqius-kern run /forms/pdf/detach -F files=@with-note.pdf -F name=note.txt -o without-note.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nwith open(\"note.txt\", \"w\") as f:\n    f.write(\"Shipped on Friday.\\n\")\n\nr = requests.post(\"http://localhost:3000/forms/pdf/attach\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"files\", (\"note.txt\", open(\"note.txt\", \"rb\"))),\n    (\"file\", (None, \"note.txt\")),\n])\nr.raise_for_status()\nwith open(\"with-note.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/detach\", files=[\n    (\"files\", (\"with-note.pdf\", open(\"with-note.pdf\", \"rb\"))),\n    (\"name\", (None, \"note.txt\")),\n])\nr.raise_for_status()\nwith open(\"without-note.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\nawait writeFile(\"note.txt\", \"Shipped on Friday.\\n\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"files\", new Blob([await readFile(\"note.txt\")]), \"note.txt\");\n  form.append(\"file\", \"note.txt\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/attach\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"with-note.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"with-note.pdf\")]), \"with-note.pdf\");\n  form.append(\"name\", \"note.txt\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/detach\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"without-note.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/extract-attachments": {
      "post": {
        "operationId": "pdfExtractAttachments",
        "summary": "Take out files carried in PDFs",
        "description": "Answers the files the PDFs carry, as they are. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "name": {
                    "type": "string",
                    "description": "The attachment answered, by name; every one unless given.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The files: one as it is, several as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/octet-stream"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/octet-stream": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/octet-stream"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\nprintf 'Shipped on Friday.\\n' > note.txt\ncurl http://localhost:3000/forms/pdf/attach -F files=@a.pdf -F files=@note.txt -F file=note.txt -o with-note.pdf\ncurl http://localhost:3000/forms/pdf/extract-attachments -F files=@with-note.pdf -o note-back.txt"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nprintf 'Shipped on Friday.\\n' > note.txt\nmarqius-kern run /forms/pdf/attach -F files=@a.pdf -F files=@note.txt -F file=note.txt -o with-note.pdf\nmarqius-kern run /forms/pdf/extract-attachments -F files=@with-note.pdf -o note-back.txt"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nwith open(\"note.txt\", \"w\") as f:\n    f.write(\"Shipped on Friday.\\n\")\n\nr = requests.post(\"http://localhost:3000/forms/pdf/attach\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"files\", (\"note.txt\", open(\"note.txt\", \"rb\"))),\n    (\"file\", (None, \"note.txt\")),\n])\nr.raise_for_status()\nwith open(\"with-note.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/extract-attachments\", files=[\n    (\"files\", (\"with-note.pdf\", open(\"with-note.pdf\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"note-back.txt\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\nawait writeFile(\"note.txt\", \"Shipped on Friday.\\n\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"files\", new Blob([await readFile(\"note.txt\")]), \"note.txt\");\n  form.append(\"file\", \"note.txt\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/attach\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"with-note.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"with-note.pdf\")]), \"with-note.pdf\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/extract-attachments\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"note-back.txt\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/extract-text": {
      "post": {
        "operationId": "pdfExtractText",
        "summary": "Read PDFs' text",
        "description": "Answers each PDF's text, as plain text or Markdown, in reading order. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "pages": {
                    "type": "string",
                    "description": "The pages read: 1-3,5, even, odd, last; all unless given.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "text",
                      "markdown"
                    ],
                    "description": "Plain text, or Markdown with headings, lists and tables.\n\nDefault: `text`.",
                    "default": "text",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "invisible": {
                    "type": "boolean",
                    "description": "Reads text drawn invisible too, such as a searchable scan's layer.\n\nDefault: `false`.",
                    "default": false,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "artifacts": {
                    "type": "boolean",
                    "description": "Reads the running heads and feet and the page numbers too.\n\nDefault: `false`.",
                    "default": false,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "annotations": {
                    "type": "boolean",
                    "description": "Reads the text of form fields, comments and stamps too.\n\nDefault: `false`.",
                    "default": false,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The text: Markdown, plain text or JSON, as `format` asks; several documents' texts as a ZIP (one JSON document for them all with `format` json).",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "text/markdown"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "text/plain"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "text/markdown": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "text/markdown"
                      }
                    },
                    "text/plain": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "text/plain"
                      }
                    },
                    "application/json": {
                      "schema": {
                        "type": "object"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/extract-text -F files=@a.pdf -F format=markdown -o a.md"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/extract-text -F files=@a.pdf -F format=markdown -o a.md"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/extract-text\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"format\", (None, \"markdown\")),\n])\nr.raise_for_status()\nwith open(\"a.md\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"format\", \"markdown\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/extract-text\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.md\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/render": {
      "post": {
        "operationId": "pdfRender",
        "summary": "Draw pages as pictures",
        "description": "Draws the pages as PNG or JPEG pictures, named by page. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "pages": {
                    "type": "string",
                    "description": "The pages drawn: 1-3,5, even, odd, last; all unless given.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "dpi": {
                    "type": "integer",
                    "description": "The pictures' resolution, in dots per inch.\n\nDefault: `150`.",
                    "default": 150,
                    "minimum": 1,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "png",
                      "jpeg"
                    ],
                    "description": "The pictures' format.\n\nDefault: `png`.",
                    "default": "png",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "quality": {
                    "type": "integer",
                    "description": "With jpeg: the quality, from 1 to 100.",
                    "minimum": 1,
                    "maximum": 100,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent). It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise. It does nothing on this route: Marqius Kern says so in the X-Marqius-Kern-Note header.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "noted"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The picture: PNG, JPEG or WebP, as `format` asks; several as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "image/png"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "image/jpeg"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "image/webp"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "image/png": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "image/png"
                      }
                    },
                    "image/jpeg": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "image/jpeg"
                      }
                    },
                    "image/webp": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "image/webp"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/render -F files=@a.pdf -F dpi=72 -o page.png"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/render -F files=@a.pdf -F dpi=72 -o page.png"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/render\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"dpi\", (None, \"72\")),\n])\nr.raise_for_status()\nwith open(\"page.png\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"dpi\", \"72\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/render\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"page.png\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/stamp-text": {
      "post": {
        "operationId": "pdfStampText",
        "summary": "Stamp text on pages",
        "description": "Draws a line of text over the pages. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "text": {
                    "type": "string",
                    "description": "The text drawn.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "pages": {
                    "type": "string",
                    "description": "The pages stamped: 1-3,5, even, odd, last; all unless given.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "x": {
                    "type": "number",
                    "description": "The stamp's place across, in points from the left (or from the position given).\n\nDefault: `0`.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "y": {
                    "type": "number",
                    "description": "Its place up, in points from the bottom (or from the position given).\n\nDefault: `0`.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "position": {
                    "type": "string",
                    "enum": [
                      "center",
                      "top-left",
                      "top",
                      "top-right",
                      "left",
                      "right",
                      "bottom-left",
                      "bottom",
                      "bottom-right"
                    ],
                    "description": "Where on the page x and y count from.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "rotation": {
                    "type": "number",
                    "description": "Its angle, in degrees.\n\nDefault: `0`.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "fontSize": {
                    "type": "number",
                    "description": "The text's size, in points.\n\nDefault: `12`.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "font": {
                    "type": "string",
                    "description": "One of the 14 standard PDF fonts, such as Helvetica or Times-Roman.\n\nDefault: `Helvetica`.",
                    "default": "Helvetica",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "color": {
                    "type": "string",
                    "description": "The text's colour, as #rrggbb.",
                    "pattern": "^#[0-9A-Fa-f]{6}$",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "opacity": {
                    "type": "number",
                    "description": "From 0 (clear) to 1.",
                    "minimum": 0.0,
                    "maximum": 1.0,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "text"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/stamp-text -F files=@a.pdf -F text=PAID -F position=top-right -F fontSize=36 -F color=#cc0000 -o paid.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/stamp-text -F files=@a.pdf -F text=PAID -F position=top-right -F fontSize=36 -F color=#cc0000 -o paid.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/stamp-text\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"text\", (None, \"PAID\")),\n    (\"position\", (None, \"top-right\")),\n    (\"fontSize\", (None, \"36\")),\n    (\"color\", (None, \"#cc0000\")),\n])\nr.raise_for_status()\nwith open(\"paid.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"text\", \"PAID\");\n  form.append(\"position\", \"top-right\");\n  form.append(\"fontSize\", \"36\");\n  form.append(\"color\", \"#cc0000\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/stamp-text\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"paid.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/stamp-image": {
      "post": {
        "operationId": "pdfStampImage",
        "summary": "Stamp a picture on pages",
        "description": "Draws a picture sent with the request over the pages. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "image": {
                    "type": "string",
                    "description": "The name of the picture sent with the request.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "pages": {
                    "type": "string",
                    "description": "The pages stamped: 1-3,5, even, odd, last; all unless given.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "x": {
                    "type": "number",
                    "description": "The stamp's place across, in points from the left (or from the position given).\n\nDefault: `0`.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "y": {
                    "type": "number",
                    "description": "Its place up, in points from the bottom (or from the position given).\n\nDefault: `0`.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "position": {
                    "type": "string",
                    "enum": [
                      "center",
                      "top-left",
                      "top",
                      "top-right",
                      "left",
                      "right",
                      "bottom-left",
                      "bottom",
                      "bottom-right"
                    ],
                    "description": "Where on the page x and y count from.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "rotation": {
                    "type": "number",
                    "description": "Its angle, in degrees.\n\nDefault: `0`.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "width": {
                    "type": "number",
                    "description": "The picture's width, in points.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "height": {
                    "type": "number",
                    "description": "Its height, in points.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "opacity": {
                    "type": "number",
                    "description": "From 0 (clear) to 1.",
                    "minimum": 0.0,
                    "maximum": 1.0,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "image"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/chromium/screenshot/html -F files=@index.html -F width=400 -F height=120 -o logo.png\ncurl http://localhost:3000/forms/pdf/stamp-image -F files=@a.pdf -F files=@logo.png -F image=logo.png -F position=bottom-right -F width=200 -F height=60 -o stamped.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/chromium/screenshot/html -F files=@index.html -F width=400 -F height=120 -o logo.png\nmarqius-kern run /forms/pdf/stamp-image -F files=@a.pdf -F files=@logo.png -F image=logo.png -F position=bottom-right -F width=200 -F height=60 -o stamped.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/chromium/screenshot/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n    (\"width\", (None, \"400\")),\n    (\"height\", (None, \"120\")),\n])\nr.raise_for_status()\nwith open(\"logo.png\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/stamp-image\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"files\", (\"logo.png\", open(\"logo.png\", \"rb\"))),\n    (\"image\", (None, \"logo.png\")),\n    (\"position\", (None, \"bottom-right\")),\n    (\"width\", (None, \"200\")),\n    (\"height\", (None, \"60\")),\n])\nr.raise_for_status()\nwith open(\"stamped.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  form.append(\"width\", \"400\");\n  form.append(\"height\", \"120\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/screenshot/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"logo.png\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"files\", new Blob([await readFile(\"logo.png\")]), \"logo.png\");\n  form.append(\"image\", \"logo.png\");\n  form.append(\"position\", \"bottom-right\");\n  form.append(\"width\", \"200\");\n  form.append(\"height\", \"60\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/stamp-image\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"stamped.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/stamp-pdf": {
      "post": {
        "operationId": "pdfStampPdf",
        "summary": "Stamp a PDF's page on pages",
        "description": "Draws a page of a PDF sent with the request over the pages. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "source": {
                    "type": "string",
                    "description": "The name of the PDF sent with the request whose page is drawn.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "sourcePage": {
                    "type": "integer",
                    "description": "The page of it drawn.\n\nDefault: `1`.",
                    "default": 1,
                    "minimum": 1,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "pages": {
                    "type": "string",
                    "description": "The pages stamped: 1-3,5, even, odd, last; all unless given.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "x": {
                    "type": "number",
                    "description": "The stamp's place across, in points from the left (or from the position given).\n\nDefault: `0`.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "y": {
                    "type": "number",
                    "description": "Its place up, in points from the bottom (or from the position given).\n\nDefault: `0`.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "position": {
                    "type": "string",
                    "enum": [
                      "center",
                      "top-left",
                      "top",
                      "top-right",
                      "left",
                      "right",
                      "bottom-left",
                      "bottom",
                      "bottom-right"
                    ],
                    "description": "Where on the page x and y count from.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "rotation": {
                    "type": "number",
                    "description": "Its angle, in degrees.\n\nDefault: `0`.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "scale": {
                    "type": "number",
                    "description": "How many times as big it is drawn.\n\nDefault: `1`.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "opacity": {
                    "type": "number",
                    "description": "From 0 (clear) to 1.",
                    "minimum": 0.0,
                    "maximum": 1.0,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "source"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\nmkdir -p cover && printf '<!doctype html><html><body style=\"background: #0b3d91\"><h1 style=\"color: white\">Cover</h1></body></html>' > cover/index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@cover/index.html -F printBackground=true -o cover.pdf\ncurl http://localhost:3000/forms/pdf/stamp-pdf -F files=@a.pdf -F files=@cover.pdf -F source=cover.pdf -F scale=0.25 -F position=bottom-right -o stamped.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmkdir -p cover && printf '<!doctype html><html><body style=\"background: #0b3d91\"><h1 style=\"color: white\">Cover</h1></body></html>' > cover/index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@cover/index.html -F printBackground=true -o cover.pdf\nmarqius-kern run /forms/pdf/stamp-pdf -F files=@a.pdf -F files=@cover.pdf -F source=cover.pdf -F scale=0.25 -F position=bottom-right -o stamped.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport os\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nos.makedirs(\"cover\", exist_ok=True)\n\nwith open(\"cover/index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body style=\\\"background: #0b3d91\\\"><h1 style=\\\"color: white\\\">Cover</h1></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"cover/index.html\", \"rb\"))),\n    (\"printBackground\", (None, \"true\")),\n])\nr.raise_for_status()\nwith open(\"cover.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/stamp-pdf\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"files\", (\"cover.pdf\", open(\"cover.pdf\", \"rb\"))),\n    (\"source\", (None, \"cover.pdf\")),\n    (\"scale\", (None, \"0.25\")),\n    (\"position\", (None, \"bottom-right\")),\n])\nr.raise_for_status()\nwith open(\"stamped.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { mkdir, readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\nawait mkdir(\"cover\", { recursive: true });\n\nawait writeFile(\"cover/index.html\", \"<!doctype html><html><body style=\\\"background: #0b3d91\\\"><h1 style=\\\"color: white\\\">Cover</h1></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"cover/index.html\")]), \"index.html\");\n  form.append(\"printBackground\", \"true\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"cover.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"files\", new Blob([await readFile(\"cover.pdf\")]), \"cover.pdf\");\n  form.append(\"source\", \"cover.pdf\");\n  form.append(\"scale\", \"0.25\");\n  form.append(\"position\", \"bottom-right\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/stamp-pdf\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"stamped.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/redact": {
      "post": {
        "operationId": "pdfRedact",
        "summary": "Redact PDFs",
        "description": "Takes the content under the regions named out of the pages, text and pictures alike, and covers the regions. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "regions": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "The regions taken out: a JSON array of objects with page, x, y, width and height (points from the lower left).",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "dropSignatures": {
                    "type": "boolean",
                    "description": "true: a signed PDF has its signatures taken out, as the change would break them; otherwise a signed PDF is refused.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "regions"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/redact -F files=@a.pdf -F 'regions=[{\"page\":1,\"x\":0,\"y\":700,\"width\":595,\"height\":142}]' -o redacted.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/redact -F files=@a.pdf -F 'regions=[{\"page\":1,\"x\":0,\"y\":700,\"width\":595,\"height\":142}]' -o redacted.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/redact\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"regions\", (None, \"[{\\\"page\\\":1,\\\"x\\\":0,\\\"y\\\":700,\\\"width\\\":595,\\\"height\\\":142}]\")),\n])\nr.raise_for_status()\nwith open(\"redacted.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"regions\", \"[{\\\"page\\\":1,\\\"x\\\":0,\\\"y\\\":700,\\\"width\\\":595,\\\"height\\\":142}]\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/redact\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"redacted.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/set-form": {
      "post": {
        "operationId": "pdfSetForm",
        "summary": "Fill in PDF forms",
        "description": "Fills in each PDF's form fields, drawing them as a viewer would, signatures kept. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "fields": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "The values, by field name: a JSON object; a check box takes its state's name, such as Yes or Off; a list that selects several takes an array.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "fields"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "cat > form.pdf <<'PDF'\n%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R /AcroForm << /Fields [4 0 R] /DA (/Helv 12 Tf 0 g) /DR << /Font << /Helv 5 0 R >> >> >> >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Annots [4 0 R] /Contents 6 0 R /Resources << /Font << /Helv 5 0 R >> >> >>\nendobj\n4 0 obj\n<< /Type /Annot /Subtype /Widget /FT /Tx /T (name) /V () /Rect [72 700 372 728] /P 3 0 R /F 4 /DA (/Helv 12 Tf 0 g) /MK << /BC [0 0 0] >> >>\nendobj\n5 0 obj\n<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>\nendobj\n6 0 obj\n<< /Length 43 >>\nstream\nBT /Helv 14 Tf 72 740 Td (Your name:) Tj ET\nendstream\nendobj\nxref\n0 7\n0000000000 65535 f \n0000000009 00000 n \n0000000146 00000 n \n0000000203 00000 n \n0000000347 00000 n \n0000000503 00000 n \n0000000600 00000 n \ntrailer\n<< /Size 7 /Root 1 0 R >>\nstartxref\n693\n%%EOF\nPDF\ncurl http://localhost:3000/forms/pdf/set-form -F files=@form.pdf -F 'fields={\"name\":\"Ada Lovelace\"}' -o filled.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "cat > form.pdf <<'PDF'\n%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R /AcroForm << /Fields [4 0 R] /DA (/Helv 12 Tf 0 g) /DR << /Font << /Helv 5 0 R >> >> >> >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Annots [4 0 R] /Contents 6 0 R /Resources << /Font << /Helv 5 0 R >> >> >>\nendobj\n4 0 obj\n<< /Type /Annot /Subtype /Widget /FT /Tx /T (name) /V () /Rect [72 700 372 728] /P 3 0 R /F 4 /DA (/Helv 12 Tf 0 g) /MK << /BC [0 0 0] >> >>\nendobj\n5 0 obj\n<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>\nendobj\n6 0 obj\n<< /Length 43 >>\nstream\nBT /Helv 14 Tf 72 740 Td (Your name:) Tj ET\nendstream\nendobj\nxref\n0 7\n0000000000 65535 f \n0000000009 00000 n \n0000000146 00000 n \n0000000203 00000 n \n0000000347 00000 n \n0000000503 00000 n \n0000000600 00000 n \ntrailer\n<< /Size 7 /Root 1 0 R >>\nstartxref\n693\n%%EOF\nPDF\nmarqius-kern run /forms/pdf/set-form -F files=@form.pdf -F 'fields={\"name\":\"Ada Lovelace\"}' -o filled.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"form.pdf\", \"w\") as f:\n    f.write('''%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R /AcroForm << /Fields [4 0 R] /DA (/Helv 12 Tf 0 g) /DR << /Font << /Helv 5 0 R >> >> >> >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Annots [4 0 R] /Contents 6 0 R /Resources << /Font << /Helv 5 0 R >> >> >>\nendobj\n4 0 obj\n<< /Type /Annot /Subtype /Widget /FT /Tx /T (name) /V () /Rect [72 700 372 728] /P 3 0 R /F 4 /DA (/Helv 12 Tf 0 g) /MK << /BC [0 0 0] >> >>\nendobj\n5 0 obj\n<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>\nendobj\n6 0 obj\n<< /Length 43 >>\nstream\nBT /Helv 14 Tf 72 740 Td (Your name:) Tj ET\nendstream\nendobj\nxref\n0 7\n0000000000 65535 f \n0000000009 00000 n \n0000000146 00000 n \n0000000203 00000 n \n0000000347 00000 n \n0000000503 00000 n \n0000000600 00000 n \ntrailer\n<< /Size 7 /Root 1 0 R >>\nstartxref\n693\n%%EOF\n''')\n\nr = requests.post(\"http://localhost:3000/forms/pdf/set-form\", files=[\n    (\"files\", (\"form.pdf\", open(\"form.pdf\", \"rb\"))),\n    (\"fields\", (None, \"{\\\"name\\\":\\\"Ada Lovelace\\\"}\")),\n])\nr.raise_for_status()\nwith open(\"filled.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"form.pdf\", `%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R /AcroForm << /Fields [4 0 R] /DA (/Helv 12 Tf 0 g) /DR << /Font << /Helv 5 0 R >> >> >> >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Annots [4 0 R] /Contents 6 0 R /Resources << /Font << /Helv 5 0 R >> >> >>\nendobj\n4 0 obj\n<< /Type /Annot /Subtype /Widget /FT /Tx /T (name) /V () /Rect [72 700 372 728] /P 3 0 R /F 4 /DA (/Helv 12 Tf 0 g) /MK << /BC [0 0 0] >> >>\nendobj\n5 0 obj\n<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>\nendobj\n6 0 obj\n<< /Length 43 >>\nstream\nBT /Helv 14 Tf 72 740 Td (Your name:) Tj ET\nendstream\nendobj\nxref\n0 7\n0000000000 65535 f \n0000000009 00000 n \n0000000146 00000 n \n0000000203 00000 n \n0000000347 00000 n \n0000000503 00000 n \n0000000600 00000 n \ntrailer\n<< /Size 7 /Root 1 0 R >>\nstartxref\n693\n%%EOF\n`);\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"form.pdf\")]), \"form.pdf\");\n  form.append(\"fields\", \"{\\\"name\\\":\\\"Ada Lovelace\\\"}\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/set-form\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"filled.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/flatten-form": {
      "post": {
        "operationId": "pdfFlattenForm",
        "summary": "Flatten PDF forms",
        "description": "Turns the form fields into the pages' own drawing. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "dropSignatures": {
                    "type": "boolean",
                    "description": "true: a signed PDF has its signatures taken out, as the change would break them; otherwise a signed PDF is refused.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "cat > form.pdf <<'PDF'\n%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R /AcroForm << /Fields [4 0 R] /DA (/Helv 12 Tf 0 g) /DR << /Font << /Helv 5 0 R >> >> >> >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Annots [4 0 R] /Contents 6 0 R /Resources << /Font << /Helv 5 0 R >> >> >>\nendobj\n4 0 obj\n<< /Type /Annot /Subtype /Widget /FT /Tx /T (name) /V () /Rect [72 700 372 728] /P 3 0 R /F 4 /DA (/Helv 12 Tf 0 g) /MK << /BC [0 0 0] >> >>\nendobj\n5 0 obj\n<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>\nendobj\n6 0 obj\n<< /Length 43 >>\nstream\nBT /Helv 14 Tf 72 740 Td (Your name:) Tj ET\nendstream\nendobj\nxref\n0 7\n0000000000 65535 f \n0000000009 00000 n \n0000000146 00000 n \n0000000203 00000 n \n0000000347 00000 n \n0000000503 00000 n \n0000000600 00000 n \ntrailer\n<< /Size 7 /Root 1 0 R >>\nstartxref\n693\n%%EOF\nPDF\ncurl http://localhost:3000/forms/pdf/set-form -F files=@form.pdf -F 'fields={\"name\":\"Ada Lovelace\"}' -o filled.pdf\ncurl http://localhost:3000/forms/pdf/flatten-form -F files=@filled.pdf -o flat.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "cat > form.pdf <<'PDF'\n%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R /AcroForm << /Fields [4 0 R] /DA (/Helv 12 Tf 0 g) /DR << /Font << /Helv 5 0 R >> >> >> >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Annots [4 0 R] /Contents 6 0 R /Resources << /Font << /Helv 5 0 R >> >> >>\nendobj\n4 0 obj\n<< /Type /Annot /Subtype /Widget /FT /Tx /T (name) /V () /Rect [72 700 372 728] /P 3 0 R /F 4 /DA (/Helv 12 Tf 0 g) /MK << /BC [0 0 0] >> >>\nendobj\n5 0 obj\n<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>\nendobj\n6 0 obj\n<< /Length 43 >>\nstream\nBT /Helv 14 Tf 72 740 Td (Your name:) Tj ET\nendstream\nendobj\nxref\n0 7\n0000000000 65535 f \n0000000009 00000 n \n0000000146 00000 n \n0000000203 00000 n \n0000000347 00000 n \n0000000503 00000 n \n0000000600 00000 n \ntrailer\n<< /Size 7 /Root 1 0 R >>\nstartxref\n693\n%%EOF\nPDF\nmarqius-kern run /forms/pdf/set-form -F files=@form.pdf -F 'fields={\"name\":\"Ada Lovelace\"}' -o filled.pdf\nmarqius-kern run /forms/pdf/flatten-form -F files=@filled.pdf -o flat.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"form.pdf\", \"w\") as f:\n    f.write('''%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R /AcroForm << /Fields [4 0 R] /DA (/Helv 12 Tf 0 g) /DR << /Font << /Helv 5 0 R >> >> >> >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Annots [4 0 R] /Contents 6 0 R /Resources << /Font << /Helv 5 0 R >> >> >>\nendobj\n4 0 obj\n<< /Type /Annot /Subtype /Widget /FT /Tx /T (name) /V () /Rect [72 700 372 728] /P 3 0 R /F 4 /DA (/Helv 12 Tf 0 g) /MK << /BC [0 0 0] >> >>\nendobj\n5 0 obj\n<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>\nendobj\n6 0 obj\n<< /Length 43 >>\nstream\nBT /Helv 14 Tf 72 740 Td (Your name:) Tj ET\nendstream\nendobj\nxref\n0 7\n0000000000 65535 f \n0000000009 00000 n \n0000000146 00000 n \n0000000203 00000 n \n0000000347 00000 n \n0000000503 00000 n \n0000000600 00000 n \ntrailer\n<< /Size 7 /Root 1 0 R >>\nstartxref\n693\n%%EOF\n''')\n\nr = requests.post(\"http://localhost:3000/forms/pdf/set-form\", files=[\n    (\"files\", (\"form.pdf\", open(\"form.pdf\", \"rb\"))),\n    (\"fields\", (None, \"{\\\"name\\\":\\\"Ada Lovelace\\\"}\")),\n])\nr.raise_for_status()\nwith open(\"filled.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/flatten-form\", files=[\n    (\"files\", (\"filled.pdf\", open(\"filled.pdf\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"flat.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"form.pdf\", `%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R /AcroForm << /Fields [4 0 R] /DA (/Helv 12 Tf 0 g) /DR << /Font << /Helv 5 0 R >> >> >> >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Annots [4 0 R] /Contents 6 0 R /Resources << /Font << /Helv 5 0 R >> >> >>\nendobj\n4 0 obj\n<< /Type /Annot /Subtype /Widget /FT /Tx /T (name) /V () /Rect [72 700 372 728] /P 3 0 R /F 4 /DA (/Helv 12 Tf 0 g) /MK << /BC [0 0 0] >> >>\nendobj\n5 0 obj\n<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>\nendobj\n6 0 obj\n<< /Length 43 >>\nstream\nBT /Helv 14 Tf 72 740 Td (Your name:) Tj ET\nendstream\nendobj\nxref\n0 7\n0000000000 65535 f \n0000000009 00000 n \n0000000146 00000 n \n0000000203 00000 n \n0000000347 00000 n \n0000000503 00000 n \n0000000600 00000 n \ntrailer\n<< /Size 7 /Root 1 0 R >>\nstartxref\n693\n%%EOF\n`);\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"form.pdf\")]), \"form.pdf\");\n  form.append(\"fields\", \"{\\\"name\\\":\\\"Ada Lovelace\\\"}\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/set-form\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"filled.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"filled.pdf\")]), \"filled.pdf\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/flatten-form\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"flat.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/flatten-transparency": {
      "post": {
        "operationId": "pdfFlattenTransparency",
        "summary": "Flatten see-through drawing",
        "description": "Draws what is see-through as it looks, so that printers and PDF/A-1 take it; text stays text. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "dropSignatures": {
                    "type": "boolean",
                    "description": "true: a signed PDF has its signatures taken out, as the change would break them; otherwise a signed PDF is refused.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><div style=\"width: 300px; height: 120px; background: rgba(0, 90, 200, 0.4)\">See-through</div></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -F printBackground=true -o a.pdf\ncurl http://localhost:3000/forms/pdf/flatten-transparency -F files=@a.pdf -o flat.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><div style=\"width: 300px; height: 120px; background: rgba(0, 90, 200, 0.4)\">See-through</div></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -F printBackground=true -o a.pdf\nmarqius-kern run /forms/pdf/flatten-transparency -F files=@a.pdf -o flat.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><div style=\\\"width: 300px; height: 120px; background: rgba(0, 90, 200, 0.4)\\\">See-through</div></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n    (\"printBackground\", (None, \"true\")),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/flatten-transparency\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"flat.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><div style=\\\"width: 300px; height: 120px; background: rgba(0, 90, 200, 0.4)\\\">See-through</div></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  form.append(\"printBackground\", \"true\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/flatten-transparency\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"flat.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/convert-colors": {
      "post": {
        "operationId": "pdfConvertColors",
        "summary": "Convert PDFs' colours",
        "description": "Draws the pages in one kind of colour: CMYK, RGB, grey, or the PDF's output intent. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "target": {
                    "type": "string",
                    "enum": [
                      "cmyk",
                      "rgb",
                      "gray",
                      "output-intent"
                    ],
                    "description": "The colours the pages are drawn in.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "dropSignatures": {
                    "type": "boolean",
                    "description": "true: a signed PDF has its signatures taken out, as the change would break them; otherwise a signed PDF is refused.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files",
                  "target"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/convert-colors -F files=@a.pdf -F target=gray -o gray.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/convert-colors -F files=@a.pdf -F target=gray -o gray.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/convert-colors\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"target\", (None, \"gray\")),\n])\nr.raise_for_status()\nwith open(\"gray.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"target\", \"gray\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/convert-colors\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"gray.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/remediate": {
      "post": {
        "operationId": "pdfRemediate",
        "summary": "Make PDFs PDF/A, PDF/UA or Factur-X",
        "description": "Makes each PDF a PDF/A level, accessible (PDF/UA, with a real structure), both, or a Factur-X invoice carrying the XML sent; what could not be met is said in the Gotenberg-Remediation-Residual header. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "profile": {
                    "type": "string",
                    "description": "What the PDF is made: a PDF/A level (PDF/A-1b to PDF/A-4f), PDF/UA-1 or 2, both as a JSON pair such as [\"PDF/A-2b\",\"PDF/UA-1\"], or Factur-X.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "language": {
                    "type": "string",
                    "description": "The document's language, such as en-US; told from its words when not given.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "aggressive": {
                    "type": "boolean",
                    "description": "Mends what a careful pass leaves, at the risk of changing how a page looks.\n\nDefault: `false`.",
                    "default": false,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "figureAltText": {
                    "type": "string",
                    "description": "The alternative text given to figures that have none.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "xml": {
                    "type": "string",
                    "description": "With Factur-X: the name of the invoice's XML sent with the request.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "level": {
                    "type": "string",
                    "enum": [
                      "MINIMUM",
                      "BASIC WL",
                      "BASIC",
                      "EN 16931",
                      "EXTENDED",
                      "XRECHNUNG"
                    ],
                    "description": "With Factur-X: the XML's profile, as the XML's guideline names it.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "documentType": {
                    "type": "string",
                    "description": "With Factur-X: what the XML is, such as INVOICE.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "dropSignatures": {
                    "type": "boolean",
                    "description": "true: a signed PDF has its signatures taken out, as the change would break them; otherwise a signed PDF is refused.\n\nDefault: `false`.",
                    "default": false,
                    "examples": [
                      false
                    ],
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/remediate -F files=@a.pdf -F profile=PDF/A-2b -o archive.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/remediate -F files=@a.pdf -F profile=PDF/A-2b -o archive.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/remediate\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"profile\", (None, \"PDF/A-2b\")),\n])\nr.raise_for_status()\nwith open(\"archive.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"profile\", \"PDF/A-2b\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/remediate\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"archive.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          },
          {
            "lang": "Shell",
            "label": "curl (a Factur-X invoice)",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o invoice-print.pdf\ncat > invoice.xml <<'XML'\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\" xmlns:ram=\"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100\" xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100\">\n  <rsm:ExchangedDocumentContext>\n    <ram:GuidelineSpecifiedDocumentContextParameter><ram:ID>urn:factur-x.eu:1p0:minimum</ram:ID></ram:GuidelineSpecifiedDocumentContextParameter>\n  </rsm:ExchangedDocumentContext>\n  <rsm:ExchangedDocument>\n    <ram:ID>INV-2026-001</ram:ID>\n    <ram:TypeCode>380</ram:TypeCode>\n    <ram:IssueDateTime><udt:DateTimeString format=\"102\">20261130</udt:DateTimeString></ram:IssueDateTime>\n  </rsm:ExchangedDocument>\n  <rsm:SupplyChainTradeTransaction>\n    <ram:ApplicableHeaderTradeAgreement>\n      <ram:SellerTradeParty>\n        <ram:Name>Example Ltd</ram:Name>\n        <ram:SpecifiedLegalOrganization><ram:ID>123456789</ram:ID></ram:SpecifiedLegalOrganization>\n        <ram:PostalTradeAddress><ram:CountryID>FR</ram:CountryID></ram:PostalTradeAddress>\n        <ram:SpecifiedTaxRegistration><ram:ID schemeID=\"VA\">FR32123456789</ram:ID></ram:SpecifiedTaxRegistration>\n      </ram:SellerTradeParty>\n      <ram:BuyerTradeParty><ram:Name>Client SA</ram:Name></ram:BuyerTradeParty>\n    </ram:ApplicableHeaderTradeAgreement>\n    <ram:ApplicableHeaderTradeDelivery/>\n    <ram:ApplicableHeaderTradeSettlement>\n      <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>\n      <ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n        <ram:TaxBasisTotalAmount>100.00</ram:TaxBasisTotalAmount>\n        <ram:TaxTotalAmount currencyID=\"EUR\">20.00</ram:TaxTotalAmount>\n        <ram:GrandTotalAmount>120.00</ram:GrandTotalAmount>\n        <ram:DuePayableAmount>120.00</ram:DuePayableAmount>\n      </ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n    </ram:ApplicableHeaderTradeSettlement>\n  </rsm:SupplyChainTradeTransaction>\n</rsm:CrossIndustryInvoice>\nXML\ncurl http://localhost:3000/forms/pdf/remediate -F files=@invoice-print.pdf -F files=@invoice.xml -F profile=Factur-X -F xml=invoice.xml -F level=MINIMUM -o invoice.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run (a Factur-X invoice), no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o invoice-print.pdf\ncat > invoice.xml <<'XML'\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\" xmlns:ram=\"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100\" xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100\">\n  <rsm:ExchangedDocumentContext>\n    <ram:GuidelineSpecifiedDocumentContextParameter><ram:ID>urn:factur-x.eu:1p0:minimum</ram:ID></ram:GuidelineSpecifiedDocumentContextParameter>\n  </rsm:ExchangedDocumentContext>\n  <rsm:ExchangedDocument>\n    <ram:ID>INV-2026-001</ram:ID>\n    <ram:TypeCode>380</ram:TypeCode>\n    <ram:IssueDateTime><udt:DateTimeString format=\"102\">20261130</udt:DateTimeString></ram:IssueDateTime>\n  </rsm:ExchangedDocument>\n  <rsm:SupplyChainTradeTransaction>\n    <ram:ApplicableHeaderTradeAgreement>\n      <ram:SellerTradeParty>\n        <ram:Name>Example Ltd</ram:Name>\n        <ram:SpecifiedLegalOrganization><ram:ID>123456789</ram:ID></ram:SpecifiedLegalOrganization>\n        <ram:PostalTradeAddress><ram:CountryID>FR</ram:CountryID></ram:PostalTradeAddress>\n        <ram:SpecifiedTaxRegistration><ram:ID schemeID=\"VA\">FR32123456789</ram:ID></ram:SpecifiedTaxRegistration>\n      </ram:SellerTradeParty>\n      <ram:BuyerTradeParty><ram:Name>Client SA</ram:Name></ram:BuyerTradeParty>\n    </ram:ApplicableHeaderTradeAgreement>\n    <ram:ApplicableHeaderTradeDelivery/>\n    <ram:ApplicableHeaderTradeSettlement>\n      <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>\n      <ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n        <ram:TaxBasisTotalAmount>100.00</ram:TaxBasisTotalAmount>\n        <ram:TaxTotalAmount currencyID=\"EUR\">20.00</ram:TaxTotalAmount>\n        <ram:GrandTotalAmount>120.00</ram:GrandTotalAmount>\n        <ram:DuePayableAmount>120.00</ram:DuePayableAmount>\n      </ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n    </ram:ApplicableHeaderTradeSettlement>\n  </rsm:SupplyChainTradeTransaction>\n</rsm:CrossIndustryInvoice>\nXML\nmarqius-kern run /forms/pdf/remediate -F files=@invoice-print.pdf -F files=@invoice.xml -F profile=Factur-X -F xml=invoice.xml -F level=MINIMUM -o invoice.pdf"
          },
          {
            "lang": "Python",
            "label": "Python (a Factur-X invoice)",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"invoice-print.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nwith open(\"invoice.xml\", \"w\") as f:\n    f.write('''<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\" xmlns:ram=\"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100\" xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100\">\n  <rsm:ExchangedDocumentContext>\n    <ram:GuidelineSpecifiedDocumentContextParameter><ram:ID>urn:factur-x.eu:1p0:minimum</ram:ID></ram:GuidelineSpecifiedDocumentContextParameter>\n  </rsm:ExchangedDocumentContext>\n  <rsm:ExchangedDocument>\n    <ram:ID>INV-2026-001</ram:ID>\n    <ram:TypeCode>380</ram:TypeCode>\n    <ram:IssueDateTime><udt:DateTimeString format=\"102\">20261130</udt:DateTimeString></ram:IssueDateTime>\n  </rsm:ExchangedDocument>\n  <rsm:SupplyChainTradeTransaction>\n    <ram:ApplicableHeaderTradeAgreement>\n      <ram:SellerTradeParty>\n        <ram:Name>Example Ltd</ram:Name>\n        <ram:SpecifiedLegalOrganization><ram:ID>123456789</ram:ID></ram:SpecifiedLegalOrganization>\n        <ram:PostalTradeAddress><ram:CountryID>FR</ram:CountryID></ram:PostalTradeAddress>\n        <ram:SpecifiedTaxRegistration><ram:ID schemeID=\"VA\">FR32123456789</ram:ID></ram:SpecifiedTaxRegistration>\n      </ram:SellerTradeParty>\n      <ram:BuyerTradeParty><ram:Name>Client SA</ram:Name></ram:BuyerTradeParty>\n    </ram:ApplicableHeaderTradeAgreement>\n    <ram:ApplicableHeaderTradeDelivery/>\n    <ram:ApplicableHeaderTradeSettlement>\n      <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>\n      <ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n        <ram:TaxBasisTotalAmount>100.00</ram:TaxBasisTotalAmount>\n        <ram:TaxTotalAmount currencyID=\"EUR\">20.00</ram:TaxTotalAmount>\n        <ram:GrandTotalAmount>120.00</ram:GrandTotalAmount>\n        <ram:DuePayableAmount>120.00</ram:DuePayableAmount>\n      </ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n    </ram:ApplicableHeaderTradeSettlement>\n  </rsm:SupplyChainTradeTransaction>\n</rsm:CrossIndustryInvoice>\n''')\n\nr = requests.post(\"http://localhost:3000/forms/pdf/remediate\", files=[\n    (\"files\", (\"invoice-print.pdf\", open(\"invoice-print.pdf\", \"rb\"))),\n    (\"files\", (\"invoice.xml\", open(\"invoice.xml\", \"rb\"))),\n    (\"profile\", (None, \"Factur-X\")),\n    (\"xml\", (None, \"invoice.xml\")),\n    (\"level\", (None, \"MINIMUM\")),\n])\nr.raise_for_status()\nwith open(\"invoice.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript (a Factur-X invoice)",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"invoice-print.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\nawait writeFile(\"invoice.xml\", `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\" xmlns:ram=\"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100\" xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100\">\n  <rsm:ExchangedDocumentContext>\n    <ram:GuidelineSpecifiedDocumentContextParameter><ram:ID>urn:factur-x.eu:1p0:minimum</ram:ID></ram:GuidelineSpecifiedDocumentContextParameter>\n  </rsm:ExchangedDocumentContext>\n  <rsm:ExchangedDocument>\n    <ram:ID>INV-2026-001</ram:ID>\n    <ram:TypeCode>380</ram:TypeCode>\n    <ram:IssueDateTime><udt:DateTimeString format=\"102\">20261130</udt:DateTimeString></ram:IssueDateTime>\n  </rsm:ExchangedDocument>\n  <rsm:SupplyChainTradeTransaction>\n    <ram:ApplicableHeaderTradeAgreement>\n      <ram:SellerTradeParty>\n        <ram:Name>Example Ltd</ram:Name>\n        <ram:SpecifiedLegalOrganization><ram:ID>123456789</ram:ID></ram:SpecifiedLegalOrganization>\n        <ram:PostalTradeAddress><ram:CountryID>FR</ram:CountryID></ram:PostalTradeAddress>\n        <ram:SpecifiedTaxRegistration><ram:ID schemeID=\"VA\">FR32123456789</ram:ID></ram:SpecifiedTaxRegistration>\n      </ram:SellerTradeParty>\n      <ram:BuyerTradeParty><ram:Name>Client SA</ram:Name></ram:BuyerTradeParty>\n    </ram:ApplicableHeaderTradeAgreement>\n    <ram:ApplicableHeaderTradeDelivery/>\n    <ram:ApplicableHeaderTradeSettlement>\n      <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>\n      <ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n        <ram:TaxBasisTotalAmount>100.00</ram:TaxBasisTotalAmount>\n        <ram:TaxTotalAmount currencyID=\"EUR\">20.00</ram:TaxTotalAmount>\n        <ram:GrandTotalAmount>120.00</ram:GrandTotalAmount>\n        <ram:DuePayableAmount>120.00</ram:DuePayableAmount>\n      </ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n    </ram:ApplicableHeaderTradeSettlement>\n  </rsm:SupplyChainTradeTransaction>\n</rsm:CrossIndustryInvoice>\n`);\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"invoice-print.pdf\")]), \"invoice-print.pdf\");\n  form.append(\"files\", new Blob([await readFile(\"invoice.xml\")]), \"invoice.xml\");\n  form.append(\"profile\", \"Factur-X\");\n  form.append(\"xml\", \"invoice.xml\");\n  form.append(\"level\", \"MINIMUM\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/remediate\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"invoice.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/autotag": {
      "post": {
        "operationId": "pdfAutotag",
        "summary": "Tag PDFs",
        "description": "Reads untagged pages into a structure screen readers follow: headings, lists, tables, figures, links; running heads as artifacts. A tagged PDF keeps its own tree. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/autotag -F files=@a.pdf -o tagged.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/autotag -F files=@a.pdf -o tagged.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/autotag\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"tagged.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/autotag\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"tagged.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/sign": {
      "post": {
        "operationId": "pdfSign",
        "summary": "Sign PDFs",
        "description": "Signs each PDF, as an update added to its end, so that earlier signatures stay valid: PAdES or the classic adbe.pkcs7.detached, time-stamped when an authority is named. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "certificate": {
                    "type": "string",
                    "description": "The name of the identity sent with the request: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key (or the key in `key`); the server's own unless given.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "key": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with its key.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "certificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "reason": {
                    "type": "string",
                    "description": "The reason the signature gives.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "location": {
                    "type": "string",
                    "description": "Where it says it was made.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "contactInfo": {
                    "type": "string",
                    "description": "How to reach the signer.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "name": {
                    "type": "string",
                    "description": "The signer's name.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "pades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; otherwise the classic adbe.pkcs7.detached.\n\nDefault: `false`.",
                    "default": false,
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "timestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 authority, http or https, that time-stamps the signature.",
                    "format": "uri",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\nopenssl req -x509 -newkey rsa:2048 -nodes -keyout key.pem -out cert.pem -days 1 -subj /CN=Example 2>/dev/null\ncurl http://localhost:3000/forms/pdf/sign -F files=@a.pdf -F files=@cert.pem -F files=@key.pem -F certificate=cert.pem -F key=key.pem -F reason=Approved -o signed.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nopenssl req -x509 -newkey rsa:2048 -nodes -keyout key.pem -out cert.pem -days 1 -subj /CN=Example 2>/dev/null\nmarqius-kern run /forms/pdf/sign -F files=@a.pdf -F files=@cert.pem -F files=@key.pem -F certificate=cert.pem -F key=key.pem -F reason=Approved -o signed.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport subprocess\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nsubprocess.run([\"openssl\", \"req\", \"-x509\", \"-newkey\", \"rsa:2048\", \"-nodes\", \"-keyout\", \"key.pem\", \"-out\", \"cert.pem\", \"-days\", \"1\", \"-subj\", \"/CN=Example\"], check=True, capture_output=True)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/sign\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"files\", (\"cert.pem\", open(\"cert.pem\", \"rb\"))),\n    (\"files\", (\"key.pem\", open(\"key.pem\", \"rb\"))),\n    (\"certificate\", (None, \"cert.pem\")),\n    (\"key\", (None, \"key.pem\")),\n    (\"reason\", (None, \"Approved\")),\n])\nr.raise_for_status()\nwith open(\"signed.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { execFileSync } from \"node:child_process\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\nexecFileSync(\"openssl\", [\"req\", \"-x509\", \"-newkey\", \"rsa:2048\", \"-nodes\", \"-keyout\", \"key.pem\", \"-out\", \"cert.pem\", \"-days\", \"1\", \"-subj\", \"/CN=Example\"], { stdio: \"ignore\" });\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"files\", new Blob([await readFile(\"cert.pem\")]), \"cert.pem\");\n  form.append(\"files\", new Blob([await readFile(\"key.pem\")]), \"key.pem\");\n  form.append(\"certificate\", \"cert.pem\");\n  form.append(\"key\", \"key.pem\");\n  form.append(\"reason\", \"Approved\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/sign\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"signed.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/timestamp": {
      "post": {
        "operationId": "pdfTimestamp",
        "summary": "Time-stamp PDFs",
        "description": "Adds a document timestamp from an RFC 3161 authority, as an update added to the PDF's end. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Output-Filename"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Url"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Error-Method"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Extra-Http-Headers"
          },
          {
            "$ref": "#/components/parameters/Gotenberg-Webhook-Events-Url"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "timestampUrl": {
                    "type": "string",
                    "description": "The RFC 3161 authority, http or https; the server's own unless given.",
                    "format": "uri",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent).",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent).",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent).\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "honoured"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The PDF; several (a split, or several documents not merged) as a ZIP.",
            "headers": {
              "Content-Disposition": {
                "$ref": "#/components/headers/Content-Disposition"
              },
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              },
              "X-Marqius-Kern-Note": {
                "$ref": "#/components/headers/X-Marqius-Kern-Note"
              },
              "X-Marqius-Kern-Fonts": {
                "$ref": "#/components/headers/X-Marqius-Kern-Fonts"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              },
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/zip"
                }
              }
            }
          },
          "204": {
            "$ref": "#/components/responses/Webhook"
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "429": {
            "$ref": "#/components/responses/Status429"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "501": {
            "$ref": "#/components/responses/Status501"
          },
          "503": {
            "$ref": "#/components/responses/Status503"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "callbacks": {
          "result": {
            "{$request.header.Gotenberg-Webhook-Url}": {
              "post": {
                "summary": "The result, sent to your address",
                "description": "Once made, the result is sent here with the method Gotenberg-Webhook-Method names (POST unless PUT or PATCH), its Content-Disposition naming the file, your trace identifier in its header, and the headers of Gotenberg-Webhook-Extra-Http-Headers. The request itself was answered 204 at once.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/pdf": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/pdf"
                      }
                    },
                    "application/zip": {
                      "schema": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "error": {
            "{$request.header.Gotenberg-Webhook-Error-Url}": {
              "post": {
                "summary": "A failure, sent to your address",
                "description": "When the request cannot be answered, the status it would have had and why, with Gotenberg-Webhook-Error-Method (POST unless PUT or PATCH).",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookError"
                      },
                      "example": {
                        "message": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)",
                        "status": 400
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          },
          "events": {
            "{$request.header.Gotenberg-Webhook-Events-Url}": {
              "post": {
                "summary": "Each outcome, sent to your address",
                "description": "webhook.success once the result is sent, webhook.error once a failure is, each with your trace identifier.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "example": {
                        "correlationId": "4f6c8a3e-2b1d-4c7e-9a5f-1e2d3c4b5a69",
                        "event": "webhook.success",
                        "timestamp": "2026-11-30T16:49:15.315Z"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Received."
                  },
                  "4XX": {
                    "description": "Refused: Marqius Kern does not send it again (except after a 429), and logs the request as failed."
                  },
                  "5XX": {
                    "description": "Not received: Marqius Kern sends it again (except after a 501), up to --webhook-max-retry times, waiting between --webhook-retry-min-wait and --webhook-retry-max-wait."
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/timestamp -F files=@a.pdf -F timestampUrl=http://timestamp.digicert.com -o timestamped.pdf"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/timestamp -F files=@a.pdf -F timestampUrl=http://timestamp.digicert.com -o timestamped.pdf"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/timestamp\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"timestampUrl\", (None, \"http://timestamp.digicert.com\")),\n])\nr.raise_for_status()\nwith open(\"timestamped.pdf\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"timestampUrl\", \"http://timestamp.digicert.com\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/timestamp\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"timestamped.pdf\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/info": {
      "post": {
        "operationId": "pdfInfo",
        "summary": "Read PDFs' facts",
        "description": "Each PDF's page count, version, size, encryption and form, as JSON by file name. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "password": {
                    "type": "string",
                    "description": "Opens password-protected PDFs.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "$ref": "#/components/schemas/PdfInfo"
                  },
                  "description": "Each PDF's facts, by file name.",
                  "type": "object"
                },
                "example": {
                  "report.pdf": {
                    "encrypted": false,
                    "formFields": false,
                    "linearized": false,
                    "pages": 1,
                    "signed": false,
                    "tagged": false,
                    "version": "1.7"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/info -F files=@a.pdf -o info.json"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/info -F files=@a.pdf -o info.json"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/info\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"info.json\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/info\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"info.json\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/metadata": {
      "post": {
        "operationId": "pdfMetadata",
        "summary": "Read PDFs' metadata",
        "description": "Each PDF's metadata, as JSON by file name. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "password": {
                    "type": "string",
                    "description": "Opens password-protected PDFs.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "$ref": "#/components/schemas/PdfMetadata"
                  },
                  "description": "Each PDF's metadata, by file name.",
                  "type": "object"
                },
                "example": {
                  "report.pdf": {
                    "author": "Ada",
                    "creationDate": "D:20261130164915Z",
                    "creator": "marqius",
                    "modDate": "D:20261130164915Z",
                    "producer": "marqius 0.12.18",
                    "title": "Quarterly"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/metadata -F files=@a.pdf -o metadata.json"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/metadata -F files=@a.pdf -o metadata.json"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/metadata\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"metadata.json\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/metadata\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"metadata.json\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/bookmarks": {
      "post": {
        "operationId": "pdfBookmarks",
        "summary": "Read PDFs' bookmarks",
        "description": "Each PDF's bookmarks, as JSON by file name. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "password": {
                    "type": "string",
                    "description": "Opens password-protected PDFs.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "items": {
                      "$ref": "#/components/schemas/Bookmark9"
                    },
                    "type": "array"
                  },
                  "description": "Each PDF's bookmarks, by file name.",
                  "type": "object"
                },
                "example": {
                  "report.pdf": [
                    {
                      "children": [
                        {
                          "pageNumber": 1,
                          "title": "Detail"
                        }
                      ],
                      "pageNumber": 1,
                      "title": "Start"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/bookmarks -F files=@a.pdf -o bookmarks.json"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/bookmarks -F files=@a.pdf -o bookmarks.json"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/bookmarks\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"bookmarks.json\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/bookmarks\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"bookmarks.json\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/attachments": {
      "post": {
        "operationId": "pdfAttachments",
        "summary": "List files carried in PDFs",
        "description": "The files each PDF carries, as JSON by file name. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "password": {
                    "type": "string",
                    "description": "Opens password-protected PDFs.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "items": {
                      "$ref": "#/components/schemas/Attachment"
                    },
                    "type": "array"
                  },
                  "description": "The files each PDF carries, by file name.",
                  "type": "object"
                },
                "example": {
                  "with-note.pdf": [
                    {
                      "mimeType": "text/plain",
                      "name": "note.txt"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\nprintf 'Shipped on Friday.\\n' > note.txt\ncurl http://localhost:3000/forms/pdf/attach -F files=@a.pdf -F files=@note.txt -F file=note.txt -o with-note.pdf\ncurl http://localhost:3000/forms/pdf/attachments -F files=@with-note.pdf -o attachments.json"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nprintf 'Shipped on Friday.\\n' > note.txt\nmarqius-kern run /forms/pdf/attach -F files=@a.pdf -F files=@note.txt -F file=note.txt -o with-note.pdf\nmarqius-kern run /forms/pdf/attachments -F files=@with-note.pdf -o attachments.json"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nwith open(\"note.txt\", \"w\") as f:\n    f.write(\"Shipped on Friday.\\n\")\n\nr = requests.post(\"http://localhost:3000/forms/pdf/attach\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"files\", (\"note.txt\", open(\"note.txt\", \"rb\"))),\n    (\"file\", (None, \"note.txt\")),\n])\nr.raise_for_status()\nwith open(\"with-note.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/attachments\", files=[\n    (\"files\", (\"with-note.pdf\", open(\"with-note.pdf\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"attachments.json\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\nawait writeFile(\"note.txt\", \"Shipped on Friday.\\n\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"files\", new Blob([await readFile(\"note.txt\")]), \"note.txt\");\n  form.append(\"file\", \"note.txt\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/attach\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"with-note.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"with-note.pdf\")]), \"with-note.pdf\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/attachments\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"attachments.json\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/form": {
      "post": {
        "operationId": "pdfForm",
        "summary": "Read PDF forms",
        "description": "Each PDF's form fields, their kinds, values and choices, as JSON by file name. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "password": {
                    "type": "string",
                    "description": "Opens password-protected PDFs.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "pages": {
                    "type": "string",
                    "description": "Only the fields on these pages: 1-3,5.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  }
                },
                "required": [
                  "files"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "items": {
                      "$ref": "#/components/schemas/FormField"
                    },
                    "type": "array"
                  },
                  "description": "Each PDF's form fields, by file name.",
                  "type": "object"
                },
                "example": {
                  "form.pdf": [
                    {
                      "name": "name",
                      "pages": [
                        1
                      ],
                      "type": "text",
                      "value": ""
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "cat > form.pdf <<'PDF'\n%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R /AcroForm << /Fields [4 0 R] /DA (/Helv 12 Tf 0 g) /DR << /Font << /Helv 5 0 R >> >> >> >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Annots [4 0 R] /Contents 6 0 R /Resources << /Font << /Helv 5 0 R >> >> >>\nendobj\n4 0 obj\n<< /Type /Annot /Subtype /Widget /FT /Tx /T (name) /V () /Rect [72 700 372 728] /P 3 0 R /F 4 /DA (/Helv 12 Tf 0 g) /MK << /BC [0 0 0] >> >>\nendobj\n5 0 obj\n<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>\nendobj\n6 0 obj\n<< /Length 43 >>\nstream\nBT /Helv 14 Tf 72 740 Td (Your name:) Tj ET\nendstream\nendobj\nxref\n0 7\n0000000000 65535 f \n0000000009 00000 n \n0000000146 00000 n \n0000000203 00000 n \n0000000347 00000 n \n0000000503 00000 n \n0000000600 00000 n \ntrailer\n<< /Size 7 /Root 1 0 R >>\nstartxref\n693\n%%EOF\nPDF\ncurl http://localhost:3000/forms/pdf/form -F files=@form.pdf -o form.json"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "cat > form.pdf <<'PDF'\n%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R /AcroForm << /Fields [4 0 R] /DA (/Helv 12 Tf 0 g) /DR << /Font << /Helv 5 0 R >> >> >> >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Annots [4 0 R] /Contents 6 0 R /Resources << /Font << /Helv 5 0 R >> >> >>\nendobj\n4 0 obj\n<< /Type /Annot /Subtype /Widget /FT /Tx /T (name) /V () /Rect [72 700 372 728] /P 3 0 R /F 4 /DA (/Helv 12 Tf 0 g) /MK << /BC [0 0 0] >> >>\nendobj\n5 0 obj\n<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>\nendobj\n6 0 obj\n<< /Length 43 >>\nstream\nBT /Helv 14 Tf 72 740 Td (Your name:) Tj ET\nendstream\nendobj\nxref\n0 7\n0000000000 65535 f \n0000000009 00000 n \n0000000146 00000 n \n0000000203 00000 n \n0000000347 00000 n \n0000000503 00000 n \n0000000600 00000 n \ntrailer\n<< /Size 7 /Root 1 0 R >>\nstartxref\n693\n%%EOF\nPDF\nmarqius-kern run /forms/pdf/form -F files=@form.pdf -o form.json"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"form.pdf\", \"w\") as f:\n    f.write('''%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R /AcroForm << /Fields [4 0 R] /DA (/Helv 12 Tf 0 g) /DR << /Font << /Helv 5 0 R >> >> >> >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Annots [4 0 R] /Contents 6 0 R /Resources << /Font << /Helv 5 0 R >> >> >>\nendobj\n4 0 obj\n<< /Type /Annot /Subtype /Widget /FT /Tx /T (name) /V () /Rect [72 700 372 728] /P 3 0 R /F 4 /DA (/Helv 12 Tf 0 g) /MK << /BC [0 0 0] >> >>\nendobj\n5 0 obj\n<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>\nendobj\n6 0 obj\n<< /Length 43 >>\nstream\nBT /Helv 14 Tf 72 740 Td (Your name:) Tj ET\nendstream\nendobj\nxref\n0 7\n0000000000 65535 f \n0000000009 00000 n \n0000000146 00000 n \n0000000203 00000 n \n0000000347 00000 n \n0000000503 00000 n \n0000000600 00000 n \ntrailer\n<< /Size 7 /Root 1 0 R >>\nstartxref\n693\n%%EOF\n''')\n\nr = requests.post(\"http://localhost:3000/forms/pdf/form\", files=[\n    (\"files\", (\"form.pdf\", open(\"form.pdf\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"form.json\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"form.pdf\", `%PDF-1.7\n1 0 obj\n<< /Type /Catalog /Pages 2 0 R /AcroForm << /Fields [4 0 R] /DA (/Helv 12 Tf 0 g) /DR << /Font << /Helv 5 0 R >> >> >> >>\nendobj\n2 0 obj\n<< /Type /Pages /Kids [3 0 R] /Count 1 >>\nendobj\n3 0 obj\n<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Annots [4 0 R] /Contents 6 0 R /Resources << /Font << /Helv 5 0 R >> >> >>\nendobj\n4 0 obj\n<< /Type /Annot /Subtype /Widget /FT /Tx /T (name) /V () /Rect [72 700 372 728] /P 3 0 R /F 4 /DA (/Helv 12 Tf 0 g) /MK << /BC [0 0 0] >> >>\nendobj\n5 0 obj\n<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>\nendobj\n6 0 obj\n<< /Length 43 >>\nstream\nBT /Helv 14 Tf 72 740 Td (Your name:) Tj ET\nendstream\nendobj\nxref\n0 7\n0000000000 65535 f \n0000000009 00000 n \n0000000146 00000 n \n0000000203 00000 n \n0000000347 00000 n \n0000000503 00000 n \n0000000600 00000 n \ntrailer\n<< /Size 7 /Root 1 0 R >>\nstartxref\n693\n%%EOF\n`);\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"form.pdf\")]), \"form.pdf\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/form\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"form.json\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    },
    "/forms/pdf/validate": {
      "post": {
        "operationId": "pdfValidate",
        "summary": "Check PDFs against a standard",
        "description": "Checks each PDF against a PDF/A, PDF/UA or Factur-X profile, with rules named as veraPDF names them, as JSON by file name. Off with `--pdf-disable-routes`.",
        "tags": [
          "PDF (Gotenberg 9)"
        ],
        "x-kern-api": "gotenberg-9.10.3",
        "parameters": [
          {
            "$ref": "#/components/parameters/Gotenberg-Trace"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "The PDFs, taken in the order of their names (numbers compared as numbers), and the files an operation names: a picture, a PDF to insert, an invoice's XML.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "archives": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary",
                      "contentMediaType": "application/octet-stream"
                    },
                    "description": "ZIP files whose contents are taken as if each file had been sent itself.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "profile": {
                    "type": "string",
                    "description": "The profile checked: a PDF/A level, PDF/UA-1 or 2, or Factur-X; sent twice, or as a JSON pair, for PDF/A with PDF/UA.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "password": {
                    "type": "string",
                    "description": "Opens password-protected PDFs.",
                    "x-kern-api": "gotenberg-9.10.3",
                    "x-kern-effect": "honoured"
                  },
                  "downloadFrom": {
                    "type": "string",
                    "contentMediaType": "application/json",
                    "description": "Files to fetch first, as if they had been sent with the request: a list of objects with a `url` and, optionally, `extraHttpHeaders` and `embedded` (true: carried inside the PDF as an attachment). Fetched as the server's `--api-download-from-*` rules allow.",
                    "x-kern-api": "gotenberg-8.40.0",
                    "x-kern-effect": "honoured"
                  },
                  "kernSign": {
                    "type": "boolean",
                    "description": "Signs the PDFs with the server's key (--kern-sign-certificate); false leaves them unsigned on a server that signs every PDF (--kern-sign-all, which is the default unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "examples": [
                      false
                    ],
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignCertificate": {
                    "type": "string",
                    "description": "The name of a file sent with the request to sign with: a PKCS #12 store (.p12, .pfx), or a PEM certificate with its key, or with the key in kernSignKey. The file is taken out of the request's files: never converted, and gone from the disk at once. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignKey": {
                    "type": "string",
                    "description": "With a PEM certificate that holds no key: the name of the file sent with the key. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignCertificatePassword": {
                    "type": "string",
                    "description": "Opens the store or the key; never logged, never echoed. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignReason": {
                    "type": "string",
                    "description": "The reason the signature gives (the server's --kern-sign-reason unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignLocation": {
                    "type": "string",
                    "description": "Where the signature says it was made (the server's --kern-sign-location unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignContactInfo": {
                    "type": "string",
                    "description": "How to reach the signer (the server's --kern-sign-contact-info unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignName": {
                    "type": "string",
                    "description": "The signer's name, as the signature gives it (the server's --kern-sign-name unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignPades": {
                    "type": "boolean",
                    "description": "Signs as PAdES; false: the classic adbe.pkcs7.detached (the server's --kern-sign-pades unless sent). Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.\n\nDefault: `true`.",
                    "default": true,
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignTimestampUrl": {
                    "type": "string",
                    "description": "An RFC 3161 time-stamp authority, http or https, that stamps the signature's time (PAdES B-T); the server's --kern-sign-timestamp-url unless sent. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignField": {
                    "type": "string",
                    "description": "Signs the PDF's empty signature field of this name, where that field is drawn; or names the new field. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernSignBox": {
                    "type": "string",
                    "description": "Shows the signature in this box: page:left,bottom,width,height in points, the page 1, 2... or last, such as 1:36,36,200,60. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  },
                  "kernTimestampUrl": {
                    "type": "string",
                    "description": "A document timestamp from this RFC 3161 authority, http or https: after the signature when there is one, alone otherwise. Marqius Kern checks the value (a wrong one is refused, in Gotenberg's words); it changes nothing in Marqius Kern's answer.",
                    "format": "uri",
                    "x-kern-api": "kern",
                    "x-kern-effect": "checked"
                  }
                },
                "required": [
                  "files",
                  "profile"
                ]
              },
              "encoding": {
                "profile": {
                  "explode": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON.",
            "headers": {
              "Gotenberg-Trace": {
                "$ref": "#/components/headers/Gotenberg-Trace"
              },
              "Gotenberg-Version": {
                "$ref": "#/components/headers/Gotenberg-Version"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "$ref": "#/components/schemas/Validation"
                  },
                  "description": "Each PDF's verdict, by file name.",
                  "type": "object"
                },
                "example": {
                  "report.pdf": {
                    "compliant": false,
                    "profile": "PDF/A-2b",
                    "violations": [
                      {
                        "clause": "6.6.4",
                        "context": "catalog Metadata",
                        "description": "The PDF/A version and conformance level shall be given with the PDF/A identification schema",
                        "severity": "fatal",
                        "specification": "ISO 19005-2:2011",
                        "testNumber": 1
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Status400"
          },
          "401": {
            "$ref": "#/components/responses/Status401"
          },
          "413": {
            "$ref": "#/components/responses/Status413"
          },
          "500": {
            "$ref": "#/components/responses/Status500"
          },
          "404": {
            "$ref": "#/components/responses/Status404"
          }
        },
        "x-kern-disabled-by": "--pdf-disable-routes",
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "curl",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\ncurl http://localhost:3000/forms/chromium/convert/html -F files=@index.html -o a.pdf\ncurl http://localhost:3000/forms/pdf/validate -F files=@a.pdf -F profile=PDF/A-2b -o report.json"
          },
          {
            "lang": "Shell",
            "label": "marqius-kern run, no server",
            "source": "printf '<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>' > index.html\nmarqius-kern run /forms/chromium/convert/html -F files=@index.html -o a.pdf\nmarqius-kern run /forms/pdf/validate -F files=@a.pdf -F profile=PDF/A-2b -o report.json"
          },
          {
            "lang": "Python",
            "label": "Python",
            "source": "# Python 3 with requests (pip install requests)\nimport requests\n\nwith open(\"index.html\", \"w\") as f:\n    f.write(\"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\")\n\nr = requests.post(\"http://localhost:3000/forms/chromium/convert/html\", files=[\n    (\"files\", (\"index.html\", open(\"index.html\", \"rb\"))),\n])\nr.raise_for_status()\nwith open(\"a.pdf\", \"wb\") as f:\n    f.write(r.content)\n\nr = requests.post(\"http://localhost:3000/forms/pdf/validate\", files=[\n    (\"files\", (\"a.pdf\", open(\"a.pdf\", \"rb\"))),\n    (\"profile\", (None, \"PDF/A-2b\")),\n])\nr.raise_for_status()\nwith open(\"report.json\", \"wb\") as f:\n    f.write(r.content)"
          },
          {
            "lang": "JavaScript",
            "label": "JavaScript",
            "source": "// Node 18 or later: save as sample.mjs, then run node sample.mjs\nimport { readFile, writeFile } from \"node:fs/promises\";\n\nawait writeFile(\"index.html\", \"<!doctype html><html><body><h1>Hello</h1><p>Made by marqius-kern.</p></body></html>\");\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"index.html\")]), \"index.html\");\n  const res = await fetch(\"http://localhost:3000/forms/chromium/convert/html\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"a.pdf\", Buffer.from(await res.arrayBuffer()));\n}\n\n{\n  const form = new FormData();\n  form.append(\"files\", new Blob([await readFile(\"a.pdf\")]), \"a.pdf\");\n  form.append(\"profile\", \"PDF/A-2b\");\n  const res = await fetch(\"http://localhost:3000/forms/pdf/validate\", { method: \"POST\", body: form });\n  if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);\n  await writeFile(\"report.json\", Buffer.from(await res.arrayBuffer()));\n}"
          }
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "Gotenberg-Output-Filename": {
        "name": "Gotenberg-Output-Filename",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Names the result, without its extension: Marqius Kern adds the right one. Only the name's last part is kept, without control characters."
      },
      "Gotenberg-Trace": {
        "name": "Gotenberg-Trace",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Your identifier for the request: logged and sent back. One is made up when none is sent. `--api-trace-header` renames the header."
      },
      "Gotenberg-Webhook-Url": {
        "name": "Gotenberg-Webhook-Url",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Sends the result to this address (http or https) instead of answering with it: the request is answered 204 at once."
      },
      "Gotenberg-Webhook-Error-Url": {
        "name": "Gotenberg-Webhook-Error-Url",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Where a failure is sent, as {\"status\":…,\"message\":…}. Gotenberg 8.40.0 calls it deprecated for Gotenberg-Webhook-Events-Url; one of the two is required with Gotenberg-Webhook-Url."
      },
      "Gotenberg-Webhook-Method": {
        "name": "Gotenberg-Webhook-Method",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "The method the result is sent with: POST (the default), PUT or PATCH."
      },
      "Gotenberg-Webhook-Error-Method": {
        "name": "Gotenberg-Webhook-Error-Method",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "The method a failure is sent with: POST (the default), PUT or PATCH."
      },
      "Gotenberg-Webhook-Extra-Http-Headers": {
        "name": "Gotenberg-Webhook-Extra-Http-Headers",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "A JSON object of headers sent with the result or the failure."
      },
      "Gotenberg-Webhook-Events-Url": {
        "name": "Gotenberg-Webhook-Events-Url",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Where each outcome is posted too: webhook.success or webhook.error. One of it and Gotenberg-Webhook-Error-Url is required with Gotenberg-Webhook-Url."
      }
    },
    "headers": {
      "Content-Disposition": {
        "description": "`attachment` and the file's name.",
        "schema": {
          "type": "string"
        }
      },
      "Gotenberg-Trace": {
        "description": "Your identifier, or the one made up.",
        "schema": {
          "type": "string"
        }
      },
      "Gotenberg-Version": {
        "description": "The version of Gotenberg's API answered (8.40.0). Left out of a 401.",
        "schema": {
          "type": "string"
        }
      },
      "X-Marqius-Kern-Note": {
        "description": "What Marqius Kern did not do or print, when anything: a field with no effect here, a part of a document not printed yet, letters no font had.",
        "schema": {
          "type": "string"
        }
      },
      "X-Marqius-Kern-Fonts": {
        "description": "With kernFontReport or --kern-font-report: the fonts each conversion used, their files, and what stood in for what, as JSON.",
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Webhook": {
        "description": "The request is accepted: its result is sent to Gotenberg-Webhook-Url, or its failure to Gotenberg-Webhook-Error-Url."
      },
      "Status400": {
        "description": "A form field or a header is missing or wrong, in Gotenberg's words.",
        "content": {
          "text/plain": {
            "schema": {
              "type": "string"
            },
            "example": "Invalid form data: form field 'scale' is invalid (got 'foo', resulting to strconv.ParseFloat: parsing \"foo\": invalid syntax)"
          }
        }
      },
      "Status401": {
        "description": "The credentials are missing or wrong, with --api-enable-basic-auth on.",
        "content": {
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "Status403": {
        "description": "The address lists refuse an address the request makes the server fetch: `Forbidden`; the log says why.",
        "content": {
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "Status404": {
        "description": "The route is off on this server, or there is no such route: {\"message\":\"Not Found\"}.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object"
            }
          }
        }
      },
      "Status409": {
        "description": "A failOn… check failed (the page or a file it loads answered an error, the console said what the request refuses), or a font the request requires is missing.",
        "content": {
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "Status413": {
        "description": "The request is larger than --api-body-limit allows.",
        "content": {
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "Status429": {
        "description": "The queue for this kind of conversion is full; try again shortly.",
        "content": {
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "Status500": {
        "description": "Something else failed; the request's trace identifier finds it in the log.",
        "content": {
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "Status501": {
        "description": "What the request asks for, Marqius Kern does not do yet; the answer says what, before any work is done.",
        "content": {
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "Status503": {
        "description": "The request took longer than --api-timeout, or the server is stopping.",
        "content": {
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "schemas": {
      "Attachment": {
        "properties": {
          "mimeType": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "Bookmark": {
        "properties": {
          "children": {
            "items": {
              "$ref": "#/components/schemas/Bookmark"
            },
            "type": "array"
          },
          "page": {
            "minimum": 1,
            "type": "integer"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "page"
        ],
        "type": "object"
      },
      "Bookmark9": {
        "properties": {
          "children": {
            "items": {
              "$ref": "#/components/schemas/Bookmark9"
            },
            "type": "array"
          },
          "pageNumber": {
            "minimum": 1,
            "type": "integer"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "pageNumber"
        ],
        "type": "object"
      },
      "FormField": {
        "properties": {
          "name": {
            "type": "string"
          },
          "pages": {
            "items": {
              "type": "integer"
            },
            "type": "array"
          },
          "type": {
            "description": "text, checkbox, radio, choice or signature",
            "type": "string"
          },
          "value": {
            "description": "The field's value: text, a state's name, or a list for a choice that selects several."
          }
        },
        "required": [
          "name",
          "type"
        ],
        "type": "object"
      },
      "Health": {
        "properties": {
          "details": {
            "additionalProperties": {
              "properties": {
                "status": {
                  "enum": [
                    "up",
                    "down"
                  ],
                  "type": "string"
                },
                "timestamp": {
                  "format": "date-time",
                  "type": "string"
                }
              },
              "type": "object"
            },
            "description": "Each engine's state.",
            "type": "object"
          },
          "status": {
            "enum": [
              "up",
              "down"
            ],
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "PdfInfo": {
        "properties": {
          "encrypted": {
            "type": "boolean"
          },
          "formFields": {
            "type": "boolean"
          },
          "linearized": {
            "type": "boolean"
          },
          "pages": {
            "type": "integer"
          },
          "signed": {
            "type": "boolean"
          },
          "tagged": {
            "type": "boolean"
          },
          "version": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PdfMetadata": {
        "properties": {
          "author": {
            "type": "string"
          },
          "creationDate": {
            "type": "string"
          },
          "creator": {
            "type": "string"
          },
          "keywords": {
            "type": "string"
          },
          "modDate": {
            "type": "string"
          },
          "producer": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Validation": {
        "properties": {
          "compliant": {
            "type": "boolean"
          },
          "profile": {
            "type": "string"
          },
          "violations": {
            "items": {
              "$ref": "#/components/schemas/Violation"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "Violation": {
        "properties": {
          "clause": {
            "type": "string"
          },
          "context": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "specification": {
            "type": "string"
          },
          "testNumber": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "WebhookError": {
        "properties": {
          "message": {
            "description": "Why, in Gotenberg's words.",
            "type": "string"
          },
          "status": {
            "description": "The status the request would have been answered.",
            "type": "integer"
          }
        },
        "required": [
          "status",
          "message"
        ],
        "type": "object"
      },
      "WebhookEvent": {
        "properties": {
          "correlationId": {
            "description": "The request's trace identifier.",
            "type": "string"
          },
          "error": {
            "$ref": "#/components/schemas/WebhookError"
          },
          "event": {
            "enum": [
              "webhook.success",
              "webhook.error"
            ],
            "type": "string"
          },
          "timestamp": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "event",
          "correlationId",
          "timestamp"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "With --api-enable-basic-auth (GOTENBERG_API_BASIC_AUTH_USERNAME and _PASSWORD)."
      }
    }
  }
}
