Heisenware Docs
Go to websiteGet a demo
  • 👋Welcome
  • Getting started
  • Release Notes
    • v84 - Get in the flow
    • v83 - Beauty treatment
    • v82 — Fully distributed
    • v81 — Removing old cruft
    • v80 — Chicks on fire
    • v79 — Nothing is forever
    • v78 — Keep moving
    • v77 — More intelligence
    • v76 — Well cooked
  • Build & Deploy Apps
    • Overview
    • Flow Builder
      • Nodes (Functions)
        • Inputs
        • Trigger
        • Output
      • Flows
      • Function Extensions
        • Modifier
        • Filter
        • Error handler
        • Memorizer
      • Objects & Instances
      • Utilities
        • Basic Functions
        • PDF functions
        • Circular buffer
        • Timer
        • Counter
    • Integrations
      • Protocol Connectors
        • GraphQL
        • HTTP/REST
        • MQTT
        • OPC UA
          • Heidenhain PLCs with OPC UA
        • RS-232/485
        • Siemens S7
      • Data Connectors
        • File
        • Relational Database
        • Time Series Database (WIP)
      • API Connectors
        • OGC SensorThings API
        • Operating System
        • Zebra RFID IoT Connector
      • Agent / (Edge Connector)
      • Calling Custom Code
    • UI Builder
      • Input Widgets
        • Form
        • File Upload
        • Photo
        • Signature
        • Barcode / QR-Code (WIP)
        • Document Scan (WIP)
      • Display Widgets
        • Chart
        • Chat
        • Circular Gauge
        • Data Grid
        • Linear Gauge
        • Map
        • Media View
        • Progress Bar
        • Sparkline
        • Status Lamp
        • Toast
        • Value Box
        • Kanban Board
        • Data Tiles
        • Pie Chart
        • Sankey
      • Buttons
      • Text Box
      • Images
      • Icons
    • Communication Interfaces
      • Email Notifications
      • OPC UA Server
    • Data & File Storage
      • Internal InfluxDB
      • Internal PostgreSQL
      • File Server
    • App Appearance
      • Pages
      • In-App Navigation
      • Screens & Devices
      • Theming
    • Simulation & Testing
      • Simulating Events
      • Simulating Data
    • PDF Templates
    • RAG-based Chatbot
    • Deployment
  • Manage Apps
    • Overview
    • Manage Apps
      • General Settings
      • Users and Access
      • Distribution & Versioning
    • Manage Integrations
    • Manage Account
      • Account Structure
      • Members
      • Workspaces
  • TUTORIALS
    • Build Your First Heisenware App
  • Connect Heidenhain CNC with OPC UA Support
  • Related links
    • Website
    • Privacy policy
    • Imprint
Powered by GitBook
On this page
  • Creating a template
  • Adding Fields
  • Image variables
  • Filling the template
  • Filling an existing PDF
  1. Build & Deploy Apps

PDF Templates

Last updated 2 months ago

The PDF Template Editor is a powerful tool that allows users to create customizable, fillable PDF templates. With this feature, you can create forms, reports and other structured documents by adding dynamic data fields that can be programmatically populated for any number of app users.

The PDF documents can also be created starting from a user-updated base document. This feature is ideal for digitizing and automating existing forms that require a specific standardized format.

Creating a template

The Template Editor is accessed from the "Template Editing" button on the left of the toolbar.

It will open on the right of the screen in place of the UI Editor.

If there are no templates in the app yet, the editor opens with the template creation dialog, where you can pick a name and format.

Adding Fields

Once the template has at least one page, you can add fields using the Add Text Variable and Add Image Variable buttons in the editor.

Image variables

Filling the template

Once you create a template, a new instance is created as well in the Function panel, under Template > PDF Templates > [Template Name] . This instance contais the Fill Templatefunction.

Filling an existing PDF

Then, add the fields and drag them to the desired location on the form.

The output of the fillTemplate function is a Base64 encoded document.

It's important to note that each output of a fillTemplate function is a separate document isolated for each user, and all fields are completely overwritten when the function runs.

The template is initially empty. You can add a page by clicking on the icon under the template name.

Image variables allow you to add image inputs (for example from a widget or a ) as fields in the template.

After adding at least one page to the template, drag a file from the onto it.

In the example below, the app collects the input data from a and uses it to fill the template. The result is the uploaded document, fully filled with the new user data.

It can be dragged onto a widget to display the most up to date version, or it can be sent as an attachment in an .

You can include multiple different forms, signatures, photos and other documents in a PDF template, but the whole form has to be filled at once. One way to mix different types of input is to load all the data into a table in the database.

âž•
photo
signature
form
Media View
e-mail
Internal PostgreSQL
Media Server
A simple example of a fillTemplate function