Print Template
Overview
Print Template is a visual static page editor that can quickly display data types such as contracts and invoices through the combination of controls. Combined with the browser's printing function, it can implement the print template function. Print templates can also be used for data statistics reports, where report data is calculated through automation programs and rendered in combination with print templates.
Typical Usage Scenarios
- Delivery Inspection Sheet Printing: The print template module can be used to design delivery inspection sheets, filling in supplier information, product details, quantities, batch numbers, and inspection results through automation programs. It handles different delivery order details through a flow layout, generates standard inspection sheets based on each delivery situation, and supports instant printing with QR codes or barcodes for quick processing and recording by warehouse and quality inspection departments.
- Contract Generation and Printing: Enterprises can design standardized contract templates through the print template module, dynamically fill in customer information, contract terms, etc., generate personalized contracts, and print them directly through browser functions, simplifying the contract generation and signing process.
- Business Card and ID Card Printing: Suitable for fixed layout scenarios, such as employee business cards or ID cards. After the template is designed, employee information can be imported in batches, quickly generated and printed. The fixed layout ensures consistent formatting for each business card, facilitating uniform production.
Functional Boundaries
Due to being based on browser printing, only PDF documents can be saved or printed directly. For scenarios requiring saving files in other formats, print templates are not applicable. If contract printing requires generating Word documents, please use the script informat.word.createWithTemplate to generate contract files based on templates.
Page Settings
| Setting Item | Description |
|---|---|
| Page Name | Name of the page |
| Layout Method | Fixed Layout Flow Layout |
| Page Description | Description information of the page |
| Page Size | Size of the page |
| Page Orientation | Page arrangement direction Portrait Landscape |
| Padding | Size of the blank area between page content and page edge |
Layout Method
A display page where the position of elements in the page is fixed and the size is fixed, such as employee ID cards, business cards, etc.
For pages like contracts and bills, the length of the detail list on the page is not fixed. In this case, flow layout needs to be used to implement it.
In short, fixed layout is like PPT, and flow layout is like Word.
Note
After creating a print template, the layout method cannot be modified.
Data
The content rendered on the page can be dynamic, and the content can be obtained by calling automation programs. The data displayed on the page needs to be specified in advance during design, and the data can be of string or object type. After setting the data format, it can be referenced in the component configuration expressions.
Components
| Component | Description |
|---|---|
| Text | Display a paragraph of text |
| Image | Display an image |
| Rich Text | Display a paragraph of formatted text |
| Markdown | Display a paragraph of formatted text using markdown language |
| QR Code | Display a QR code |
| Barcode | Display a barcode |
| Button | Display a button |
| Table | Display a table |
| Page Break | Display a page break to assist in page breaking during printing. Unique to flow layout |
Precautions
- After the component enables the loop setting, the design interface will not execute rendering; it needs to be rendered through preview or real calling
- When using the rich text component, attention should be paid to avoiding implementing the entire page through a single rich text component to avoid page breaking issues in print output
- When using tables in the rich text component, row height can be adjusted through the right-click menu
Row>Row Propertiesin the rich text to adjust the custom row height
Show When Condition Met
If you want components to be hidden in certain states, you can use expressions as judgment conditions for hiding. The component will not be displayed when the expression evaluates to true.
Loop
If you want to render multiple components of the same type, such as the purchase details of an order, where each line is a text component, and the data itemList is an array-type object. Then you can use the loop function to render a separate text component for each element in itemList.
Dynamic Display of Rich Text Bound Variables
For content related to rich text settings, please refer to Rich Text

