Print SharePoint Pages to PDF

In this guide, you’ll learn how to automatically print a SharePoint page to PDF using a Power Automate flow. If you’re looking to automatically convert SharePoint pages to PDF, refer to our SharePoint page-to-PDF conversion guide.

Prerequisites

First, ensure all prerequisites are in place:

  • A full or free trial subscription of [Muhimbi Document Converter for Power Automate][].

  • Appropriate privileges to create Power Automate flows.

  • Working knowledge of both Nintex Forms and Power Automate.

  • Access to a high-speed printer to print large volumes of documents quickly.

Using Power Automate to Print MS SharePoint Pages to PDF

On a high level, the workflow will look like what’s shown below.

print page to pdf

This example takes you through converting MS SharePoint pages to PDF. Then you’ll learn how to batch-print those documents. Our flow actions also support the conversion of MS SharePoint Online pages.

  1. Create a new flow and use the When an item is created or modified SharePoint Online trigger. Fill out the URL for the site collection and select the relevant SharePoint list from the dropdown menu.

  2. Insert Muhimbi’s Convert HTML to PDF action and fill it out as shown in the screenshot above, substituting the source URL, username, and password. Make sure Print is selected in the Media type field when you’re doing SharePoint Online conversions.

  3. Insert a Create File action to write the converted file back to SharePoint Online or another location of your choice.

  4. 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.

  5. Periodically copy a batch of converted PDF files from SharePoint to your local drive using a library’s Actions / Open with Explorer menu.

  6. Select the batch of PDF files on your local system, right-click one of the files, and select the Print option.

Troubleshooting/Caveats

HTML isn’t 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:

  1. Modern views — In SharePoint Online, it’s possible to display lists and libraries in modern or classic mode. Modern view is undergoing constant change (by Microsoft), and some modern view pages will convert fine, while others don’t. As a result, we currently only support the conversion of pages displayed in classic view.

  2. 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, including our HTML converter. If your environment uses MFA, create an app password for HTML conversions, or disable MFA on your HTML conversion account.

  3. HTML conversion option isn’t displayed — The option to convert the current page to PDF is only available in classic SharePoint pages. Modern pages currently don’t provide the ability to extend the personal actions menu. As soon as Microsoft makes this functionality available, we’ll add it.

  4. PDF layout doesn’t match — By default, the page being converted is optimized for print/PDF output. If you prefer for a PDF to look exactly like what’s displayed onscreen, including user interface elements, set the Media Type to Screen in the HTML conversion configuration screen.

  5. User-modified content isn’t converted — The converter doesn’t 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.

  6. User-specific information is missing — HTML conversion is carried out in the context of the configured user account, though the system isn’t aware of the user carrying out the HTML conversion. Don’t specify accounts that display more information than what users need to have access to.