File size: 581 Bytes
032a961
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/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")