Accusoft.Forms1 - Updated
Forms API Samples
Forms API - User Guide > Getting Started > Forms API Samples

Using Forms API and FormDirector with Web-Friendly Storage Solutions

Forms API samples not only demonstrate how to process a form with minimal coding and setup, but also how to integrate various storage solutions into your forms processing workflow. The FormSuite component FormDirector, which handles all reading and writing of Form Sets and Form Definitions, has samples that incorporate SQL, NoSQL, and Amazon Web Services for storing forms processing data. With this added flexibility and simplified approach to processing forms, these samples will provide a baseline solution for you to extend or customize to meet your needs.

For more information, see FormDirector samples.

Forms API Samples

Forms API has the following samples:

Name Description
SimpleFormsProcessing

This is a sample program provided in source form. It is a console application that demonstrates the use of Forms API for forms processing. It is functionally similar to FormsProcesseingServer, but it is simplified and aims to present a basic implementation with minimal complexity and effort.

SimpleFormsProcessing uses the Forms API component for interfacing to the FormSuite components.

It takes a FormSet file (*.frs) as input and an image of a filled form through command line parameters. It deserializes the FormSet file, uses this data to process the input image, and prints the processing results to the console window in JSON format.

Use SimpleFormsProcessing as an introduction to forms processing and as a starting point to create your own forms processing application.

FormsProcessingWithMongoDB

This is a sample program provided in source form. It is a console application that demonstrates MongoDB integration for storing and accessing Forms Processing data, as well as  the use of Forms API for forms processing. It is functionally similar to SimpleFormsProcessing, but it has the added capabilities of writing FormDirector data to a MongoDB database and reading said data back into the application in order to process forms.

FormsProcessingWithMongoDB uses classes derived from FormDirector to interface with MongoDB and Forms API to interface with FormSuite components.

The sample takes as input a MongoDB connection string, a path to the local FormSet file to be uploaded, a name for the MongoDB FormSet, and an image of a filled form; all through command line parameters. It deserializes the FormSet file, converts the object to JSON, writes the JSON to MongoDB, reads the JSON from MongoDB, serializes the JSON and uses this data to process the input image. It then prints the processing results to the console window in JSON format.

Use FormsProcessingWithMongoDB as an introduction to forms processing and as a starting point to create your own forms processing application that integrate with MongoDB.

FormsProcessingWithS3

This is a sample program provided in source form. It is a console application that demonstrates AWS S3 integration for storing and accessing Forms Processing data. It then demonstrates the use of Forms API for forms processing. It is functionally similar to FormsProcessingWithMongoDB, but it has the added capabilities of writing FormDirector data to an S3 bucket and reading said data back into the application in order to process forms.

FormsProcessingWithS3 uses classes derived from FormDirector to interface with AWS S3 and Forms API to interface with FormSuite components.

The sample takes as input a path to the local FormSet file to be uploaded, the name of an existing AWS S3 bucket, an object key to read and write data to a location on the bucket, a path to a csv file containing AWS credentials, and an image of a filled form; all through command line parameters. It deserializes the FormSet file, converts the object to JSON, writes the JSON to S3, reads the JSON from S3, serializes the JSON and uses this data to process the input image. It then prints the processing results to the console window in JSON format.

Use FormsProcessingWithS3 as an introduction to forms processing and as a starting point to create your own forms processing application that integrate with AWS S3.

FormsProcessingWithSqlDB

FormsProcessingWithSqlDB uses classes derived from FormDirector to interface with MS SQL Server and Forms API to interface with FormSuite components.

The sample takes as input a path to the local FormSet file to be uploaded, a primary key to read and write data to a record in the database, and an image of a filled form; all through command line parameters. It deserializes the FormSet file, converts the object to JSON, writes the JSON to a SQL record, reads the JSON from a SQL record, serializes the JSON and uses this data to process the input image. It then prints the processing results to the console window in JSON format.

Use FormsProcessingWithSqlDB as an introduction to forms processing and as a starting point to create your own forms processing application that integrate with MS SQL Server.

Forms Processing Server

This is a sample program provided in source form. It is a console application that demonstrates the use of Forms API for forms processing in batch mode.

Forms Processing Server uses Forms API for interfacing to the FormSuite
components. It also includes a separate project called XmlSerialization, which demonstrates how form processing results can be output to an XML file.

It takes an input and an output directory as command line parameters. It then reads filled form images from the input directory, processes them, and puts the results in the output directory.

Use Forms Processing Server as a starting point to create your own forms processing application.

.NET 4.

If your development and target environments have been upgraded to .NET 4, we encourage you to use the Visual Studio 2010, 2015, and 2017 solution files provided with the Forms Processing Server sample to take advantage of multithreading.

FormAssist

This is a sample program provided in source form. It is a GUI application that demonstrates how to:

  • create and edit FormSets and
  • use the Forms API as well as the other FormSuite components to test those FormSets in an interactive manner.

Since FormAssist depends on your input, it is more suitable for desktop use than for batch processing. Note that FormAssist also includes such things as Form Set creation, which are not part of the Forms API.

Form Assist is also provided in binary form, and is fully licensed as the Form Suite demo app.

Access the samples through the Windows Start menu: Start | Accusoft menu.

In older versions of Windows, samples are available through the Start | All Programs | Accusoft menu.