addedInput schema / properties / options
Added value: +{
+ "additionalProperties": false,
+ "description": "The engine's print options — the same as the ReflowPDF API's `options` (https://api.reflowpdf.com/docs/), each checked the same way: a wrong or conflicting one is refused with what to change. Shrinking like a browser's print: shrink_to_fit (fit to the page width) or print_scale (a factor, e.g. 0.8 for 80%). pdf_ua, pdf_a and shrink_to_fit may also be given outside options. Kept for the document's later prints; given, they replace the document's options (an empty object clears them). Omitted: the document's options stay.",
+ "properties": {
+ "allow_remote": {
+ "default": true,
+ "description": "Fetch remote images, stylesheets and fonts over http(s) (public addresses only). `false` renders with embedded resources only.",
+ "type": "boolean"
+ },
+ "attachments": {
+ "description": "Files to embed in the PDF (10 MB in total). With `pdf_a: \"3a\"` they are PDF/A-3 associated files. Not allowed with `pdf_a: \"1b\"` or `pdf_x`, whose standards forbid embedded files.",
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "content": {
+ "contentEncoding": "base64",
+ "description": "The file content, base64-encoded.",
+ "type": "string"
+ },
+ "description": {
+ "description": "A description shown by PDF readers.",
+ "type": "string"
+ },
+ "element": {
+ "description": "The `id` of the element the file belongs to (e.g. a table's data); the whole document if omitted.",
+ "type": "string"
+ },
+ "filename": {
+ "description": "The attachment's file name.",
+ "examples": [
+ "data.csv"
+ ],
+ "type": "string"
+ },
+ "mime_type": {
+ "description": "The media type.",
+ "examples": [
+ "text/csv"
+ ],
+ "type": "string"
+ },
+ "relationship": {
+ "default": "unspecified",
+ "description": "The file's relationship to the document (PDF/A-3 `AFRelationship`).",
+ "enum": [
+ "data",
+ "source",
+ "alternative",
+ "supplement",
+ "unspecified"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "filename",
+ "content"
+ ],
+ "type": "object"
+ },
+ "maxItems": 20,
+ "type": "array"
+ },
+ "base_css": {
+ "description": "Your CSS, applied at the user-agent level: defaults that the document's own CSS can override.",
+ "maxLength": 1048576,
+ "type": "string"
+ },
+ "base_url": {
+ "description": "The base URL (http or https) for the document's relative URLs; acts as `<base href>` unless the document sets its own.",
+ "examples": [
+ "https://example.com/invoices/"
+ ],
+ "format": "uri",
+ "type": "string"
+ },
+ "color_scheme": {
+ "default": "light",
+ "description": "The value of the `prefers-color-scheme` media feature.",
+ "enum": [
+ "light",
+ "dark"
+ ],
+ "type": "string"
+ },
+ "compression": {
+ "default": "default",
+ "description": "Lossless compression effort for streams. Images are never resampled.",
+ "enum": [
+ "fast",
+ "default",
+ "smallest"
+ ],
+ "type": "string"
+ },
+ "default_font_size": {
+ "default": "12pt",
+ "description": "The size of CSS `medium`: the document's base font size.",
+ "type": "string"
+ },
+ "e_invoice": {
+ "additionalProperties": false,
+ "description": "Produce a hybrid e-invoice: Factur-X 1.0 / ZUGFeRD 2.5 (FNFE-MPE and FeRD, Factur-X 1.09.2), a PDF/A-3a with the invoice XML embedded. The XML is validated against its profile first (the KoSIT validator for XRechnung 3.0; the EN 16931 XSD and Schematron of Factur-X 1.09.2); an invoice that fails is refused with each violated rule. Its `attachments` use the formats Factur-X allows (§6.4: PDF, TXT, GIF, TIFF, JPG, CSV, XML, JSON, XLS, XLSX, ODS, each with its `mime_type`) and names other than the invoice's (`factur-x.xml`, `xrechnung.xml`, `zugferd-invoice.xml`). Not with `pdf_a: \"1b\"`, `pdf_ua: 2`, `pdf_x`, `wtpdf` or `encryption`. An e-invoice depends on the account's plan; a print it does not include is refused with the reason.",
+ "properties": {
+ "profile": {
+ "description": "`en16931`: the EN 16931 (Comfort) profile, embedded as `factur-x.xml`; `xrechnung`: the XRECHNUNG reference profile (the German CIUS), embedded as `xrechnung.xml`. The XML's specification identifier (BT-24) must match the profile exactly: `urn:cen.eu:en16931:2017`, or `urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0` (XRechnung 3.0).",
+ "enum": [
+ "en16931",
+ "xrechnung"
+ ],
+ "type": "string"
+ },
+ "xml": {
+ "description": "The invoice as UN/CEFACT Cross Industry Invoice (CII) XML text, up to 5 MB in UTF-8. It is embedded as UTF-8, so its XML declaration must specify UTF-8 or no encoding.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "profile",
+ "xml"
+ ],
+ "type": "object"
+ },
+ "encryption": {
+ "additionalProperties": false,
+ "description": "Encrypt the PDF (AES-256 by default, ISO 32000-2). Not compatible with PDF/A or PDF/X, whose standards forbid encryption.",
+ "properties": {
+ "algorithm": {
+ "default": "aes-256",
+ "description": "Use `rc4-128` only for readers older than Acrobat 9.",
+ "enum": [
+ "aes-256",
+ "rc4-128"
+ ],
+ "type": "string"
+ },
+ "owner_password": {
+ "description": "The password that lifts the permission restrictions.",
+ "maxLength": 127,
+ "type": "string"
+ },
+ "permissions": {
+ "description": "Allowed actions; anything not listed is denied. Text extraction for accessibility (screen readers) is always allowed (ISO 32000-2, PDF/UA).",
+ "items": {
+ "enum": [
+ "print",
+ "print-high",
+ "modify",
+ "copy",
+ "annotate",
+ "fill-forms",
+ "assemble"
+ ],
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "user_password": {
+ "description": "The password required to open the file. If empty or omitted, the file opens without a password, with the permissions below.",
+ "maxLength": 127,
+ "type": "string"
+ }
+ },
+ "required": [
+ "owner_password"
+ ],
+ "type": "object"
+ },
+ "header_footer": {
+ "additionalProperties": false,
+ "description": "A line of text in the top and bottom margins of every page. CSS `@page` margin boxes (`@top-center { content: … counter(page) }`) do the same in the document itself, with full styling.",
+ "properties": {
+ "color": {
+ "description": "A CSS color.",
+ "examples": [
+ "#666666"
+ ],
+ "type": "string"
+ },
+ "font_size": {
+ "default": "7.5pt",
+ "description": "A CSS length.",
+ "type": "string"
+ },
+ "footer": {
+ "description": "Text in the bottom margin of every page; `{pageNum}` and `{totalPages}` are replaced.",
+ "maxLength": 500,
+ "type": "string"
+ },
+ "footer_align": {
+ "default": "center",
+ "description": "Alignment of the footer.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "type": "string"
+ },
+ "header": {
+ "description": "`{pageNum}` and `{totalPages}` are replaced on each page.",
+ "examples": [
+ "Quarterly report, page {pageNum} of {totalPages}"
+ ],
+ "maxLength": 500,
+ "type": "string"
+ },
+ "header_align": {
+ "default": "center",
+ "description": "Alignment of the header.",
+ "enum": [
+ "left",
+ "center",
+ "right"
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "input_format": {
+ "default": "html",
+ "description": "`xhtml`: parse the document as XML.",
+ "enum": [
+ "html",
+ "xhtml"
+ ],
+ "type": "string"
+ },
+ "javascript": {
+ "default": false,
+ "description": "Run the document's scripts before rendering, against the engine's own DOM, with layout queries answered by the engine. Off by default: without it scripts do not run.",
+ "type": "boolean"
+ },
+ "lang": {
+ "description": "The document language (BCP 47), used when `<html lang>` is not set.",
+ "examples": [
+ "en",
+ "de-CH"
+ ],
+ "type": "string"
+ },
+ "max_pages": {
+ "description": "Render at most this many pages; the rest is omitted.",
+ "maximum": 5000,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "metadata": {
+ "additionalProperties": false,
+ "description": "Overrides the document's `<meta name=\"author|description|keywords\">`.",
+ "properties": {
+ "author": {
+ "maxLength": 1000,
+ "type": "string"
+ },
+ "keywords": {
+ "maxLength": 1000,
+ "type": "string"
+ },
+ "subject": {
+ "maxLength": 1000,
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "object_streams": {
+ "default": true,
+ "description": "Pack objects into object streams (smaller files). `false` writes a classic cross-reference table for readers older than PDF 1.5.",
+ "type": "boolean"
+ },
+ "paper": {
+ "additionalProperties": false,
+ "description": "The default paper, applied as a user-agent `@page` rule: any property the document's own `@page` sets takes precedence. Without either: A4 portrait, 20 mm margins.",
+ "properties": {
+ "margin": {
+ "default": "20mm",
+ "description": "A CSS margin value.",
+ "examples": [
+ "20mm",
+ "15mm 20mm"
+ ],
+ "type": "string"
+ },
+ "orientation": {
+ "default": "portrait",
+ "description": "`portrait` or `landscape`.",
+ "enum": [
+ "portrait",
+ "landscape"
+ ],
+ "type": "string"
+ },
+ "size": {
+ "default": "A4",
+ "description": "A0–A10, B0–B10, C0–C10, JIS-B4, JIS-B5, Letter, Legal, Ledger, Tabloid, or two lengths such as \"210mm 297mm\".",
+ "examples": [
+ "A4",
+ "Letter",
+ "100mm 150mm"
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "pdf_a": {
+ "description": "Declare PDF/A conformance: `3a` is ISO 19005-3, conformance level A (tagged, includes PDF/UA-1); `1b` is ISO 19005-1, conformance level B (PDF 1.4: transparency is flattened into opaque images, text stays selectable). A document that cannot conform is refused with the reason. PDF/A depends on the account's plan; a print it does not include is refused with the reason.",
+ "enum": [
+ "3a",
+ "1b"
+ ],
+ "type": "string"
+ },
+ "pdf_ua": {
+ "description": "Declare PDF/UA conformance: `1` (ISO 14289-1, PDF 1.7) or `2` (ISO 14289-2, PDF 2.0). Every PDF is tagged unless `tagged: false`. PDF/UA-2 depends on the account's plan; a print it does not include is refused with the reason.",
+ "enum": [
+ 1,
+ 2
+ ],
+ "type": "integer"
+ },
+ "pdf_x": {
+ "additionalProperties": false,
+ "description": "Declare PDF/X conformance for an output intent: colors, page boxes and the output intent of a print-ready file. PDF/X depends on the account's plan; a print it does not include is refused with the reason.",
+ "properties": {
+ "output_intent": {
+ "description": "A print condition of the engine's registry (e.g. `FOGRA39`, `CGATS21-2-CRPC5`, `CGATS TR 001`), or the name of your own `profile`.",
+ "examples": [
+ "FOGRA39",
+ "CGATS21-2-CRPC5",
+ "CGATS TR 001"
+ ],
+ "type": "string"
+ },
+ "profile": {
+ "contentEncoding": "base64",
+ "description": "Your printer's ICC output profile (device class `prtr`; Gray, RGB or CMYK; up to 8 MB), base64-encoded.",
+ "type": "string"
+ },
+ "standard": {
+ "default": "x-4",
+ "description": "`x-4`: ISO 15930-7 (PDF 1.6, transparency and RGB preserved); `x-1a`: ISO 15930-4 (PDF 1.4, all colors converted to the output intent's inks, transparency flattened; requires a CMYK output intent).",
+ "enum": [
+ "x-4",
+ "x-1a"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "output_intent"
+ ],
+ "type": "object"
+ },
+ "print_scale": {
+ "description": "Scale the document down by this factor.",
+ "maximum": 0.99,
+ "minimum": 0.06,
+ "type": "number"
+ },
+ "shrink_to_fit": {
+ "default": false,
+ "description": "Scale a document wider than the page down to fit, as browsers do. Off by default, so lengths stay physical.",
+ "type": "boolean"
+ },
+ "tagged": {
+ "default": true,
+ "description": "Produce a tagged PDF (logical structure for screen readers and reflow). `false` produces a smaller untagged file; not compatible with `pdf_ua` or `pdf_a: \"3a\"`.",
+ "type": "boolean"
+ },
+ "title": {
+ "description": "The PDF title (defaults to the document's `<title>`, then to its first `<h1>`).",
+ "maxLength": 500,
+ "type": "string"
+ },
+ "watermark": {
+ "additionalProperties": false,
+ "description": "A text or image stamped on every page, behind the content unless `above` is set; marked as an artifact in a tagged PDF.",
+ "properties": {
+ "above": {
+ "default": false,
+ "description": "Draw over the content instead of behind it.",
+ "type": "boolean"
+ },
+ "angle": {
+ "default": -45,
+ "description": "Rotation in degrees, counterclockwise.",
+ "type": "number"
+ },
+ "color": {
+ "description": "A CSS color.",
+ "type": "string"
+ },
+ "font_size": {
+ "default": 60,
+ "description": "In points.",
+ "type": "number"
+ },
+ "image": {
+ "description": "An https or data: URL of an image (instead of `text`).",
+ "type": "string"
+ },
+ "image_height": {
+ "description": "Image height in points, with `image_width`.",
+ "type": "number"
+ },
+ "image_width": {
+ "description": "Image width in points, with `image_height` (defaults to its natural size at 96 dpi).",
+ "type": "number"
+ },
+ "opacity": {
+ "default": 0.08,
+ "description": "From 0 (transparent) to 1 (opaque).",
+ "maximum": 1,
+ "minimum": 0,
+ "type": "number"
+ },
+ "position": {
+ "additionalProperties": false,
+ "description": "Place a single stamp at this position (points from the page's top-left corner) instead of the center.",
+ "properties": {
+ "x": {
+ "type": "number"
+ },
+ "y": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "text": {
+ "description": "The watermark text.",
+ "examples": [
+ "DRAFT",
+ "CONFIDENTIAL"
+ ],
+ "maxLength": 200,
+ "type": "string"
+ },
+ "tile": {
+ "default": false,
+ "description": "Repeat the stamp across the page.",
+ "type": "boolean"
+ },
+ "tile_spacing": {
+ "description": "[x, y] spacing of the tiles, in points.",
+ "items": {
+ "type": "number"
+ },
+ "maxItems": 2,
+ "minItems": 2,
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "wtpdf": {
+ "description": "Declare Well-Tagged PDF 1.0 conformance (PDF Association): a tagged PDF 2.0 that declares its conformance level. `accessibility` declares both levels (it includes the requirements of `reuse`); `reuse` declares the reuse level. The file also conforms to PDF/UA-2. Not with `pdf_a`, `pdf_x` or `pdf_ua: 1`, which use earlier PDF versions. Well-Tagged PDF depends on the account's plan; a print it does not include is refused with the reason.",
+ "enum": [
+ "accessibility",
+ "reuse"
+ ],
+ "type": "string"
+ }
+ },
+ "type": "object"
+}