Convert Form to PDF in SharePoint

In this guide you’ll learn how to convert a SharePoint form to PDF. Our PDF Converter for SharePoint supports the conversion of HTML-based content. So, you can now export any SharePoint page to a PDF document, including those containing all entries in a list. This guide can be used in SharePoint Online or On-premises deployments.

You can convert MS SharePoint Form to PDF, which is illustrated below with a simple example.

You can use a simple Tasks list for this. If you do not have one, feel free to create one (Sales Task List) by navigating to your MS SharePoint site and adding a ‘Tasks’ app. If you use the MS SharePoint Form’s default view, the PDF file generated will also have all the SharePoint User Interface’s Quick Launch menu as well. To have the MS SharePoint Form without the Quick Launch menu, you can create a Form that displays all items in the list with as little of the SharePoint User Interface around it as possible.

Create a New MS SharePoint Form Without the Quick Launch Menu:

Creating MS SharePoint Pages Without Quick Launch

To create a new page without the Quick Launch menu follow these steps:

  1. Navigate to the All Site Content screen and click gear icon and click Add a page.

  2. Enter the Title and add a List Web Part, and add a List - *Sales Task List

  3. On the newly created page click Add a Web Part and add the Sales Task List.

  4. Before adding the list in the page, please ensure you select the columns you want to be included in the PDF file by navigating to the List Settings in the List. For example % Complete, Due Date, Start Date and Task Status.

  5. Under the Item Limit section set the limit to an appropriately large number. We don’t want to page through the data in batches as we want to include all items in the PDF file.

  6. Click Save button to save the changes and Publish button to publish your changes.

  7. Save the page’s URL as we need it later. E.g.
    http://gbsavdws106/sites/Demo2019/SitePages/SalesTaskList.aspx

This new page will be used as the underlying layout of the PDF document. Feel free to modify it further in SharePoint designer / JQuery and remove more parts of the SharePoint user interface. You could also consider creating a minimalistic master page and applying that to the new PDFTasks page.

form to pdf

Setup Automatic PDF Conversion Using MS SharePoint Designer Workflow

In this example, you will generate a PDF file whenever the Tasks list is modified. The generated PDF file is stored in the Shared Documents library. You can create the workflow as follows:

  1. Make sure you have the appropriate privileges to create workflows on a site collection.

  2. Create a new workflow using SharePoint Designer.

  3. On the Workflow definition screen, associate the workflow with the Tasks list, tick the boxes next to both ‘Automatically start’ options, and proceed to the next screen.

  4. Add ‘Convert HTML to PDF’ action and click ‘this url’ and enter the URL to the page that was created in the previous step.
    e.g. http://gbsavdws106/sites/Demo2019/SitePages/SalesTaskList.aspx

  5. Click ‘this file’ and enter the path and file name where the PDF file will be generated, e.g. Shared Documents/Tasks.pdf.

  6. Optionally, change the generated page’s orientation from Portrait to Landscape.

  7. The username and password are optional. By default, the credentials that the Muhimbi Conversion Service runs under will be used to open the web page. You can leave it empty.

  8. Click the Publish button to deploy and activate the workflow.

publish workflow

You can enter one or more tasks to test. You will observe that every time a task is added or updated a PDF file is written to the Shared Documents/Tasks.pdf location. You can open the PDF file to check the results.

shared documents

In summary, this HTML conversion capability (available in newer versions) opens up many possibilities. As always, upgrades are completely free, so please upgrade and use all the available features.

Have a Question?
We’re Always Happy to Help.

© Muhimbi Ltd. 2008 - 2024
This website uses cookies to ensure you get the best experience. Learn more