Render a webpage to a PDF

Load a webpage and convert it to a PDF file.

Overview

This template shows how to generate a snapshot of a webpage as a PDF file. The pipe takes the URL for a webpage, renders it as a PDF and returns the PDF file.

Code template

Common uses

The render() task provides a simple way to create a snapshot of a webpage as a PDF file. Common uses for this include:

  • Generating a PDF version of an analytic report or dashboard that can be emailed or downloaded
  • Setting up an automated PDF capture process to create a historical archive for a website
  • Creating a PDF reports from your data using CSS

Extend it

Specify the PDF paper size

Example 1

Example 2

Render a webpage as a PDF and send it as an email attachment.