Actions19
- Category Actions
- Document Actions
- Template Actions
Document → Build Image
AI-generatedSummary
Render a specific page of a document as an image, either by building it from an existing document ID or by creating a new document on-the-fly from a template with optional data, settings, and name.
Inputs
- Page — Page number to render (1-based), defaults to 1.
- Build Source (required) — Choose whether to build the image from an existing document ID ('By Document ID') or create a document directly from a template ('Directly From Template').
- Document ID (required) — ID of the existing document to build the image from; required if 'Build Source' is 'By Document ID'.
- Template ID (required) — ID of the template to create the document from; required if 'Build Source' is 'Directly From Template'.
- Name — Optional name for the newly created document when building directly from a template.
- Init (Empty Document) — Whether to create an empty document without data when building directly from a template; defaults to false.
- Settings (JSON) — JSON object specifying document settings like size, background, color, margin, padding, and font size; used only when building directly from a template and not initializing an empty document.
- Data (JSON) — JSON object containing the document field data; used only when building directly from a template and not initializing an empty document.
- Keep Document — For documents built directly from a template, determines whether to keep the created document in your list after building. Default is true; disable to auto-delete after file generation.
Output shape
a single binary PNG image file representing the specified page of the document, accompanied by JSON metadata including the image URL, document ID, and page number.
If building from a template (direct mode), the node creates a document on-the-fly and optionally deletes it afterward depending on the 'Keep Document' flag. The binary output is prepared with the filename format 'document-
-p .png' and MIME type 'image/png'.
Examples
Example 1: Build an image from an existing document
Set 'Build Source' to 'By Document ID', provide the 'Document ID', and specify the 'Page' number to render. The output will be the PNG image of that page.
Example 2: Build an image directly from a template with data
Set 'Build Source' to 'Directly From Template', provide the 'Template ID', optional 'Name', optional 'Settings' and 'Data' JSON objects, and specify the 'Page' number. The node creates the document, builds the image, and returns the PNG binary. Optionally, 'Keep Document' can be set false to auto-delete after generation.