Download as PDF
The Download as PDF action opens the browser’s print dialog, where the user can save the page as a PDF (Chrome: “Save as PDF”; Safari: “Save as PDF” or “Export as PDF”; Firefox: “Save to PDF”).
This action is off by default. The print dialog is always reachable via Cmd/Ctrl+P, and many sites prefer not to advertise PDF as a primary artifact.
Enable it
Section titled “Enable it”starlightLlmActions({ actions: { printPdf: true, },})How it works
Section titled “How it works”The action calls window.print(). Anything you’d see in a printed page —
including the print/PDF snapshot notice —
will appear in the resulting PDF.
Pair with the print snapshot notice
Section titled “Pair with the print snapshot notice”The most common reason to enable this action is to combine it with the print/PDF snapshot notice, so PDFs that escape your site point readers back to the canonical page:
starlightLlmActions({ actions: { printPdf: true, }, printNotice: { branding: { logo: { src: '/logo.svg', alt: 'Acme', height: '1.5rem' }, siteName: 'Acme DOCS', }, warning: { message: [ 'This is a point-in-time export and may be outdated.', 'Internal use only — do not redistribute.', ], }, },})The notice prints regardless of how the user reaches the print dialog, so even users who hit Cmd/Ctrl+P without ever opening the dropdown still get the disclaimer in their PDF.
See Print/PDF snapshot notice for the full configuration.
Why it’s off by default
Section titled “Why it’s off by default”Three reasons:
- Discoverability isn’t the problem. Cmd/Ctrl+P already works. Adding a dropdown item doesn’t unlock new behavior, it just surfaces it.
- Some teams don’t want PDFs as a deliverable. Stale PDFs in shared drives are a known support headache. Defaulting the button off lets teams opt in deliberately.
- Surface area. The dropdown is meant to feel light. Off-by-default keeps the “Open in…” providers as the focal point.