Formhaul

Export InfoPath forms to PDF in bulk

When a library holds hundreds or thousands of InfoPath forms and the records have to stay readable, a PDF of each form is the usual answer. Formhaul makes them in the browser: drop in the template and the library's forms, and it draws each form with the form's own view and saves it.

Downloading a whole form library

For a few hundred forms, select them in the library and choose Download. SharePoint sends one zip. A view that shows more items per page makes the selecting quicker.

For a bigger library the PnP PowerShell module copies every file into a folder. It needs an app registration in your tenant first (the PnP documentation walks through it), then:

Connect-PnPOnline -Url https://example.sharepoint.com/sites/records -Interactive -ClientId <your app id>
$items = Get-PnPListItem -List "Leave Requests" -PageSize 2000
foreach ($i in $items) {
  if ($i.FileSystemObjectType -eq "File") {
    Get-PnPFile -Url $i.FieldValues.FileRef -Path C:\forms -FileName $i.FieldValues.FileLeafRef -AsFile -Force
  }
}

On SharePoint Server, the library's View in File Explorer button lets you copy the files out by dragging them. Either way, drop the folder on the converter together with the template.

What each PDF looks like

There is also an option to put every form into one PDF, one after another, for a single file to hand to a records system.

Speed depends on the forms. On my laptop the fourteen-form sample takes about a second, and 194 real forms from 76 different templates took 24 seconds. A library of a few thousand forms is a coffee break, not an overnight job.

Forms that do not come out right

Anything the page could not reproduce is written to problems.csv in the zip, one line per form, so nothing fails quietly. The usual causes are template code (never run here), drop-downs filled from a SharePoint list (they show the stored value), and controls that only ever worked inside InfoPath, such as ink pictures.

If a form looks wrong and you can share the template with the personal data removed from a sample form, send it to me and I will fix the drawing.

Trying it first

Without a licence the export gives PDFs of the first three forms, with a small "preview" mark in the corner, and the first ten rows of the field table. That is enough to check the result on your own forms. The organisation licence is US$149 once and removes both limits.