π¦ 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.
π‘ Examples
# Convert a webpage to PDF (uses domain name as filename)
python pdf2.py https://example.comSpecify custom output filename
python pdf2.py https://example.com my-document.pdfShort 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
TERMINAL
clawhub install convert-pdf