Configure PDF Downloader (LWC)

Published on October 19, 2026 Lightning PDF Generator


How to Configure PDF Downloader (LWC)

The PDF Downloader (LWC) component adds a button to any Lightning record page that lets users download the page, or selected parts of it, as a PDF. This guide shows how to place the component and configure each What to Download option.

Quick Overview: Add the component in Lightning App Builder, choose what to download (Window, Full Page, Component or CSS Selector), then set the button label and file name.

Step 1: Add the Component to the Record Page

  1. Open Lightning App Builder of the Object Record Page.
  2. Find PDF Downloader (LWC) in the component list.
  3. Drag and drop the component where you want the button to appear.

Recommendation: Place the component near the last components on the page so the full page finishes loading before a user prints.

PDF Downloader component in Lightning App Builder

Adding PDF Downloader (LWC) to the record page.

Step 2: Choose What to Download

Every option requires a button label and a file name. The examples below cover each option.

OptionResultExtra Setting
WindowVisible window areaNone
Full PageRecord page without navigation bar and headerNone
ComponentSelected components onlyComponent indexes
CSS SelectorElements matching the selectorsCSS selectors (comma separated)

Option 1: Window

Select Window in the What to Download picklist, then define the button label and file name.

Window option configuration

Configuring the Window option.

Sample PDF downloaded with the Window option:

Sample window PDF

Sample PDF downloaded using Window.

Option 2: Full Page

Select Full Page, then define the button label and file name.

Full Page option configuration

Configuring the Full Page option.

Result: The PDF shows only the record page, without the navigation bar and header.

Sample full page PDF

Sample full page download.

Option 3: Component

Select Component, give the button label and file name, then define the component indexes of the components to include in the PDF.

How indexes work: The index starts at 0. Count only the visible parent components in the Flexi area, from top to left to right.

Component option configuration

Configuring the Component option with indexes.

Sample PDF downloaded with component indexes 0, 1 and 3:

Sample component PDF

Sample PDF with component indexes 0, 1 and 3.

Option 4: CSS Selector

Select CSS Selector, define the button label and file name, then enter the CSS selector. Separate multiple selectors with commas.

CSS Selector option configuration

Configuring the CSS Selector option.

Sample PDF download using the selectors .highlights and .activityPanel:

Sample CSS selector PDF

Sample PDF using .highlights and .activityPanel.


Knowledge Article Number: KA-00473

View more articles in the knowledge base