PDF kit command
fillSign.add
Fill & Sign: type text or place a mark
Fill in a form that has no fields: type text (`text`, 10 pt), place a check, cross, dot or line, today's date (in Preferences ▸ Date format, see fillSign.setDateFormat, or `format`), or a signature or initials (either `text` drawn in a script font, or `path` to a local PNG/JPEG image up to 4 MiB and 4 megapixels, preserving transparency). `at` [x, y] is in points from the top-left of the page: text's top-left, mark's centre, signature's left edge centred vertically. Image signatures fit within 150 pt wide and 32 pt tall (24 pt for initials). Creates movable, undoable annotations.
- Kit
- PDF 0.1.0 (.pdf)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
at | number[] | yes | [x, y] in points from the top-left of the displayed page. (maxItems 2, minItems 2) |
author | string | no | |
format | string | no | For type date: this pattern instead of the date-format preference, e.g. "dd.mm.yyyy". |
language | string | no | For type date: month and weekday names in this language code (see fillSign.setDateFormat) instead of the preference. |
page | integer | yes | (minimum 1) |
text | string | no | (minLength 1) |
type | "text" | "check" | "cross" | "dot" | "line" | "date" | "signature" | "initials" | yes |
Call through pdf_run
pdf_run {
"path": "<file>.pdf",
"steps": [{ "command": "fillSign.add", "params": { "at": <number[]>, "page": <integer>, "type": <"text" | "check" | "cross" | "dot" | "line" | "date" | "signature" | "initials"> } }]
}The required parameters, with placeholders for their types: not a tested example. Optional: author, format, language, text. pdf_run answers the step’s result in completed[i].result.
Result
The kit gives no result schema for this command.
Parameter schema
{
"additionalProperties": false,
"properties": {
"at": {
"description": "[x, y] in points from the top-left of the displayed page. (maxItems 2, minItems 2)",
"items": {
"type": "number"
},
"type": "array"
},
"author": {
"type": "string"
},
"format": {
"description": "For type date: this pattern instead of the date-format preference, e.g. \"dd.mm.yyyy\".",
"type": "string"
},
"language": {
"description": "For type date: month and weekday names in this language code (see fillSign.setDateFormat) instead of the preference.",
"type": "string"
},
"page": {
"description": "(minimum 1)",
"type": "integer"
},
"text": {
"description": "(minLength 1)",
"type": "string"
},
"type": {
"enum": [
"text",
"check",
"cross",
"dot",
"line",
"date",
"signature",
"initials"
],
"type": "string"
}
},
"required": [
"at",
"page",
"type"
],
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (pdf_commands through @kition/[email protected], built from KitionAI/kition-pdf@b0d2725). As data: commands.jsonl.