Mercurial
view love/pdf-mcp/html_to_pdf.py @ 278:8d560f50ed4c
Improve infinite canvas interactions and browser chrome
Render Lucide icons directly with Raylib, add searchable icon browsing, robust text editing, entity lifecycle animations, z-order-safe input, semantic themes, and animated editable browser controls. Document rendering, pinning, context, and component extension for future agents.
Co-authored-by: Copilot <[email protected]>
Copilot-Session: f68442b1-fa8f-46a0-9689-81710613bbd4
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 17 Aug 2026 22:16:14 -0700 |
| parents | cf9caa4abc3e |
| children |
line wrap: on
line source
import sys from playwright.sync_api import sync_playwright deck_id = sys.argv[1] url = f"http://localhost:8000/decks/{deck_id}/index.html" with sync_playwright() as p: browser = p.chromium.launch() page = browser.new_page() page.goto(url, wait_until="networkidle") page.wait_for_timeout(2000) page.pdf(path=f"static/{deck_id}/deck.pdf", format="A4", print_background=True) browser.close()