FormFiller

This plugin makes it possible to fill PDF forms with profile data and profile pictures of members, as well as any text and pictures.

The creation of labels is also possible. A separate configuration is created for each PDF form or label template used.

The PDF forms can be different types of PDF files, e.g. declarations of membership, SEPA direct debit mandates, invitations, serial letters or membership cards.

formfiller_4.0.0.zip - (Admidio 5.0)

Older versions:
formfiller_3.3.1.zip - (Admidio 4.3)
formfiller_3.2.0.zip - (Admidio 4.2)
formfiller_3.1.0.zip - (Admidio 4.1)
formfiller_3.0.3.zip - (Admidio 4.0)
formfiller_2.3.7.zip - (Admidio 3.3)
formfiller_2.2.2.zip - (Admidio 3.2)
formfiller_2.1.2.zip - (Admidio 3.1)
formfiller_2.0.2.zip - (Admidio 3.0)
formfiller_1.0.3.zip - (since Admidio 2.4.4)

Supported by: rmb

Plugin-Version: 4.0.0

Required Admidio-Version: 5.0

Supported databases: MySQL, PostgreSQL

Supported languages: German, English, French

License: GPL 2

  • Unpack the file Formfiller_x.x.x into the folder adm_plugins
  • Log in to Admidio
  • Installing a plugin version < 4.0.0
    • Create a menu item for FormFiller via the Admidio module menu with the following URL:
      /adm_plugins/formfiller/formfiller.php
    • The installation routine is executed the first time the plugin is started.
  • Installing a plugin version >= 4.0.0
    • To install, run the following PHP file:
      <your-admidio-page>/adm_plugins/FormFiller/system/install.php
  • Update from plugin version 3.x to plugin version 3.y
    • Replace all files in the existing plugin folder with the files of the new version.
  • Update from plugin version 3.x to plugin version >= 4.0.0
    • Delete the existing menu item via the Adminidio module menu
    • To install, run the following PHP file:
      <your-admidio-site>/adm_plugins/FormFiller/system/install.php

FormFiller creates PDF documents containing member profile data, as well as any text or images. Members can be selected by name or from a predefined “Custom List”. FormFiller distinguishes between form printing (fixed XY coordinates) and label printing (relative XY coordinates).

Definition of the term "form printing"

Form printing in the sense of FormFiller means that a PDF form is filled using absolute XY coordinates. The X and Y values define the horizontal and vertical position in millimeters relative to the top left corner of the PDF form.

Example:

In the example above, the member's first name is written 60 millimeters to the right and 80 millimeters downwards, measured from the top left corner of the form. The last name is written 100 millimeters to the right and 80 millimeters downwards, also measured from the top left corner of the form.

→ Last name and first name are on the same line (80 mm)
→ First name (at 60mm) comes before last name (at 100mm)

Further information on this topic can be found in the “Configurations” section of this documentation.

Definition of the term "label printing"

Label printing using FormFiller means that the smallest X-coordinate of a line determines the start of the print. All other X-coordinates of a line are used solely for sorting.

Example:

Using form printing, the printed image would look like this: (always referring to the top left corner of the form)

  • Gender (title) at position 20, 30 (20 millimeters to the right and 30 millimeters down)
  • First name at position 25, 30 (25 millimeters to the right and 30 millimeters down)
  • Last name at position 26.30 (26 millimeters to the right and 30 millimeters down)

→ The surname would begin one millimeter to the right of the first name and almost completely overwrite it.

However, if label printing is enabled, the printed image will look like this:

  • Gender First Name Last Name (each separated by a space)

→ The smallest X-coordinate in the example is 20, meaning the gender (= salutation) determines the start of the print at position 20,30 (20 millimeters to the right and 30 millimeters down, relative to the top left corner of the form). First name and last name are appended, each separated by a space.

Further information on this topic can be found in the “Configurations” section of this documentation.

The Main Menu

To populate a PDF document, a data source and a form configuration must be selected in the main menu. Specifying a PDF file is optional.

The data source can be either a list configuration in conjunction with a role or individual users. In the list configuration, only conditions specified for a field are evaluated. Fields without conditions are ignored.

The form configuration defines the various parameters for printing, including the XY coordinates of the profile fields to be printed, font size, font color, relationships, and the distinction between form and label printing.

If no PDF file has been defined in a form configuration, a PDF document to be filled in can be selected via “PDF file (optional)”.

The Preferences menu can be accessed via the button of the same name, which is only visible to administrators.

