Skip to main content

Getting started

Quick start

Try the demo first — no license needed

Before subscribing, generate a realistic sample PDF with the full render pipeline in under 60 seconds. No license key, no config changes — just run:

bash
npx @reportforge/playwright-pdf reportforge-demo

This writes playwright-report/demo-report.pdf using canned fixture data. Use --template to try all three layouts, and --output to pick a different path:

bash
npx @reportforge/playwright-pdf reportforge-demo --template=executive --output=./demo.pdf

Chrome required. If Chrome is not on your PATH, set PUPPETEER_EXECUTABLE_PATH first. See Chrome setup.

The demo command runs in a fully isolated mode: no RF_LICENSE_KEY is read or validated, and the license gate in the main reporter is not bypassed. It is a separate build that uses canned fixture data only.

Wire it into playwright.config.ts

Add the reporter to your reporter array. The minimum config is two lines.

// playwright.config.tsimport { defineConfig } from '@playwright/test';import { defineReporterConfig } from '@reportforge/playwright-pdf';export default defineConfig({  reporter: [    ['list'],    ['@reportforge/playwright-pdf', defineReporterConfig({      template: 'detailed',      outputFile: 'reports/{date}-{branch}-{status}.pdf',      projectName: 'My Project',    })],  ],  use: { screenshot: 'only-on-failure' },});

Typed helper

defineReporterConfig is an optional typed identity helper: it gives you IntelliSense and type-checking on the options object without a separate ReporterOptions import. A plain object literal works too.

Filename tokens

Tokens like {date}, {branch}, and {status} are expanded at write time. See the Configuration reference for the full list.

outputFile: 'reports/{date}-{branch}-{status}.pdf'// → reports/2026-04-27-main-failed.pdf