Skip to content
screenjson

screenjson-cli

Export ScreenJSON to PDF

Render a ScreenJSON document as a studio-quality PDF screenplay with Courier Prime, correct margins, and pagination.

Last updated January 2026

Command

screenjson export -i screenplay.json -f pdf -o screenplay.pdf

A4 paper

screenjson export -i screenplay.json -f pdf --pdf-paper a4 -o screenplay.pdf

Default is letter.

Courier Prime

screenjson export -i screenplay.json -f pdf --pdf-font courier-prime -o screenplay.pdf

Default is plain courier.

External Gotenberg for fidelity

For the best PDF output — real pagination, widow/orphan control, proper page numbering — pair the CLI with Gotenberg:

screenjson export -i screenplay.json -f pdf \
  --gotenberg http://gotenberg:3000 \
  -o screenplay.pdf

Or set SCREENJSON_GOTENBERG_URL and drop the flag.

In Docker Compose

services:
  screenjson:
    image: screenjson/cli:latest
    environment:
      - SCREENJSON_GOTENBERG_URL=http://gotenberg:3000
    volumes:
      - ./data:/data
    command: ["export", "-i", "/data/screenplay.json", "-f", "pdf", "-o", "/data/screenplay.pdf"]

  gotenberg:
    image: gotenberg/gotenberg:8

Next