Html2Pdf

Html2Pdf MCP Connector for Claude

A+

Convert any website URL or raw HTML into high-quality PDF documents directly from your AI agent.

1 tools Official Updated Jun 28, 2026 Official Vinkius Partner

Transform web content and raw HTML into professional PDF files with Html2Pdf. This server allows your AI agent to generate documents, reports, and invoices on the fly with full control over layout, styling, and security.

What you can do

  • URL to PDF — Provide any public URL to capture a pixel-perfect PDF snapshot of the webpage.
  • HTML Rendering — Send raw HTML strings to generate custom documents like invoices, certificates, or resumes.
  • Layout Customization — Control page format (A4, Letter, etc.), orientation (landscape), and precise margins for a perfect print.
  • Advanced Styling — Use waitFor for JavaScript execution and media types (print/screen) for accurate CSS rendering.
  • Security & Permissions — Protect your documents with user/owner passwords and restrict actions like printing or copying.
  • Async Callbacks — Handle large document generation via webhooks for seamless background processing.

How it works

  1. Subscribe to this server
  2. Enter your Html2Pdf API Key
  3. Start generating documents from Claude, Cursor, or any MCP-compatible client

Who is this for?

  • Developers — Automate document generation workflows without setting up complex headless browser clusters.
  • Business Analysts — Quickly turn web-based reports or dashboards into shareable PDF files.
  • Content Creators — Archive web articles or format HTML content into clean, portable documents.
pdf-generationhtml-to-pdfweb-to-pdfdocument-automationreporting

1 tools expose this connector's capabilities to your AI agent.

generate_pdf

Returns the PDF as a base64 encoded string, or triggers an async callback if callBackUrl is provided. Convert HTML or a URL to a PDF document

See how to talk to your AI agent using Html2Pdf.

Convert https://google.com to a PDF in A4 format and landscape orientation.

I've initiated the PDF generation for Google.com with landscape orientation. The document is being processed and will be returned as a base64 encoded string.

Generate a PDF from this HTML code: '<h1>Invoice #123</h1><p>Total: $50</p>' and name the file 'invoice.pdf'.

Processing your HTML invoice... I've generated the PDF with the filename 'invoice.pdf'. You can now access the document payload.

Create a password-protected PDF of https://example.com using 'secret123' as the password.

Securing your document... I've generated a password-protected PDF for the requested URL. The file is encrypted and will require 'secret123' to be opened.

Yes! Use the `waitFor` parameter (up to 10 seconds) in the `generate_pdf` tool. This is ideal for pages that rely on async data loading or animations before they are ready to be captured.

Related Connectors