Page tree
Skip to end of metadata
Go to start of metadata

Document Actions

This topic describes the available actions for managing documents.

OCR Action

Optical Character Recognition (OCR) takes a PDF file from an attached file field, performs OCR on it, and creates a readable PDF that can be added to an attached file field. This creates a layer of readable text within the PDF that can be searched for keywords, and copy/pasted into another document.  

The OCR action type allows users to choose select the most suitable way to perform optical character recognition (OCR) on attached files within the system. OCR Actions are prefixed with O: in the list of available actions.

To create an OCR action...

  1. In the Action window, click Create OCR Action to open the Action configuration screen.

  2. From the Source drop-down, choose from the available file fields in the current table.'
  3. Under Store OCR'd file(s), choose how to store the OCR-converted files:
    1. In the original field: Adds the converted file into the same field as the original.
      Replace original files: Replaces the original file with the converted one.
      Append OCR files: Appends the converted file to the field, while keeping the original.
    2. In File field: Selecting a file field from the drop-down list will save the converted file into that field.
      Overwrite/Update existing files: Replaces the original file in the selected file field with the converted file.
      Append OCR file(s): Appends the converted file to the selected field, while keeping the original.
  4. The Append to file name field allows you to define the wording that will be appended to the file name of the converted file. This may include field variables such as $id.
  5. Click Finish to save the action.

Convert Document Format Action

The Convert Document Format action can either take an MS Word document and convert it to a PDF, or take a PDF and convert it to MS Word format. The system can use either a built-in PDF converter, or Hosted MS Word Service to convert the document to PDF or to Word. For more information, see Microsoft Word Services Integration.

Conversion from PDF to Word uses the Aspose library API for the conversion by default, or you can use the Word Services Integration API to do the conversion. 

PDF to Word conversion uses a best effort approach, and cannot be guaranteed to be 100% accurate, particularly for complex PDF files. This is true whether you use Aspose or Microsoft services.

To create a Convert Document Format action...

  1. In the Action window, click Create Convert Document Format Action.
  2. Enter an Action Name and Description.
  3. For Document Conversion Type, choose whether to Convert MS Word to PDF or Convert PDF to MS Word.
    1. Source File: Choose which file field holds the source file
    2. Destination File: choose which file field will hold the converted file, and whether to append or overwrite any files.
  4. If your Word Services have been configured, select the "Use Hosted MS Word Service to convert documents" checkbox. 

  5. Click Finish to save the action.

Merge Documents Action

The Merge Documents action allows you to merge multiple Microsoft Word or PDF files into one file, and convert Word files to PDF. This action takes the existing documents in an attached file field and combines them into one output file, depending on the configuration settings chosen by the user. Other file types such as images or .xlsx files are skipped. 

The Merge Documents Action wizard consists of the following tabs:


Add a name and description for the action.

Data Source

  • Select the source field to use for the merge action. The source can be a file field, a linked file field from another table, or a file field in a related table. 
  • Choose whether to save the document in another file field or open it in the browser window.
  • Set a formula to create a name for the file.


  • Output Format - Select whether to output the merged file as PDF or Word (.docx) format. Note that if the option chosen is 'MS Word (.docx)', the 'Merge or Convert First' section will not appear, as this deals with how to manage Word to PDF conversion. 
  • Page Breaks - Decide how to manage page breaks in places where two documents are merged. The documents can either be merged seamlessly without page breaks, or can insert a page break between each document. Page breaks can be managed while merging multiple Word documents into a single Word document, or while merging Word files into a single document and then converting into PDF. 
  • Merge or Convert First - Choose whether to include or ignore Word files during the merge. If Word files are included, you can also choose whether to merge the Word files consecutively before performing the conversion, or individually converting each Word file before merging as a PDF.

    Choosing to merge consecutive Word files will give the appearance of a single document by numbering the pages across documents consecutively, and will take the first document's style definitions and header and footer for all the following documents.

    If a Merge Documents action contains a mixture of Word and PDF documents, the consecutive Word documents may be interrupted by PDF files, and if any Word files come after the PDF, they will take the next Word file as the first of its sequence. 

  • Choose an option for PDF conversion - Word to PDF conversion requires Hosted Microsoft Word API functionality to work; choose whether the conversion should use the current server, or a remote server. For more information, see: Microsoft Word Services Integration


If you want to create a single PDF from a group of five Word documents from a file field, such that the final merged output will have consecutive page numbers and appear as a single consistent document:


  • Word API Hosted Services must be set up correctly in the knowledgebase.


In the Merge Documents Action wizard...

  1. In the General tab, add a name and description for the action.
  2. In the Data Source tab, select the local file with versioning field with multiple files enabled to use as the source.

    1. Choose where to open or store the file output, and set a name for the document using the formula field.
  3. In the Options tab...
    1. Set the format of the merged document as "PDF".
    2. Choose to concatenate the documents without inserting any page breaks.
    3. Select the option to include MS Word files during the merge, and to merge consecutive MS Word documents before converting to PDF format.
    4. Choose to use MS Word Services installed on this Agiloft server.
  4. Save the action in an action button and place it on the layout. When the action is run on the attached file field with multiple Word files, the resulting file will be a merged PDF output.

Print Action

Print formats can be used to generate a PDF or Word document from a print template and attach it automatically to a record. See Print Templates for more information. 

When this action runs, the print template selected in the Format drop-down list is executed, a file is created, and the file is attached to the defined field in the manner selected. This action creates history records and can trigger other actions like sending the file by email.

Print actions are commonly used in action buttons to automatically generate documents and attach them to a record.


  • These steps assume you have already created the print template you want to use. For more information about creating a print template, refer to Creating Print Templates.
  • Before you begin, create a File with Versioning field to store the documents created by your action button.

Creating the Fields and Action Button

  1. Log in to  Agiloft as an admin and navigate to the Table wizard for the table where you want to show the action button.
  2. On the Fields tab, create an action button:
    1. Label the action button.
    2. Select the Execute Action checkbox.
    3. Click Add Action.
    4. In the pop-up window, click Create Print Action.
  3. Create the action as follows:
    1. Name the action.
    2. In the Format field, select your print template.
    3. Select Store printed document in File Field and select your File with Versioning field. Choose whether to append or overwrite any other files stored in the field.
    4. In Define the default file name, use Formula Help to configure the automatic naming convention. It is generally helpful to include the record ID and date in the file name.
  4. Finish setting up the action button and Save it. Continue organizing the layout and permissions as needed.