The GoFormz API supports exporting formz to PDF. Generating a PDF is a processing intensive operation and could be a long running operation. In order to improve performance, this process consists of multiple steps.
- Exporting a form to PDF
- Create the PDF.
- Get the metadata for the PDF.
- Download the PDF from the Url provided in the metadata.
To export the form into a pdf, submit a POST to the formz exports endpoint:
The body of the POST request has two properties:
type- Allows you to specify the type of format to export the form to.
pages- Specify the form pages to include in the exported format.
The pages property is optional.
At this point the pdf is queued for processing. The response headers will contain a location header that contains a link to an entry in the queue that can be polled for the status of the PDF creation.
Once the PDF has been created, the queue entry will provide a link to the actual PDF resource.
See Get exported PDF metadata for more information.
Issue a GET request to the URL supplied in the
redirectUrl property of the metadata to download the PDF.