5. Definition of positions in the PDF
There is an additional icon (a PDF symbol) in the overview of the created forms. The positions of the entries in the template PDF are defined in the following table. Any number of items can be created.
![]() |
It is possible to generate a completed Test PDF directly in the backend. This allows you to quickly check whether all items are filled in correctly in the form. All published items are output, and the field name is displayed for form fields.
As no input data is available, the conditions are not checked, all fields and all pages are transferred to the test PDF.
![]() |
There are different types of positions:
- Text position - Output of form content, texts and insert tags
- Picture position - Output of image data
- Barcode - Output of a barcode from form content, text, InsertTags
Creating the individual items:
a) Text positions
![]() |
The information to be entered is set in the first section. The following options are available:
- a field name from the form
- a fixed text in quotation marks
- InsertTags must also be set in quotation marks
In the example, these are the form fields lastname and firstname and a fixed text with a comma. These individual definition lines are strung together with spaces (no space before a comma). If the automatic space character is annoying in rare situations, you can switch it off.
A condition can be programmed for the output in the 2nd column. If the condition is empty, the position is always output. In the example, the comma depends on whether the firstname field in the form has been filled in (used). The comma is therefore only output if the firstname has been filled in.
The condition can also be inverted:
used = field filled in / checkbox or radio button selected
empty = field is empty / checkbox or radio button not selected
The fixed texts can also contain insert tags:
![]() |
In this example, "Berlin, 2018-02-04" or only "2018-02-04" entered in the PDF, depending on whether city is specified or not.
To cross check boxes, we use an "X" with the checkbox value in the condition:
![]() |
In the Remarks and notes line, you can save notes on the position, for example for checkboxes or radio buttons where only an "X" is displayed, the option can be described here for the backend view.
In the lower part of the backend form it comes to the position in the PDF where the selected information is entered and the font attributes.
![]() |
The position consists of the PDF page (refers to the page in the template), the horizontal distance from the left margin and the vertical distance from the top margin. Optionally, a right margin can also be entered. This is often useful for form fields of the textarea type, where the line text should wrap. Depending on the font used, there may be a constant shift due to over- and descenders in the font.
A good way to determine the positions is to measure the PDF page in programs such as Photoshop. The offset can be quickly determined in a position test and included in the other positions.
Note: The positions always refer to the basic offset in the form properties
If a position specification begins with + or -, then the position is placed relative to the previous position. For example, the Y position "+5" can be used to set the output to 5 mm below the last output position.
b) Picture position
There are 4 options for integrating images into the PDF:
- Select an image from the file manager
- Take an image from the upload, i.e. from the form
- An image that is contained in the form data as a DataStream (e.g. from the signature extension do-while/contao-signature-formfield-bundle)
- Include an image via the UUID of the file
![]() |
The page, position and size are specified for all image positions. The image is always cropped to the specified dimensions (MODE_CROP = Exact format). It is also possible to specify a condition for inclusion, the image is then only included if the condition is met. For example, images can be integrated to match a selection field.
![]() |
![]() |
![]() |
![]() |
c) Barcode
Include a barcode from your data in the PDF:
![]() |
The following barcode types are available:
(depending on the type, the character set is partially restricted)
2D bar codes
- QR-Code - Low error correction
- QR-Code - Medium error correction
- QR-Code - Better error correction
- QR-Code - Best error correction
- PDF417 (ISO/IEC 15438:2006)
- Datamatrix (ISO/IEC 16022:2006)
1D bar codes
- Code 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9
- Code 39 + Checksum
- Code 39 Extended
- Code 39 Extended + Checksum
- Code 93 – USS-93
- Standard 2 of 5
- Standard 2 of 5 + Checksum
- Interleaved 2 of 5
- Interleaved 2 of 5 + Checksum
- Code 128 AUTO
- Code 128 A
- Code 128 B
- Code 128 C
- EAN 8
- EAN 13
- UPC-A
- UPC-E
- 5-Ziffern UPC-Based Extension
- 2-Ziffern UPC-Based Extension
- MSI
- MSI + Checksum (module 11)
- Codabar
- Code 11
- Pharmacode
- Pharmacode TWO-TRACKS
- IMB - Intelligent Mail Barcode - Onecode – USPS-B-3200
- Postnet
- Planet
- RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)
- KIX (Klant index - Customer index)
As with text items, various form data, texts and insert tags can be linked here. The resulting text is encoded in the barcode. The barcode is normally output in the standard colour; if you want to use a different color, enter it in the Overwrite text color field.
![]() |
Below this, enter the position in the PDF and the size of the barcode. It is also possible to specify a condition for inclusion; the barcode is only included if the condition is met.












No comments to display
No comments to display