Convert HTML or URL to PDF
Description
This action takes either raw HTML content or a URL, and generates a PDF file from it — with optional settings like margins, headers, footers, paper format, image quality, and page orientation.
Input Arguments
Input Argument | Type | Description | Required? | Advanced Option? | Default |
---|---|---|---|---|---|
HTML or URL | HTML or URL | The HTML or URL content that will ne used to create the PDF File. | ✔️ | ❌ | - |
Landscape Format? | Boolean | Specifies whether the PDF should be generated in landscape orientation (horizontal). | ❌ | ✔️ | No |
Quality of Image Content | Number | Maximum image quality (in pixels) for the included images. | ❌ | ✔️ | 800 |
Footer Options | Choice Field | Display options in the document footer. | ❌ | ✔️ | Nothing displayed by default |
Header Options | Choice Field | Display options in the document header. | ❌ | ✔️ | Nothing displayed by default |
Paper Format | Choice Field | Defines the paper format, e.g. A3, A5, Letter, etc. | ❌ | ✔️ | A4 |
Top margin | Number | Defines the top margin (in pixels) of the PDF. | ❌ | ✔️ | 20 |
Bottom margin | Number | Defines the bottom margin (in pixels) of the PDF. | ❌ | ✔️ | 20 |
Left margin | Number | Defines the left margin (in pixels) of the PDF. | ❌ | ✔️ | 20 |
Page Ranges | String | Defines which pages are to be printed, e.g. 1.-3,5 etc. | ❌ | ✔️ | All pages |
Scale | Number | Defines the scaling factor of the page content. | ❌ | ✔️ | 1 |
Output
Response | Type | Description |
---|---|---|
File response | The PDF response from the file. | |
File response as string | String | The file content as a string. This can be stored in a variable, saved to Dataverse, or passed to other actions that require the file content in string format. |
MIME type | String | The MIME type of the PDF file. |
Extension | String | The file extension (for this action always pdf) . |
Power Automate Examples
Convert URL to PDF
If you provide a URL (e.g., a website), the action will load the webpage and convert its visible content into a PDF file.
In our case, we use the following URL: https://en.wikipedia.org/wiki/Monkey (opens in a new tab) (last accessed on July 21, 2025).
Convert HTML to PDF
As input, you provide an HTML table.
Simple HTML table
<table border = "1">
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Francisco Chang</td>
<td>Mexico</td>
</tr>
</table>
💡
Looking for the response to this example? Scroll up to see the Output tab.
Known Limitations
⚠️
If you experienced other limitations please get in touch with us!