Integration
Url To Pdf
OpenClaw plugin to convert any URL/webpage to PDF — headless Chromium rendering, custom page sizes, wait for JS content, cookie consent, viewport control, landscape mode. Powered by PDFAPIHub API. Free API key at pdfapihub.com
Install
openclaw plugins install clawhub:pdfapihub-url-to-pdf
Configuration Example
{
"plugins": {
"entries": {
"pdfapihub-url-to-pdf": {
"enabled": true,
"env": {
"PDFAPIHUB_API_KEY": "your-api-key-here"
}
}
}
}
}
README
# URL to PDF — OpenClaw Plugin
Convert any website URL to PDF, capture screenshots, and fetch rendered HTML using the [PDFAPIHub](https://pdfapihub.com) 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
| Tool | Description |
|------|-------------|
| `url_to_pdf` | Convert a website to PDF with full layout control |
| `url_to_screenshot` | Capture a website screenshot with custom viewport and quality |
| `fetch_page_html` | Fetch rendered HTML from JS-rendered pages |
## Installation
```bash
openclaw plugins install clawhub:pdfapihub-url-to-pdf
```
## Configuration
Add your API key in `~/.openclaw/openclaw.json`:
```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](https://pdfapihub.com).
## Usage Examples
Just ask your OpenClaw agent:
- *"Convert https://github.com to a PDF"*
- *"Save this article as a PDF: https://example.com/blog/post"*
- *"Take a full-page screenshot of https://news.ycombinator.com"*
- *"Fetch the rendered HTML from this React app"*
- *"Convert this page to a landscape Letter PDF with 1-inch margins"*
## 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](https://pdfapihub.com/docs)
## License
MIT
integration
Comments
Sign in to leave a comment