Any number of form configurations can be created via the editing function. After a new installation, three sample configurations are pre-configured and populated with default values:

  • Sample form
  • Envelope DL
  • Address labels

Name

The “Name” field is mandatory and must always be filled in.

Font type, font style, font size and font color

The font attributes set here (type, style, size and color) apply to all profile fields of the same configuration.

PDF form alignment, PDF form size, PDF form unit

Parameters for the PDF file to be created.

PDF file

A PDF form can be selected via the PDF file and assigned to this configuration.

Important note: PDF forms must not exceed PDF version 1.4. If an error message appears… “This document (….pdf) probably uses a compression technique which is not supported by the free parser shipped with FPDI.”, then the PDF form was created in a higher version and with specific techniques that FormFiller cannot process.

In order for FormFiller to access PDF forms, these must first be uploaded to the Admidio download area. (Note: The selection for a PDF file will only be displayed on the screen once at least one file has been uploaded to the download area.) If no PDF form is selected for a configuration, FormFiller automatically creates a blank document based on the specified PDF form orientation, size, and unit (the default is portrait, A4, and millimeters).

Labels

To print labels, the following information is required in the Labels field: number of columns, column spacing, number of rows, row spacing.

Example:

The label printing would look like this:

  • 3 labels side by side (3 columns), spaced 70 mm apart (column spacing)
  • 7 labels one below the other (7 lines), spaced 25 mm apart (line spacing)

If the Labels field is populated, FormFiller interprets the XY position data as follows: First, FormFiller sorts all profile fields according to the position data by row (Y-coordinate) and column (X-coordinate). Then, the smallest X-coordinate in a row is determined. This smallest X-coordinate defines the start of the print run. All other X-coordinates in the same row are used solely for sorting purposes.

Example:

The smallest X-coordinate for line 30 in the example above is 20, i.e., the printing start of line 30 is at position 20,30.

The profile fields are printed as follows:\ Title First Name Last Name

