Convert to PDF with merge templates

The PDF converter settings allow you to set up templates that can convert documents to a PDF and, optionally, append workflow information such as the sign off sheet, approver names, approval date, workflow name, metadata, and so on, after a particular workflow activity has been completed. The following document types can be converted to PDF: docx, doc, dot, docm, dotx, dotm, html, rtf, txt, and pdf. 

If appending workflow information to the end of the converted PDF document, merge templates are used to define the appended information. One or many templates can be configured, depending on the type of information that is required to be a part of the approved document. Note that for “not approved” or “approval postponed” documents, template information is not appended.

When the system converts a document to a PDF during the workflow process, a new version of the document is added to the library.

Information can be appended to electronic documents, electronic records, and offline documents. The offline document is converted to an electronic document format and the appended workflow information becomes the document content.

These templates are created in Microsoft Word and saved in the FileHold library. Once in the FileHold library, a saved search is configured that points to the list of templates. In the PDF converter settings, the saved search name, the opening and closing delimiters, and field delimiter is defined. When the template document is being added, it is checked for headers and or footers.

  • If a header or footer is not present in the template, the source document (docx only) will be checked for the corresponding header or footer.
  • If a header or footer is found in the source document (docx only), it will be used to replace the empty header or footer in the template.

When setting up workfow templates, the PDF converter template is applied along with other settings. See the following steps that are required to set up PDF converter templates:

  1. Create the PDF merge templates in Microsoft Word. Save as Microsoft Word docx files. Sample templates can be downloaded from the bottom of this page.
  2. Create a schema for the PDF converter templates in FileHold.
  3. Add PDF merge templates to the FileHold library.
  4. Create a public saved search for the PDF converter templates.
  5. Configure the PDF converter settings in Library configuration > Settings > Workflow.
  6. Create workflow templates and configure options to convert to PDF.
  7. Initiate workflows.

Appending workflow information to a document using a PDF converter template is entirely optional. If you want to convert the document to a PDF and append no information during a workflow process, then no PDF converter templates are required.

Only main workflow documents will be converted to PDF. Supporting documents remain in their native format.

If choosing to append workflow information to the end of main documents, a number of options are available for configuration. PDF encryption enables you to securely protect the content of your PDF file from unwanted viewers and against unwanted actions like printing, selecting text, etc. A PDF digital signature enables you to authenticate a document to establish that the sender of the document is who they say they are and the content of the document has not been tampered with.

If a document is converted to a PDF during the workflow process, a global option, “Convert2PdfApproveBothDocumentVersions”, in the web config file in C:\Program Files\FileHold Systems\Application Server\LibraryManager can be configured to allow the option of recording both the source document and the newly created PDF as approved. If this option is not enabled, the new created PDF document is the only document shown as approved. If it is enabled, the source document is also be marked as approved and both documents are linked to the signoff sheet and workflow history.

Configure the PDF converter settings

These settings are only required to be filled out if you are using PDF converter templates. If you don't want to append workflow information to the end of a document, then these settings can be ignored.

To set converter settings

  1. In the Administration Panel, go to Library Configuration > Settings > Workflow.
  2. In the PDF Converter settings area, set the following options:



Choose the list of workflow merge templates

Select the public saved search template name for the PDF converter templates. See the End User Guide for more information on creating saved searches.  

Set the workflow merge template opening tag delimiter

Enter the opening tag delimiter for the PDF converter template. By default, this is [[ (left square brackets).

Set the workflow merge template closing tag delimiter

Enter the closing tag delimiter for the PDF converter template. By default, this is ]] (right square brackets).

Set the workflow merge template tag field delimiter

Enter the field delimiter. By default, this is | (pipe character);

  1. Click Update.

Setting the PDF Options in a Workflow Template

When creating a workflow template, the converter settings can be customized for each workflow template.

To set the PDF options

  1. Create or modify a workflow template and select the Convert main documents to PDF check box.
  2. Use the following table to fill out the following information:


Default value


Append page(s) from template


Select the workflow template name from the list. The list of converter templates come from the saved search defined in the workflow settings. See the System Administration Guide for more information on the workflow settings.

If this value is set to none in workflow settings, the template designer will not be able to choose a merge template. Regardless of the contents of the saved search definition, only DOCX files will appear in the list.

Digital signature


A PDF digital signature enables you to authenticate a document to establish that the sender of the document is who they say they are and the content of the document has not been tampered with.

If true, the document will be packaged in a digital signature envelope.

Digital signature certificate

First certificate in alphabetical order

The list of certificates as stored on the server in a predetermined certificate store. This field is only enabled if digital signature is true.

The specific certificate store is defined in "C2PDFCertificateStore" in the web.config file in C:\Program Files\FileHold Systems\Application Server\LibraryManager.

This field cannot be blank if digital signature is true.

Allow printing


Allows printing.

Allow high resolution printing


Allows high resolution printing.

Allow changing the document


Allows changing the document.

Allow content copying


Allows copying the content.

All content accessibility enabled


Allow accessibility software to use the document contents.

Allow document assembly


If this is disabled, inserting, deleting or rotating pages, or thumbnails is prohibited.

Permissions password

Automatically generated

Specifies the password for opening the encrypted PDF document without any access restrictions.

This field will be automatically generated if one or more of the permissions is false. The user can enter their own password to replace the automatically generated one.

Generated PDF documents will be encrypted if any of the following conditions are satisfied:

  • Permissions is different than All.
  • Permissions Password is not null or Empty.
  • Open Password is not null or Empty.

