In this guide you’ll learn how to export a SharePoint List to PDF in SharePoint. You can use an existing Tasks list for this or you can create one (Sales Task List) by navigating to your SharePoint site and adding a ‘Tasks’ app.
Please keep in mind that if you use the list’s default view, the PDF file generated will also have all the SharePoint User Interface’s Quick Launch menu as well. If you would like to have the list without the Quick Launch menu, we recommend creating a page that displays all items in the list with as little of the SharePoint User Interface around it as possible.
Create a New Page Without the Quick Launch Menu
To create a new page without the quick launch menu, perform the following steps:
Open the SharePoint site where you want to add the page. Click Site Contents and go to the Pages folder. Click New \Web Part Page.
Enter a name for the page (SalesTaskList) and select ‘Full Page, Vertical layout’. Select the Document Library where this page will be saved, and click Create button.
Click Add a Web Part, and select the list (Sales Task List) you want to display on this page. Select Add part to ‘Full Page’ and click the Add button.
The next step would be to click the newly inserted Web Part’s Edit button and select Modify Shared Web Part option.
Click Edit the current View and select the columns you want to be included in the PDF file. For example % Complete, Due Date, Start Date, and Task Status.
Under the Item Limit section set the limit to an appropriately large number. This will ensure all items are included in the PDF file without paging.
Click OK to save the changes, and click the Stop Editing button.
Save the page’s URL as you will need it later. E.g. SalesTaskList http://gbsavdws106/sites/Demo2019/SitePages/SalesTaskList.aspx
This new page will be used as the underlying layout of the PDF document. You can modify it further in SharePoint Designer / JQuery and remove additional parts of the SharePoint user interface.
Automatically Export SharePoint Lists to PDF with Designer Workflow
Follow these steps to set up an automatic PDF conversion with SharePoint Designer and generate a PDF file whenever the Tasks list is modified:
Create a new workflow using SharePoint Designer.
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.
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.aspxClick ‘this file’ and enter the path and file name where the PDF file will be generated, e.g. Shared Documents/Tasks.pdf.
Optionally, change the generated page’s orientation from Portrait to Landscape.
The username and password are optional. The credentials that are run by default will be used to open the web page. You can leave that field empty.
Click the Publish button to deploy and activate the 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.