Note: To write a single address label into a PDF document (e.g., a mail merge with invitations, where each invitation should have the member's address), the following values must be entered in the Labels field: 1,0,1,0.

Relationship

In addition to the profile data of a member, the profile data of a relationship can also be read (Note: Profile fields of a relationship are only available in the field selection after the form configuration has been saved, closed and reopened).

In the following example, the relationship “spouse/partner” is selected and the partner's profile data is available in the configuration.

In the main menu, the member and their spouse are selected as users.

The result of label printing could look like this:

It is also possible to print a postage stamp for Dialogpost (diagram mail).

Field Selection

Any number of profile fields can be added to a configuration via field selection.

To write the data of a profile field into a PDF document, at least one X and one Y coordinate must be specified. The X and Y values define the horizontal and vertical position in millimeters, relative to the top left corner of a form.

To highlight individual profile fields, additional instructions can be specified alongside the X and Y coordinates. Multiple additional instructions should be separated by semicolons.

The various parameters for the additional instructions:

Parameter Meaning Validity derived from Example Note
F Font (F)ont F=Arial Possible values: Courier or Arial or Times or Symbol or ZapfDingbats
A Font style (A) attribute A=B Possible values: B (bold) or I (italic) or U (underline), multiple combinations are possible
S Font size (S)ize S=16 Font size in points
C Font color (C)olor C=0,0,255 Font color as RGB value (Red-Green-Blue)
O Alignment No function when using parameters for a line break (O)rientation O=C Possible values: C (=centered) or R (=right-aligned)
T Text only for option/dropdown fields (e.g., gender) (T)ext T=Mr,Mrs
{ Pretext {=Hello
} Posttext }=,
D Date only with additional field Date (D)ate D=dmy Format parameter of the date() function
V any text only with additional field Text (V)alue V=Note
L Image only with additional field profile photo (L)ogo L=PIC1234.jpg
LW Line width only for additional field Line or Rectangle (L)ine(W)idth LW=0.5
DC Character color only for additional fields Line or Rectangle (D)raw(C)olor DC=255,0,0 Character color as RGB value (Red-Green-Blue)
FC Fill color only for additional field Rectangle (F)ill(C)olor FC=0,100,100 Fill color as RGB value (Red-Green-Blue)
RS Rectangle style only for additional field Rectangle (R)ectangle(S)tyle RS=D Possible values: D (draw, with border) or F (fill, filled) or DF (draw and fill, filled with border)
P Print on page… (P)age P=2 Note: If the parameter P is used for a page that does not exist, the field will not be printed
K KeyManager profile field only for additional field Text (K)eyManager K=KEYNAME The KeyManager plugin (key manager) does not have its own print routine. FormFiller provides an interface for creating key transfer documents via the parameter K.
OI Index for pressure (O)rder(I)ndex OI=4
OW Line spacing in mm (O)rder(W)idth OW=10
WL Word length for all texts (W)ordwrap(L)ength WL=35 Used at line breaks
CL character length for all texts (C)characterwrap(L)ength CL=25 used for line breaks
WW Line spacing only in conjunction with WL or CL (W)ordwrap(W)idth WW=10 Default setting: 5
WM max. number of lines only in conjunction with WL or CL (W)ordwrap(M)ax WM=3 Default setting: 1

Use and effect of the print parameter “P” for single- and multi-page PDF files:

FormFiller configuration contains print parameters for a single page (the parameter P=x is not used) FormFiller configuration contains print parameters for more than one page (the parameter P=x is used)
No PDF file is selected to write the data to. The output file contains x pages corresponding to the number of addresses. Each page uses a blank DIN A4 page as the background. A member's data is split across multiple pages according to parameter P. Each page uses a blank DIN A4 page as the background.
The PDF file to be processed consists of one page or multiple pages (e.g., an invitation in DIN A4 format or many postcards with online stamps). The output file contains x pages corresponding to the number of addresses. The selected PDF file serves as the background. The data of the first member is printed on the first page of the PDF file. The data of the second member is printed on the second page of the PDF file, and so on. Once all pages of the PDF file are printed, the process starts again with the first page. Example: The data of 4 members are to be printed in a two-page PDF file. The data of the first member is printed on the first page of the PDF file. The data of the second member is printed on the second page of the PDF file. Then the process starts again with the first page. The data of the 3rd member is printed again on page 1, and the data of the 4th member is printed again on page 2. The data of a member is split across multiple pages according to the parameter P. The selected PDF file serves as the background. Example: The data of 3 members are to be printed in A two-page PDF file is printed. Parameters P=1 and P=2 are used. Result: The data of the first member is printed on pages 1 and 2 according to the P parameters. For the second member, printing starts again on page 1. The data is printed on pages 1 and 2 according to the P parameters. The same applies to the third member.

Examples:

Profile field Position and additional instructions Meaning
Last name 10,20 Last name in position 10,20
First name 10,40;S=7;F=Arial First name at position 10,40 with Arial font in 7pt
Address 40,20;C=255,102,255;A=BU Address at position 40,20 with pink font, underlined and in bold
Gender 40,20,60,20;T=Mr,Mrs Depending on gender, the text “Mr” is written at position 40,20 or the text “Mrs” at position 60,20

Special feature: Gender profile field

To indicate a member's gender in forms or to write “Mr.” or “Mrs.” on labels, there is a different syntax for the gender profile field.

Syntax:
X1,Y1,X2,Y2; T=<Text for male>,<Text for female> (The “text for male” is output at position X1,Y1, the “text for female” at position X2,Y2.)

or

X,Y; T=<Text for male>,<Text for female> (Both the “Text for male” and the “Text for female” are output at positions X,Y.)

Examples:

Case 1:
The following fields are present in a form:

  • The rectangle of male is located at coordinates 60,50
  • The rectangle of the female is located at coordinate 80,50

Depending on gender, male or female should be marked with an X.

Syntax:
60,50,80,50;T=X,X

Result:
If the member is male, an X is written at position 60, 50; if the member is female, an X is written at position 80, 50.

Case 2:
For labels, the text “Mr.” or “Mrs.” should be written at position 70,40, depending on gender.

Syntax:
70,40,70,40;T=Mr.,Mrs. (In this case, the following shortened notation would also be possible: 70,40;T=Mr.,Mrs.)

Result:
If the member is male, the text “Herr” is written at position 70,40; if the member is female, the text “Frau” is written at the same position.

The additional fields Date, Profile Photo, Text, Line and Rectangle

In addition to the profile fields, the current date, the member's profile picture (if available), an image from the Admidio download area, any text, a line or even a rectangle can be inserted into the PDF document.

Field Position and additional instructions Meaning
Date 10.20 Current date at position 10.20
Date 10,40;D=d. FY Current date in the format <day>. <month> <year> (=format parameter of the date() function) at position 10,40, e.g. November 12, 2017
Date 17,20;F=Arial;S=12 Current date at position 17,20 in Arial 12 pt
Profile photo 40,20 The member's profile photo (if available) will be inserted at position 40,20 with 72 dpi.
Profile photo 40,20,30 The member's profile photo will be inserted at position 40,20 with a width of 30 mm, maintaining the aspect ratio.
Profile photo 40,20,0,50 The member's profile photo will be inserted at position 40,20 with a height of 50 mm, maintaining the aspect ratio.
Profile photo 40,20,30,50;L=image.jpg The photo image.jpg from the Admidio download area will be inserted at position 40,20, if available, with a width of 30 mm and a height of 50 mm.
Text 10,20;V=Note The text “Note” is inserted at position 10, 20
Line 20,40,60,80;LW=0.5 Line from position 20,40 to position 60,80 in line width 0.5 mm
Rectangle 60,70,20,40;LW=2;RS=FD;DC=255,0,0;FC=0,255,255 Rectangle at position 60,70 with width 20 and height 40, filled frame with frame width 2 mm, frame color 255,0,0 and fill color 0,255,255

Supported image formats:

  • JPEG (Joint Photographic Experts Group)
  • PNG (Portable Network Graphics)
  • GIF (Graphics Interchange Format)

Dynamic Fields

For dynamic fields (e.g. role memberships), the X and Y coordinates specify the position of the first line of the printout.

All subsequent lines are added dynamically (depending on the number of roles within a role membership). The line spacing in millimeters can be defined using the parameter OW=x (e.g., OW=10). The default setting is 5 mm.

If further fields (profile fields, text, other dynamic fields) are to be printed after a dynamic field, the parameter OI=x (e.g., OI=1) must be used. OI=x defines the order of the rows. The X/Y coordinates of the field with the smallest OI value (e.g., OI=1) determine the starting point of the entire list.

Example:

Text 20,120;………;OI=1;………OW=10
Line ……………….;OI=2;………;OW=8
Role Memberships ……….;OI=3;………….;OW=7
Last Name …………………….;OI=5;……………
First name ………………..;OI=4;………………

In the example above, printing begins at position 20,120 with text. A line is drawn at position 20,130. The list of role memberships begins at position 20,138. Each role is printed 7 mm below the previous one. After all roles, the first name is printed first, followed by the last name.

A sample configuration “Personalbogen.cfg” with the parameters OI and OW is available here on GitHub under Release 2.3.3).

