Configure Lightning PDF Generator

Published on February 23, 2026 Lightning PDF Generator



Generating PDFs with Lightning PDF Generator

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, including adding the component and how CSS selectors are matched, see the Lightning PDF Generator setup article.

What you will learn: how to configure the component, generate a PDF, and choose between window snapshot, full-page capture, and CSS-selector extraction.

Before You Begin

  1. Lightning PDF Generator is installed and licensed in your org.
  2. The component has been added to the Lightning record page (see the setup article).
  3. You have permission to edit pages in Lightning App Builder.

Step 1: Configure the Component

In Lightning App Builder, select the Lightning PDF Generator component and set the following properties:

  1. File Name: the name of the downloaded PDF.
  2. Button Label: the text shown on the button.
  3. CSS Selector (optional): use this if you want to capture something other than the visible screen.
  4. Click Save to save the page.

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.

Success: a PDF named with your configured File Name is downloaded to your device.


https://www.youtube.com/watch?v=58PjeamCGaQ


Example Outputs

The examples below show the same component configured three different ways.

ModeWhat it captures
Window snapshotOnly what is currently visible on screen
Full-page captureThe entire page, including content below the fold
CSS-selector extractionOnly the element targeted by the selector

1. Window Snapshot

Captures only what is currently visible on screen, without scrolling content below the fold:

PDF output showing a window snapshot of the visible screen

PDF output from a window-snapshot capture.

2. Full-Page Capture

Includes the entire page, including content that would otherwise require scrolling:

PDF output showing a full-page capture

PDF output from a full-page capture.

3. CSS-Selector Extraction

Pulls only the specific element or component targeted by the selector, leaving the rest of the page out:

PDF output showing content extracted via a CSS selector

PDF output using a CSS selector to extract a single component.

Additional example PDF output using a CSS selector

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.

Troubleshooting

Button does not download a PDF: confirm the page was saved in Lightning App Builder and refresh the record page.
PDF is blank or captures the wrong area: verify the CSS selector matches an element that is visible on the page, or clear it to capture the visible screen.

Get Support

Need help? Contact the Papriwal Software and Consultancy support team and include your File Name, CSS selector and a screenshot of the output.

Knowledge Article Number: KA-00203

View more articles in the knowledge base