🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

web page to pdf

by @goog

Convert web pages to PDF files using Playwright, saving them in A4 format with margins after fully loading the page.

Versionv1.0.0
πŸ’‘ Examples

# Convert a webpage to PDF (uses domain name as filename)
python pdf2.py https://example.com

Specify custom output filename

python pdf2.py https://example.com my-document.pdf

Short URL (https:// is added automatically)

python pdf2.py example.com output.pdf

βš™οΈ Configuration

If playwright is not installed:

pip install playwright
playwright install chromium

πŸ“‹ Tips & Best Practices

  • The script uses Chromium via Playwright for accurate rendering
  • Waits for network idle before PDF generation to ensure page is fully loaded
  • Output is saved to the current working directory
  • A4 format with 20px margins is used by default
  • View on ClawHub
    TERMINAL
    clawhub install convert-pdf

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’