Notice: The parameter OI=x can only be used with fields containing absolute coordinates (e.g., text at position X/Y or a line from position X/Y to position X2/Y2). OI=x does not work with rectangles or images, as X2 and Y2 are relative values for these.

Line break

Line breaks are available specifically for long texts. Using the parameters WL, CL, WW, and WM, it is possible to split a text into individual segments and output them one below the other.

  • WL = Word length
  • CL = character length
  • WW = Line spacing (default: 5)
  • WM = max. number of rows (default: 1).

Example 1:

→ …;WL=15;WW=5;WM=3
→ A line break occurs after a maximum of 15 characters, without splitting individual words. The line spacing is 5 mm and a maximum of 3 lines are displayed.

Neuhofen a.d. Krems
becomes
Neuhofen a.d
Krems

Example 2:

→ …;CL=13;WW=5;WM=3
→ A line break occurs after 13 characters. The line spacing is 5 mm and a maximum of 3 lines are displayed.

This is a sample text
becomes
This is a sam
ple text

Here, configurations can be sorted alphabetically and by XY coordinates.

Configurations can be both exported and imported via export/import. (Example configurations are available at https://github.com/rmbinder/FormFiller/releases).

Information about the version and status of the plugin is displayed here.

The options menu allows you to configure settings for displaying the created PDF documents and to uninstall the program.

Max. PDF display

Max. PDF display is the maximum number of pages a PDF document (when creating multiple documents) can have and still be displayed on the screen. If the number of pages exceeds this, the file will be offered for download immediately.

Additional PDF Sizes

In addition to the standard sizes A3, A4, etc., you can specify additional sizes for the PDF document to be generated. Separate multiple sizes with semicolons (e.g., 160×100; 120×60).

Uninstalling the plugin will delete all configuration data created by it.

In addition to the “Administrator” role, other roles can be authorized to access the “Settings” module.

Saving the configuration

All configuration data is stored in a table named adm_plugin_preferences in the Admidio database. If this table does not exist, it will be created.

The table entries of the FormFiller plugin all begin with the letters “PFF”.

Examples

Below are some examples of PDF forms populated with FormFiller:

Sample membership application: The completed membership application:
Sample membership card: The membership card filled with data:
Sample SEPA Direct Debit Mandate: The SEPA Direct Debit Mandate filled with data:
  • en/plugins/formfiller.txt
  • Last modified: 2025/11/17 15:52
  • by rmb