Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "VisualCapture",
"description": "Captures a widget and downloads it as PDF or PNG.",
"type": "object",
"examples": [
{
"title": "Screenshot the current view",
"description": "VisualCapture rasterises a widget subtree (defaults to the current screen) and returns image bytes. Use for share cards, PDF snapshots, or 'attach a screenshot' bug reports.",
"document": {
"PresentationType": "Button",
"Text": "Screenshot this view",
"Icon": "camera-fill",
"BorderRadius": 6,
"Color": "#FFFFFF",
"BackgroundColor": "#2F6FED",
"OnClick": {
"Handler": "VisualCapture",
"OnSuccess": {
"Handler": "SnackBar",
"Message": "Captured screenshot"
}
}
}
}
],
"x-version": "1.0",
"required": [
"Handler",
"WidgetKey"
],
"properties": {
"Handler": {
"const": "VisualCapture"
},
"WidgetKey": {
"type": "string"
},
"DownloadType": {
"type": "string",
"enum": [
"pdf",
"png",
"PDF",
"PNG"
]
},
"OnSuccess": {
"$ref": "/schema/Actions/Action/1.0/index.json"
},
"OnFailure": {
"$ref": "/schema/Actions/Action/1.0/index.json"
}
},
"additionalProperties": false,
"x-icon": "<svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"7\" width=\"18\" height=\"13\" rx=\"2\"/><circle cx=\"12\" cy=\"13.5\" r=\"3.5\"/><path d=\"M8 7l1.5-2.5h5L16 7\"/></svg>",
"$id": "/schema/Actions/VisualCapture/1.0/index.json",
"x-family": "Actions",
"x-name": "VisualCapture",
"x-source-package": "zero-schema"
}
VisualCapture rasterises a widget subtree (defaults to the current screen) and returns image bytes. Use for share cards, PDF snapshots, or 'attach a screenshot' bug reports.
{
"PresentationType": "Button",
"Text": "Screenshot this view",
"Icon": "camera-fill",
"BorderRadius": 6,
"Color": "#FFFFFF",
"BackgroundColor": "#2F6FED",
"OnClick": {
"Handler": "VisualCapture",
"OnSuccess": {
"Handler": "SnackBar",
"Message": "Captured screenshot"
}
}
}