Both Permissions Password and Open Password are optional but with the following consequences:

  • If Permissions is different than All and Permissions Password is not specified, component will generate random Permissions Password.
  • Using Permissions Password, also known as owner password, without Open Password is not secure. It relies on PDF viewer software to respect specified restrictions, but it may choose not to do so.
  • Using Open Password, also known as user password, is potentially very secure. It or Permissions Password is required for decrypting and viewing the document.
  • When Open Password is specified, PDF viewer application will prompt for password to decrypt and present the document. If entered password is Open Password, document will be decrypted and presented with specified Permissions enforced. Otherwise, if entered password is Permissions Password, document will be decrypted and presented without any restrictions.

Open Password and Permissions Password cannot be equal, otherwise exception is thrown.

Open password


Specifies the password required for opening the encrypted PDF document.

See Permissions password rules for more information.

  1. Click OK.

Creating PDF merge templates

PDF merge templates are created in Microsoft Word and saved in the FileHold library as docx files. When merge templates are used with the Assemble feature, additional file formats can be used for the merge templates such as text, html, and other rich document format files.

The tags will be delimited from static text in the template by unique character sequences that can be globally reconfigured as needed. By default, the opening delimiter will be “[[“. The closing delimiter will be “]]”. Tags include multiple delimited fields. By default, the field delimiter will be a pipe “|”. The defaults can be adjusted in workflow settings.

Each tag follow the format matching the following description:


For example, [[sys|approval-date]].

In the format description, angle brackets <> enclosed mandatory components and square brackets [] enclose optional components and the vertical bar (pipe) | means one-value-or-the-other.

  • <od> is the opening delimiter, [[ by default,
  • <cd> is the closing delimiter, ]] by default,
  • <fd> is a tag field delimiter, | by default,
  • <type> is one of “md” or “sys” (metadata or system field),
  • <function> means a field value modification function,
  • <parameter-list> is a comma separated list of parameters for controlling the field value modification function,
  • for tags of type md, <name> is a metadata field name,
  • where tags are of type sys, <name> is one of the fields in the table below,
  • <format> is optional to specify standard dot net formatting codes for numeric and date fields or for the signoff-sheet formatting codes listed below and
  • <null-replacement> is simply optional text that will be used in the event the field is not defined in the context where it is being used. For example, a metadata field tag where the metadata field does not exist in the document schema for the document being converted or assembled.

With the Assemble feature is is possible to apply a single merge template where two or more documents are combined into one. In this case the various system and metadata fields will be combined as follows:

  • Identical values will be merged to one. 
  • Different values will be listed with a comma and space separating each value.
  • Empty values will match any value. All values must be empty in order to give the empty response.

The full list of standard or custom dot net format strings for numeric, date, and time values are available from Microsoft.





This tag is output as a simple table similar to the signoff sheet available in the FDA or web client, it also offers a vertical format table, and a limited information list format.

The horizontal and vertical formats will include the following document information: “Signer name”, “Approval date”, On behalf of”, “Document name”, and “Workflow name”.

There are three formats codes for each of the different signoff sheet formats and one modifier. The format codes and modifier must be specified according to the following pattern: <formatcode>[,<modifier-list>].

  • horizontal – similar to the standard signoff sheet displayed in the client application.
  • vertical – a vertically oriented version of the signoff sheet in the client application.
  • list – a list of approvers. Each item in the list includes the approver name, approver title from the contact information, and the approval date and time displayed in the regional format. Each approval is separated from the one before by a blank line. If the title field is blank, no title line is output.
  • all – When this modifier is included, the signoff sheet should include all workflows for the document version instead of just the current one.

The following is an example signoff sheet field with the horizontal format and showing all workflows.


Shows the approvers in a list format along with titles and time of approval:



The date and time the document version was given the approved status. Not approved, pending approval, and not submitted for approval status document have no approval date.

An approval date in RFC1123 format with the option to use the merge template with the Assemble feature and show "No approval" in the event the document has no approval date.

[[sys|approval-date|R|No approval]]


The name of the workflow. The workflow could have been manually named or automatically named through a naming pattern.



Name of the workflow template.



The internal document id.

The internal document id formatted as a 7 digit number with leading zeros.



User visible automatic document version number. Note that this is the version number of the source document. When the converted document is added, it will have a different version number.

To match the FileHold id listed on the version properties:



The version control number.



The document control number.



The name of the user who initiated the workflow.



The name of the user who is the owner of the document.

document-name The file name of the document. [[sys|document-name]]

A field value modification function that can add a relative number of dates, months, or years to a date field. Negative numbers can also be used to produce dates back in time. Both system and metadata field dates can be used. This function does not change the actual value in the system, it only changes how it is replaced in the template.

The general format of the function: ​DateOffset(<fieldname>,<yearoffset>,<monthoffset>,<dayoffset>)

Where <fieldname> is a date field, <yearoffset> is the number of years to add to the date, <monthoffset> is the number of months to add, and <dayoffset> is the number of days to add.

Users want to see the renewal date of a contract start 12 months after the  contract start date.

[[md|DateOffset(Contract start,0,12,0)|MMM-dd-yyyy]]


The date and time when the tag value is expanded.

Show the current year.



The user’s full name.



The user’s login user name.



The user’s internal id from the user role manager. [[sys|internal-id]]
metadata field name

Metadata field value.

Ensure that the spelling and capitalization is exactly the same in both the metadata field definition and the Microsoft Word template.


Template Examples

The following PDF converter Word templates (.docx) can be downloaded and modified to suit your needs.