How to Insert Page Break when Converting HTML to PDF with PDF.co
Dec 3, 2024·2 Minutes Read
We prepared this step-by-step tutorial with screenshots to teach you how to insert a page break when converting HTML to PDF.
We will use this sample HTML and convert it to PDF with a Page break.
![Sample HTML output in browser](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2Fa2cf767064b8135bff228024ecc6ebbcbcdc27d3-330x129.png&w=750&q=75)
IN THIS TUTORIAL
Setup HTML to PDF in Zapier
In your Zapier workflow search and select PDF.co as our App event and select HTML to PDF Converter as our Action event. With HTML to PDF Converter, you can convert your raw HTML code into a PDF.
![HTML to PDF Converter in Zapier](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2Fa5ae77c4da23b499e301b957ff7f092c34260339-896x470.png&w=1920&q=75)
Add HTML sample code
Under Set Up Action for the Input HTML, put:
<h1>Some Text on page 1</h1>
<p style="page-break-before: always" />
<h1>Some Text on page 2</h1>
Test the Action
We will now Test the action. Click on Test & Review to see if there are any errors or none.
![Zapier: Test Action](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2Fd0ffc02d70fae32e6851f95c59c1e81561fb9cd9-895x756.png&w=1920&q=75)
Once the test returns as successful. You can use the link to view and download the output PDF.
![Resulting PDF link in Zapier](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2F8b47a31005973e5c825513a7f8e68902e16b40dd-895x595.png&w=1920&q=75)
![Output PDF with Page Break](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F2niroq9z%2Fproduction%2Fd9f65d40218eacbbfc9c250796872aa72e861b59-952x591.png&w=1920&q=75)
Video Guide
Related Tutorials
![Tutorial default thumbnail](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Ftutorial-placeholder.de8908df.png&w=3840&q=75)
Generate PDF with Charts using HTML in PDF.co and Zapier
Sep 2, 2024·4 Minutes Read
![Tutorial default thumbnail](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Ftutorial-placeholder.de8908df.png&w=3840&q=75)
How to Convert Outlook Email to PDF using PDF.co and Zapier
Sep 2, 2024·5 Minutes Read