How to Insert Page Break when Converting HTML to PDF with PDF.co

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
Sample HTML output in browser

After following the step by step guide, the result will look like this:

PDF with Page Break
PDF with Page Break

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
HTML to PDF Converter in Zapier

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
Zapier: Test Action

Once the test returns as successful. You can use the link to view and download the output PDF.

Resulting PDF link in Zapier
Resulting PDF link in Zapier

Video Guide