Generating PDFs
Published on February 23, 2026 Lightning PDF Generator
Generating PDFs
This guide shows how to generate a PDF once Lightning PDF Generator is on your page, and what the output looks like for each use case. For full setup instructions — adding the component, setting the file name and button label, and configuring CSS selectors — see the Lightning PDF Generator setup article.
Step 1: Configure the Component
In Lightning App Builder, set the component's File Name, Button Label, and — if you want to capture something other than the visible screen — a CSS selector for the target content. Save the page once configured.
Step 2: Generate the PDF
Open the record page and click the button with your custom label. The PDF downloads automatically using the file name you set.
Example Outputs
The examples below show the same component configured three different ways.
Window snapshot — captures only what's currently visible on screen, without scrolling content below the fold:
PDF output from a window-snapshot capture.
Full-page capture — includes the entire page, including content that would otherwise require scrolling:
PDF output from a full-page capture.
CSS-selector extraction — pulls only the specific element or component targeted by the selector, leaving the rest of the page out:
PDF output using a CSS selector to extract a single component.
A second example of CSS-selector extraction, targeting a different section of the page.
Tips
- If the output includes more or less than expected, double-check your CSS selector — see the setup article for how selectors are matched.
- Some images and special characters may not render in the PDF. See the Known Limitations section of the setup article before relying on this for content with custom images or non-standard characters.
Knowledge Article Number: KA-00203