Access the FormVu Microservice using Python

Table of contents

  1. Introduction
  2. Prerequisites
  3. Code Example
  4. Configuration Options
  5. Upload by URL
  6. Using Authentication
  7. Further details


The following tutorial shows you how to convert PDF forms to HTML using a hosted FormVu cloud API, such as:

Whilst all the above services can be accessed with plain old HTTP requests, this tutorial uses our open source Python IDRCloudClient which provides a simple Python wrapper around the REST API.


Using pip, install the IDRCloudClient package with the following command:

pip install IDRCloudClient

Code Example

Here is a basic code example to convert PDF forms to HTML. Configuration options and advanced features can be found below.

from IDRSolutions import IDRCloudClient

client = IDRCloudClient('' + IDRCloudClient.FORMVU)

    result = client.convert(
        # token='Token', # Required only when connecting to the IDRsolutions trial or cloud subscription servers
    outputURL = result['downloadUrl']

    client.downloadResult(results, 'path/to/output/dir')

    if outputURL is not None:
        print("Download URL: " + outputURL)

except Exception as error:

Configuration Options

The FormVu API accepts a stringified JSON object containing key value pair configuration options to customise your conversion. The settings should be provided to the convert method. A full list of the configuration options to convert PDF forms to HTML can be found here.


Upload by URL

As well as uploading a local file you can also provide a URL which the FormVu Microservice will download and then perform the conversion. To do this you should replace the input and file values in the convert method with the following.


Using Authentication

If you have deployed your own FormVu Microservice that requires a username and password to convert PDF forms to HTML, you will need to provide them with each conversion. These are provided by passing a variable named auth to the convert method as shown below.

auth=('username', 'password'))

Further details

IDRCloudClient on GitHub
IDRCloudClient on Pypi
FormVu Microservice API
FormVu Microservice Use

Still need help? Send us your questions.