Installation and Configuration
Step 1: Install the managed package using the installation URL for All Users.
Step 2: Ensure the license is active.
Step 3: Navigate to Setup > Custom Settings > PDF Elements > Manage > Default Organization Level Value and click New.
Step 4: Add the value "windowViewMode-normal" in the CL_normalViewElement field and "windowViewMode-maximized" in the CL_consoleViewElement field and "flexipage-component2" in the CL_flexipageComponentName field
- Step 5: Go to any object record page.
- Step 6: Find the Lightning PDF Generator component in the App Builder Sidebar under custom managed components.
- Step 7: Drag and drop the component to the desired location on the record page.
- Step 8: Apply configurations accordingly.
- Step 9: Save your changes.
Configuration
Adding the Component
- Navigate to the Lightning App Builder.
- Select the page where you want to add the Lightning PDF Generator.
- Drag and drop the Lightning PDF Generator component onto the page.
- Save and activate the page.
Design Attributes
The Lightning PDF Generator comes with several design attributes for customization:
- What you want to download?
- Description: Select what you want to download as a PDF. Options include Window, Full Page, Component, and CSS Selector. This property is required.
- Default Value: Window
- When 'Component' is selected, please provide display index
- Description: Specify the display index of the component you want to download if 'Component' is selected.
- Requirement: Required if 'Component' is selected in previous property.
- If 'CSS Selector' is selected, please provide CSS selector
- Description: Provide the CSS selector of the content to download if 'CSS Selector' is selected in what you want to download.
- Requirement: Required if 'CSS Selector' is selected.
- File Name
- Description: Enter the name for the downloaded PDF file.
- Requirement: This field is required.
- Default Value: page.pdf
- Label Of Button
- Description: Customize the label of the button that will trigger the PDF generation.
- Default Value: Generate PDF
For Downloading Email Thread as PDF, follow the below configuration.
Object Manager > Email Message > Button, Links and Action > New Action
- Name the action as your needs.
- Select Lightning Component - CL_EmailMessageAsPDF
- Save
Add this button in the page layout, and that's it. You are now ready to use Download Email As PDF