{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pdfconversionapi-com/json-schema/pdfconversionapi-com-pdf-to-image-watermark-form-schema.json",
  "title": "PdfToImageWatermarkForm",
  "description": "The form for `pdf/to/image-watermark`: the parameters listed on https://pdfconversionapi.com/pdf/watermark. Other parameters are sent as text.",
  "x-generated": "2026-12-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pdfconversionapi-com-openapi.json#/components/schemas/PdfToImageWatermarkForm",
  "type": "object",
  "required": [
    "File",
    "ImageFile"
  ],
  "properties": {
    "File": {
      "type": "string",
      "format": "binary",
      "contentMediaType": "application/octet-stream",
      "description": "The file to convert. Its name becomes the output's name, with the new extension."
    },
    "Text": {
      "type": "string",
      "description": "`text-watermark` only, required. A line break in the value starts a second line. Western European characters only; other scripts return 422."
    },
    "FontSize": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000,
      "description": "`text-watermark` only. Left out, the text is sized to run across the page.\n\nValues: 1–1000 (points).\n\nDefault: fit to page."
    },
    "FontColor": {
      "type": "string",
      "default": "#999999",
      "description": "`text-watermark` only. A name (`white`, `black`, `red`, `green`, `blue`, `gray`), `#RRGGBB` or `R,G,B`."
    },
    "Opacity": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "default": 50,
      "description": "How opaque the mark is, in percent. All three routes."
    },
    "Rotate": {
      "type": "integer",
      "minimum": -360,
      "maximum": 360,
      "default": 45,
      "description": "Angle in degrees, counter-clockwise; negative turns clockwise. Left out, the mark runs diagonally from bottom left to top right. All three routes; send 0 for a level mark."
    },
    "Style": {
      "type": "string",
      "enum": [
        "stamp",
        "watermark"
      ],
      "default": "stamp",
      "description": "`stamp` draws the mark over the page content. `watermark` draws it underneath, so shaded table cells and filled shapes cover those parts of it. All three routes."
    },
    "OffsetX": {
      "type": "number",
      "default": 0,
      "description": "Move the mark right from the page center, in `MeasurementUnit`. Negative moves it left."
    },
    "OffsetY": {
      "type": "number",
      "default": 0,
      "description": "Move the mark down from the page center. Negative moves it up."
    },
    "MeasurementUnit": {
      "type": "string",
      "enum": [
        "pt",
        "in",
        "mm",
        "cm"
      ],
      "default": "pt",
      "description": "Unit for `OffsetX` and `OffsetY`."
    },
    "PageRange": {
      "type": "string",
      "description": "Pages to mark. Left out, every page gets the mark. A page past the end returns 400 (\"PageRange asks for page 3, but the document has 2 pages\"), but a range may end past it. On a protected file, `PageRange` works with the owner password, and with the open password of a file that restricts nothing; with the open password of a file that keeps restrictions it returns 400 for now.\n\nValues: Pages and ranges, e.g. `1`, `2-5,9` or `2-last`."
    },
    "ImageFile": {
      "type": "string",
      "format": "binary",
      "contentMediaType": "application/octet-stream",
      "description": "`image-watermark` only, required. Sent as a second file field. PNG transparency is kept, and the image is embedded at its own pixel size.\n\nValues: PNG, JPEG, TIFF, GIF, BMP."
    },
    "OverlayPage": {
      "type": "integer",
      "default": 1,
      "description": "`pdf-watermark` only. Which page of `OverlayFile` to use. A page past the end returns 422."
    },
    "Scale": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 50,
      "description": "`image-watermark` and `pdf-watermark`. Size of the mark relative to the page, in percent. Values up to 1000 are accepted, but anything over 100 is drawn at 100."
    },
    "Password": {
      "type": "string",
      "description": "Password of an encrypted input. Opened with its owner password, or with the open password of a file that restricts nothing, the result comes back unencrypted; opened with the open password of a file that keeps restrictions, it keeps the same encryption and password. A file that restricts editing needs its owner password, even if it opens without one; the open password alone returns 422. A file with only an owner password that restricts nothing needs no `Password` and comes back unencrypted, whatever you send."
    },
    "FileName": {
      "type": "string",
      "description": "Name for the output file; the last extension is replaced with .pdf. Without it the result has the same name as the upload, so saving it next to the original replaces the unmarked file."
    },
    "StoreFile": {
      "type": "boolean",
      "default": false,
      "description": "Return a download link instead of the file. The link expires after 3 hours and the file is then deleted."
    }
  },
  "additionalProperties": {
    "type": "string"
  }
}