Keep the presentation of loop-claude, with the script that prints it to PDF and what writing it settled
CI / tests (pull_request) Successful in 2m15s

This commit is contained in:
2026-11-09 23:05:33 +01:00
parent 6fdf7d28a5
commit 46fc4dde7c
6 changed files with 1151 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
// Print /work/page.html to /work/out.pdf with Chromium, as build-pdf.sh runs it inside the playwright-for-claude image.
const { chromium } = require('/app/node_modules/playwright');
(async () => {
const browser = await chromium.launch({ args: ['--no-sandbox', '--disable-dev-shm-usage'] });
const page = await browser.newPage({ viewport: { width: 1100, height: 1400 } });
// networkidle waits for the Google Fonts the page loads; fonts.ready waits for them to apply.
await page.goto('file:///work/page.html', { waitUntil: 'networkidle' });
await page.evaluate(() => document.fonts.ready);
await page.emulateMedia({ media: 'print' });
// preferCSSPageSize takes the page's own @page rule: A4 landscape.
await page.pdf({ path: '/work/out.pdf', format: 'A4', printBackground: true, preferCSSPageSize: true });
await browser.close();
})();