For AI agents: a documentation index is available at /llms.txt
Skip to main content

Generate a PDF

Export any webpage or HTML content as a PDF using Browserless.

Prerequisites

Steps​

Use the Browserless MCP server to generate a PDF from any MCP-compatible AI agent (Claude Desktop, Cursor, Windsurf, ChatGPT, etc.).

One prompt that installs the Browserless MCP server and runs this example. Paste it into your AI agent.

1. Connect the MCP server

Send this prompt to your AI agent to install the Browserless MCP server:

Go to https://github.com/browserless/browserless-mcp/blob/main/install.md
and follow the instructions to install the Browserless MCP server
for my client.

2. Generate a PDF

Use browserless_smartscraper. It captures the page as a PDF in one call with automatic bot-protection handling.

Use the browserless_smartscraper tool to generate a full-page
PDF of https://scraping-sandbox.netlify.app/dashboard-report and save it as output.pdf

Next steps​

Was this page helpful?