Skip to content
Press.js Press.js Press.js Docs

Introduction

press is the Press.js CLI — the bridge between your web application and PDF output.

It orchestrates the full render pipeline: building your app, routing artifacts into a headless Chromium browser, running the Press.js pagination engine, and exporting the result as a PDF. With --remote, the same command delegates rendering to Press.js Cloud.

press.toml ──► build ──► artifact routing ──► Playwright ──► pagination ──► PDF
  1. Configure — a press.toml file declares one or more document entries, each pointing to a built web app
  2. Build (optional) — the CLI runs your app’s build command
  3. Route — the CLI fulfills internal browser requests from the built artifacts
  4. Capture — Playwright launches Chromium, navigates to your app, and waits for the ready signal
  5. Paginate — the Press.js runtime measures and paginates the DOM into pages
  6. Export — the paginated result is rendered to PDF

For cloud rendering, press render --remote keeps steps 1 and 2 local, then hands the resolved artifact path and render options to press-cloud-cli.

You don’t need to install @press-js/playwright separately — it’s bundled with the CLI.

Terminal window
# Install the CLI
npm install --global @press-js/cli
# Render a PDF (requires press.toml and a built app)
press render

See the Press.js Quickstart for a complete walkthrough.