download-webpage-as-pdf

Solid

Saves a live webpage as a high-fidelity PDF that preserves the original layout and every image, including lazy-loaded ones, using the agent-browser CLI. Use whenever the user wants to download a page as PDF, save an article, or archive a URL as a local file that looks like the browser version. Matters most on JS-heavy sites where a naive `chrome --headless --print-to-pdf` or a bare `agent-browser pdf` yields blank rectangles and broken-image placeholders.

Web & Frontend 36 stars 1 forks Updated today MIT

Install

View on GitHub

Quality Score: 85/100

Stars 20%
52
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Download a webpage as a PDF (agent-browser recipe) The naive approaches fail on modern sites: - `chrome --headless --print-to-pdf` captures only the initial viewport's images. Anything below the fold renders as a blank rectangle. - `agent-browser pdf` immediately after `open` has the same problem - lazy-loaded images haven't decoded yet. - Scrolling via JS and then waiting a fixed time is also unreliable - you don't know when each image actually finished. The fix is one async script that strips lazy-load attributes, scrolls the page to trigger any IntersectionObserver-based loaders, and `await`s every `<img>` to decode. agent-browser's `eval` waits for the returned promise to resolve before exiting, so the subsequent `pdf` command sees a fully-loaded DOM. ## The recipe If multiple test/agent runs may share the host's agent-browser, isolate each invocation with `agent-browser --session <unique-name> ...` on every command in the pipeline. Single-user one-off captures can omit the flag and use the default session. Set `AGENT_BROWSER_HEADED=false` in the environment before running so the skill launches headless even when the host's `~/.agent-browser/config.json` defaults to `"headed": true`. This avoids popping a real Chrome window on the user's desktop while an agent is working in the background. Do NOT use the CLI's `--headed false` flag - in agent-browser 0.26.0 it parses but corrupts the session context (subsequent commands see an empty document). The env var is the s...

Details

Author
tenequm
Repository
tenequm/skills
Created
10 months ago
Last Updated
today
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Data & Documents Listed

url-to-pdf

URL to PDF and HTML to PDF. Convert any web page URL, or a raw HTML string, into a clean PDF file. Save an invoice or a receipt, archive an article, or print an HTML report to PDF. The page renders in a real hosted browser with JavaScript on, so the PDF matches the live page, and you set paper size, margins, orientation, and backgrounds. No local headless Chrome or wkhtmltopdf to install. The agent registers its own key and gets free credits right away, so the first PDF works with no signup. A person can confirm one email to add more free credits, and only successful renders cost anything.

1 Updated 1 months ago
toolshedlabs-hash
Web & Frontend Listed

web-browsing

Navigate, interact with, and read live web pages from the terminal by combining the agent-browser CLI (headless Chrome over CDP) with the defuddle CLI (clean Markdown extraction). Use whenever a task needs a real browser — opening a page, filling a form, clicking through a flow, logging in, taking a screenshot, testing a web app, scraping data — or whenever a URL needs to be read as clean Markdown instead of raw HTML, including JS-rendered SPAs and pages behind a login that a plain HTTP fetch cannot see. Triggers on "open a website", "read this page", "fetch this URL", "what does this page say", "fill out a form", "take a screenshot", "scrape this page", "log in to", "test this web app", 瀏覽器自動化, 開網頁, 讀這個網頁, 網頁截圖, 填表單, 抓網頁內容. Prefer this over WebFetch and over any other browser automation approach.

0 Updated 2 days ago
chenwei791129
Web & Frontend Listed

agent-browser

Drive a real browser from the CLI — navigate, snapshot, click, fill, screenshot, emulate. Use when the user wants to interact with a website, test or review a web UI, take screenshots, extract page data, or attach to a CDP endpoint (Chrome, Tauri/WebView2, Electron), or when another skill needs browser evidence.

3 Updated 2 days ago
Firzus