std:generate:fill_fields transform step

This file transform step fills in fields in PDF and word processing documents. The information property on the FileTransformResult is used to return information about which fields were filled.

NOTE: This transform is implemented by an optional platform component, and may not be available in your installation.

Creating input documents

Text form fields are filled in when filling a PDF file.

MERGEFIELD fields are filled in when filling a word processing document. A definition should look like "MERGEFIELD FieldName" where FieldName is the name which should be used in the fields property.

Using Microsoft Word

To use Word to insert MERGEFIELD fields into a document without going through the whole mailmerge setup, you need to do a little preparation.

  • In Window title, click down arrow (Customise Quick Access Toolbar)
  • Menu: More commands…
  • Choose commands from: All commands
  • Select: Insert a Field…
  • Click [ > ] button
  • Click Save

Then, to add a MERGEFIELD:

  • Click the new button in the window title
  • Categories: Mail Merge
  • Field names: MergeField
  • Fill in box so it says: MERGEFIELD Something, where Something is the name of the field
  • Click OK

Information in result

The information property in the FileTransformResult will contain a "std:generate:fill_fields" property. This is an array of objects, one per fill fields transform step.

Each of these objects contains an "filled" property, an array of field names that were filled in, and an "unfilled" property, of those where a value was not specified in the fields property of the specification. If fields are repeated in the input file, these arrays will contain multiple entries for that field.

For example:

  "std:generate:fill_fields": [
      "filled": ["Field 1", "Field Two", "Field 1"],
      "unfilled": ["Three"]

Transform specification

property input

Name of the input file. Optional, defaults to "input".

property output

Name of the output file. Optional, defaults to "output".

property mimeType

MIME type of the output file. Optional, defaults to the MIME type of the input file.

This transform step can convert between different formats of word processing documents, and word processing documents to PDF.

property fields

A dictionary of field name to field value, both of which must be strings.