Generate one-page visual reports, dashboards, and infographics from HTML — powered by Playwright + Chromium.
中文说明请见:README.zh-CN.md
- HTML → PNG screenshot pipeline
- Custom viewport dimensions (
--width,--height) - High-DPI output via
--scale(up to 4x) - Local HTML file input only (
.html) - Deterministic output via Playwright + Chromium
npm install -g @liustack/briefpress
npx playwright install chromiumOr run with npx:
npx @liustack/briefpress [options]# Generate infographic (default 1200×630 @2x)
briefpress -i report.html -o report.png
# Custom dimensions for a tall infographic
briefpress -i report.html -o report.png -w 1080 -h 1920
# High-DPI poster
briefpress -i poster.html -o poster.png -w 1200 -h 1500 --scale 3Your HTML must include a <div id="container"> — BriefPress clips the screenshot to this element's bounding box.
<body>
<div id="container">
<!-- your content here -->
</div>
</body>-i, --input <path>input HTML file path-o, --output <path>output PNG file path-w, --width <pixels>viewport width (default: 1200)-h, --height <pixels>viewport height (default: 630)--scale <number>device scale factor, 1-4 (default: 2)--wait-until <state>load | domcontentloaded | networkidle--timeout <ms>timeout in milliseconds--safedisable external network requests and JavaScript execution
MIT