Printing Partially Filled-Out Forms
ABBYY FormDesigner can print both blank forms and forms that already contain data in some of the fields. For example, you can print forms with the name fields already filled out so that each form is addressed to a particular individual. The actual names can be taken from a file or from a database. Partially filled-out forms can be printed or saved as a PDF file.
Entering data into partially filled-out forms
- The names of the fields in the file/database must be the same as the names of the fields in the form and the document structure.
- You can use an element's identifier (ID) instead of its name. This can be useful if you need to specify the values of elements that are not represented in the document structure, such as barcode fields.
- A field or a mark from a group can be indicated by an identifier or by its full name, formatted as |.
- Values can be imported from CSV and TXT files encoded in Unicode. The top line in the file is the header and needs to contain the names of the fields. The following characters can be used as separators: comma (,), semicolon (;) and the tab character.
Note.If the list separator is also used as a decimal symbol or a digit grouping symbol in the file, any numbers that use this symbol must be enclosed in quotes. - When adding data to a table, the full name must be specified in the data form, formatted as <Table>|<Col>|<Row#>. <Table> is the name of the table in the form, <Col> is the name of the column in the table, and <Row#> is the name of the cell (numeration begins with 0).
- When partially filled-out forms are printed, data types are converted.
For example, if a form contains a checkmark field which you want to fill in, the corresponding field in the database can have the values True/False, 1/0 and yes/no. - The font of the printed out data will correspond to the font of the tip that is specified in the element properties window (the Tip tab).
Printing partially filled-out forms
To print a form with values from a database:
- From the File menu, select Print Filled-Out Forms...
- In the Select Data Connection dialog box that will open, select an earlier connected database or click Add... to create a new connection.
- Select Database and click the Select... button to specify the database connection parameters.
You can also fill out blank forms with data from a database and print them out from the command line
FormDesigner.exe /printDatabase <path to form .fdd>.
For example:
C:\Program Files (x86)\ABBYY FlexiCapture 12 Stations>FormDesigner.exe /printDatabase D:\$temp\fillData.fdd Database:"connectionString:Provider=MSDASQL.1;Persist Security Info=False;Data Source=Xtreme Sample Database 2003;table:Credit"
To print a form with values from a file:
- From the File menu, select Print Filled-Out Forms...
- In the Select Data Connection dialog box that will open, select an earlier added file or click Add... to add a new file.
- Select File and click Browse... to specify the path to the file.
You can also fill out blank forms with data from a file and print them out from command line FormDesigner.exe /printDatabase <path to form .fdd>.
For example:
C:\Program Files (x86)\ABBYY FlexiCapture 12 Stations>FormDesigner.exe /printDatabase D:\$temp\fillData.fdd File:"D:\$temp\fillData.txt"
Exporting filled-out forms
Use the following command to export a partially filled-out form:
FormDesigner.exe /exportDataBase <path to FDD file> File:<path to file with values> DestinationFolder:<path to destination folder> FormName:<name of output file>.pdf.
Required command arguments:
- Database:"connectionstring: …"
Required when using values from a database. - File:<path to file with values>
Required when using values from a TXT or CSV file. - DestinationFolder:<path to the destination folder>
Important!This path needs to lead to an existing folder. - FormName:<name of output file>.pdf
Optional arguments can be used to describe the button for sending the form:
- EmailButtonText:<name of the button>
- SubmitEmail:<e-mail address>
- UrlButtonText:<name of the button>
- SubmitUrl:<URL of the server>
- ClearButtonText:<name of the button>
- ButtonsPosition:<location of the button> (possible locations: Top (by default), Bottom or TopAndBottom)
Note.Any spaces in button names must be enclosed in quotation marks.
Example of a command that exports a partially filled-out form with values from a database:
C:\Program Files (x86)\ABBYY FlexiCapture 12 Stations>FormDesigner.exe /exportDatabase D:\MyForm.fdd Database:"connectionString:Provider=MSDASQL.1;Persist Security Info=False;Extended Properties=\"DRIVER=SQL Server;SERVER=Serv\SQL2014\";Initial Catalog=FD;table:MyTable" DestinationFolder:D:\Forms FormName:MyPdfForm.pdf
Example of a command that exports a partially filled-out form with values from a file:
C:\Program Files (x86)\ABBYY FlexiCapture 12 Stations>FormDesigner.exe /exportDatabase D:\MyForm.fdd File:D:\fd.txt DestinationFolder:D:\Forms FormName:MyPdfForm.pdf EmailButtonText:Complete SubmitEmail:Mail@abbyy.com ButtonsPosition:TopAndBottom.
The Filter:<FieldName>=<Value1>[,<Value2>[…]] argument filters records in the database. Records can be filtered by field identifiers. Values in this argument must be separated by commas, and a parameter can be specified multiple times for different fields.
Note.Fields that have been filled out in advance cannot be edited.
Note.If the output file was not published, check the command arguments to make sure they were specified correctly.
Automatic checks of commands that print and export partially filled-out forms
When a /printDatabase or /exportDatabase command is executed, the following arguments are automatically checked:
- The path to the FDD file
- The connection string or path to the database or file with values
- The path to the destination folder
- The name of the output file
- Whether the necessary fields are present in the source
When this check is performed, notifications will be logged in the event log (Control Panel → Administrative Tools → Event Viewer). To view the event log in the Event Viewer, you will need to set the EventMessageFile subkey of the [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\ABBYY FormDesigner 12] registry key to C:\Program Files (x86)\ABBYY FlexiCapture 12 Stations\FObjEventSrc.dll. If the command line was started by the administrator, the value will be set automatically.
You can use the LogFile:<filename> command to duplicate argument check notifications in a separate file. To disable logging in the event log, use the /noSystemLog key.
Example of a command that disables logging in the system log and enables logging in a separate file:
FormDesigner.exe /exportDatabase D:\MyForm.fdd File:D:\file.txt DestinationFolder:D:\Forms FormName:MyPdfForm.pdf LogFile:D:\log.txt /noSystemLog
12.04.2024 18:16:02