@rishabhdugar

URL to PDF

Convert any website URL to PDF, capture screenshots, and fetch rendered HTML. Supports custom paper sizes, margins, viewports, background printing, and wait strategies for JS-heavy pages. Powered by PDFAPIHub.

Current version
v1.0.0
code-pluginCommunitysource-linked

URL to PDF — OpenClaw Plugin

Convert any website URL to PDF, capture screenshots, and fetch rendered HTML using the PDFAPIHub API. This OpenClaw plugin gives your AI agent the ability to save web pages as PDFs, take screenshots, and scrape JavaScript-rendered content.

What It Does

Save any website as a pixel-perfect PDF document, capture high-resolution screenshots, or fetch the fully rendered HTML from JavaScript-heavy single-page applications — all through a headless Chromium browser.

Features

  • URL to PDF — Convert any website to a PDF with custom paper size, margins, and orientation
  • Website Screenshot — Capture full-page or viewport screenshots with retina quality
  • Rendered HTML Fetch — Get the final DOM of JS-rendered pages and SPAs
  • Custom Paper Sizes — A4, Letter, Legal with portrait or landscape
  • Configurable Margins — Set top, right, bottom, left margins individually
  • Background Printing — Include background colors and images in PDFs
  • CSS Page Size — Respect @page CSS rules for precise layout
  • Wait Strategies — Wait for network idle, DOM content, or custom selectors
  • Cookie Consent — Auto-click cookie banners before capture
  • Flexible Output — Download URL, base64 string, or raw file

Tools

ToolDescription
url_to_pdfConvert a website to PDF with full layout control
url_to_screenshotCapture a website screenshot with custom viewport and quality
fetch_page_htmlFetch rendered HTML from JS-rendered pages

Installation

openclaw plugins install clawhub:pdfapihub-url-to-pdf

Configuration

Add your API key in ~/.openclaw/openclaw.json:

{
  "plugins": {
    "entries": {
      "pdfapihub-url-to-pdf": {
        "enabled": true,
        "env": {
          "PDFAPIHUB_API_KEY": "your-api-key-here"
        }
      }
    }
  }
}

Get your free API key at https://pdfapihub.com.

Usage Examples

Just ask your OpenClaw agent:

Use Cases

  • Web Archiving — Save web pages as PDF documents for offline reading and archiving
  • Report Generation — Convert dashboards and analytics pages to shareable PDFs
  • Legal Documentation — Capture web page snapshots as evidence with timestamps
  • Content Export — Save blog posts, articles, and documentation as PDFs
  • Web Scraping — Fetch rendered HTML from SPAs and JavaScript-heavy sites
  • QA Testing — Screenshot pages for visual regression testing

API Documentation

Full API docs: https://pdfapihub.com/docs

License

MIT

Source and release

Source repository

PdfApiHub/openclaw-url-to-pdf

Open repo

Source commit

509d7ff67a997e066d5f6f8f317155a43ce7a35f

View commit

Install command

openclaw plugins install clawhub:url-to-pdf

Metadata

  • Package: url-to-pdf
  • Created: 2026/04/17
  • Updated: 2026/04/17
  • Executes code: Yes
  • Source tag: main

Compatibility

  • Built with OpenClaw: 2026.3.24-beta.2
  • Plugin API range: >=2026.3.24-beta.2
  • Tags: latest
  • Files: 7