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
- The form as its default view laid it out, or another view if you pick one. Views made for printing work the same way.
- Real text, so the PDF can be searched, copied and read by a screen reader's text tools. Characters outside the Western European set are drawn as a picture with the same text laid invisibly over it, so searching still finds them.
- Check boxes, option buttons, drop-down choices, dates formatted the way the form showed them, rich text, pictures in the form, and every row of every repeating table and section.
- Attachments listed by name and size where the form showed them. The files themselves are saved next to the PDFs.
- Letter, A4 or Legal paper. A view wider than the page is turned sideways and scaled to fit. Page breaks never cut through a line of text, and a table row stays on one page when it fits.
- The form's file name and "Page 1 of 2" at the foot of each page.
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.