@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.

当前版本
v1.0.0
code-plugin社区source-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

源码与版本

源码仓库

PdfApiHub/openclaw-url-to-pdf

打开仓库

源码提交

509d7ff67a997e066d5f6f8f317155a43ce7a35f

查看提交

安装命令

openclaw plugins install clawhub:url-to-pdf

元数据

  • 包名: url-to-pdf
  • 创建时间: 2026/04/17
  • 更新时间: 2026/04/17
  • 执行代码:
  • 源码标签: main

兼容性

  • 构建于 OpenClaw: 2026.3.24-beta.2
  • 插件 API 范围: >=2026.3.24-beta.2
  • 标签: latest
  • 文件数: 7