Convert HTML pages to PDF with PDF4me and Power Automate

By Aravindan Dhanapal | Automation

Convert HTML pages to PDF with PDF4me and Power Automate

The world of documents has highly evolved over the past year. Due to unforeseen changes to the business, academic, and other aspects of life, we are largely dependent on digital documents and paperless transactions. The same is influencing the software and web development industries. For many reasons, it’s often required to convert even web pages to PDF. These might be for reviewing, print, or archiving. PDF4me has come up with a feature that can convert HTML pages to PDF. And the best part is, you can automate this process with the support of Powe Automate.

Convert HTML pages to PDF

Let us look at a use case to see how we can make the best out of this feature. Convert HTML web pages to PDF using PDF4me HTML to PDF action and save it to OneDrive Storage using Power Automate. A single HTML file can be converted into a PDF. Also, zip archived artifacts that contain supporting files along with HTML also can be converted to PDF.

OneDrive folder with PDF4me HTML to PDF action

The HTML files uploaded to a selected OneDrive folder location will be converted as PDF documents and uploaded to a different OneDrive location.

Output PDF file saved from PDF4me HTML to PDF action in OneDrive

Step by Step Guide to create Power Automate Flow:

Power Automate HTML to PDF action with OneDrive

Step 1: Trigger Execution

Power Automate has multiple types of triggers to start your workflow. It can be scheduled to run in every regular interval. In this use case, we trigger workflow when a file is created in the OneDrive folder location.

Choose the folder location where html documents will be dropped for conversion

Step 2: Choose PDF4me Connector and HTML to PDF Action

Click on New Step after completing the Trigger part. A window prompted with many app suggestions where you have to search for PDF4me and select PDF4me Connect. Then PDF4me provided actions will be listed just like below. From here, you can choose HTML to PDF action from the list.

Step 3: Map input fields with HTML to Pdf action

Input file content from the trigger action
  • File Content – Input file content from the trigger action.
  • HTML File Name – Input file name from the trigger action.
  • Index File Path – When you upload the zip file, provide the path to the HTML file.

For Example, contains files structure like ”SampleHtml–»Web–»index.html”
Set Index File Path as ”SampleHtml/Web/index.html”

Step 4: Save Converted PDF file to OneDrive location

This is a final step to save converted output files to the OneDrive folder location.

Converted PDF file saved to OneDrive
  • Folder PAth – Choose the folder location where the Output document is to be saved.
  • File Name – Output file name from the PDF4me Convert action.
  • File Content – Output file content from the PDF4me Convert action.

HTML to PDF ready to use Templates in Power Automate:

Get started with some ready-to-use templates created similar to the described use case.

Happy Automation with PDF4me and Power Automate.

Get an API Subscription with PDF4me and never let your Automation stop. You can also buy API calls as Addons (one-time purchase). Check our Pricing Plans now and choose a plan that fits your requirements.

Related Blog Posts