Convert HTML to PDF Using PDF.co and Zapier

5 Minutes Read

This tutorial shows how to convert HTML files from Google Drive into PDFs automatically using PDF.co and Zapier.

The Zap uses:

  1. Google Drive — New File in Folder
  2. PDF.co — HTML to PDF Converter
  3. Google Drive — Upload File

Before You Begin

Create two Google Drive folders:

  • A source folder for incoming HTML files
  • A destination folder for generated PDFs

Using separate folders prevents the uploaded PDF from triggering the same Zap again.

Step 1: Add the Google Drive Trigger

Create a Zap and select Google Drive as the trigger app.

Choose New File in Folder, connect your Google account, and select the source folder.

Test the trigger and select a sample HTML file. Confirm that the trigger returns a File value.

Step 2: Convert the HTML File

Add another step and select PDF.co.

Choose HTML to PDF Converter, click Sign in, and authorize Zapier to access your PDF.co account.

Configure the action:

  • HTML or URL Input: Map the File value from Google Drive.
  • HTML Template ID: Leave blank.
  • Page Orientation: Select Portrait or Landscape.
  • Page Size: Select the required paper size, such as Letter or A4.
  • Custom Margins: Enter margins in top right bottom left order, such as 10mm 10mm 10mm 10mm.
  • Render Page Background: Enable this if the HTML contains background colors or images.
  • Media Type: Select Print for print styles or Screen for screen styles.
  • Name: Enter a name ending in .pdf, such as converted-document.pdf.
  • Custom Profiles: Leave blank unless additional conversion settings are required.

See the HTML to PDF Converter documentation for all current fields and supported options.

When passing a Google Drive file to PDF.co, use the File property as described in the Zapier file-source documentation.

Step 3: Test the Conversion

Test the PDF.co action. A successful result includes a temporary URL for the generated PDF.

Open the URL and confirm that:

  • The HTML content appears correctly.
  • Fonts, colors, and images are rendered.
  • The page size, orientation, and margins are appropriate.

Step 4: Save the PDF

Add Google Drive — Upload File.

Select the destination folder and map the PDF.co output URL into the file field. Map the PDF.co output name or provide your own .pdf file name.

Step 5: Activate the Zap

Publish the Zap after testing the complete workflow. New HTML files added to the source folder will now be converted and saved as PDFs automatically.

Now you know how to turn HTML to PDF quickly and with no coding. This is just one of many tutorials we have that cover converting various file formats into PDFs with PDF.co, Zapier, and other apps.

With our other tutorials, you can learn how to:

Related Tutorials

See Related Tutorials