#!/usr/bin/env python3 """Screenshot the architecture diagram HTML at 2x for print quality.""" from playwright.sync_api import sync_playwright with sync_playwright() as p: b = p.chromium.launch() page = b.new_page(viewport={"width": 1228, "height": 700}, device_scale_factor=2) page.goto("file:///home/z/my-project/scripts/fig_architecture.html") page.wait_for_timeout(400) page.screenshot(path="/home/z/my-project/download/spira/artifacts/figures/fig_architecture.png", full_page=True) b.close() print("architecture diagram rendered")