In this guide you’ll learn how to automatically print a SharePoint Page to PDF using a Power Automate flow. If you are looking to automatically convert SharePoint Page to PDF visit our SharePoint Page to PDF conversion guide.
Before we start building the workflow, ensure all prerequisites are in place.
- Muhimbi PDF Converter for Power Automate full or free trial subscription.
- Appropriate privileges to create Power Automate(Flow).
- Working knowledge of both Nintex Forms and Power Automate.
- Access to a high-speed printer to print large volumes of documents quickly.
Using PowerAutomate to Print MS SharePoint pages to PDF
On a high level, the workflow will look as follows:
This example takes you through converting MS SharePoint pages to PDF. Then we will show how you can batch-print those documents. Our Flow actions also support the conversion of MS SharePoint Online pages. From a high-level perspective, the steps to create are as follows:
Create a new Flow and use the SharePoint Online trigger When an item is created or modified. Fill out the URL for the site collection and select the relevant SharePoint list from the dropdown menu.
Insert Muhimbi's Convert HTML to PDF action and fill it out as per the screenshot displayed below. Naturally, you will need to substitute the source URL, Username, and password. Make sure that for SharePoint Online conversions you select Print as the Media type.
Insert a Create File action to write the converted file back to SharePoint Online (or Dropbox, OneDrive, or Google Drive, or send the PDF via email).
Publish the workflow and create or update a list item in the specified MS SharePoint List. After a few seconds, the Flow will trigger and a PDF file will be generated.
Periodically copy a batch of converted PDF files from SharePoint to your local drive using a Library’s Actions / Open with Windows Explorer menu.
Select the batch of PDF files on your local system, right-click on one of the files, and select the Print option.
Troubleshooting / Caveats
HTML is not the best format for print or PDF Conversion purposes. Depending on your exact needs and source material, you may need to experiment with various available settings. If you have any questions or require assistance please feel free to contact us.
Please consider the following when using Power Automate:
Modern Views: In SharePoint Online it is possible to display Lists and Libraries in Modern or Classic mode. Modern View is undergoing constant change (by Microsoft), as a result, we currently only support the conversion of pages displayed in Classic View. Some Modern View pages will convert fine while others don't.
Multi-Factor Authentication (MFA): An increasing number of SharePoint Online / Office 365 environments are secured using MFA. Although this is a positive development, it gets in the way of automated systems such as our HTML converter. If your environment uses MFA then please create an App password for HTML conversions, or disable MFA on your HTML Conversion account.
HTML Conversion option not displayed: The option to convert the current page to PDF is only available on Classic SharePoint pages. Modern pages currently do not provide a facility for extending the personal actions menu. We will make sure it is added as soon as Microsoft makes this functionality available.
PDF Layout does not match: By default, the page being converted is optimized for print / PDF output. If you prefer the PDF to look exactly like what is displayed on the screen, including user interface elements, then set the Media Type to Screen in the HTML Conversion configuration screen.
User-modified content is not converted: The converter does not have knowledge about the information currently displayed in the user's browser (e.g. size of the browser window, or custom data entered, but not yet submitted to the server). The converter always requests a fresh copy of the URL and converts that information to PDF.
User-specific information is missing: HTML Conversion is carried out in the context of the configured user account, though the system is not aware of the user carrying out the HTML conversion. Don't specify accounts that display more information than what the users need to have access to.