# SharinPix Generate PDF on Form Response

## Overview

The **SharinPix Generate PDF on Form Response** component is a customizable button designed specifically for use on the **Form Response** record page. It enables users to instantly generate a PDF version of the current form response with a single click.

Users can configure the button to, either open the generated form response PDF in a new tab for immediate viewing or import it into a [SharinPix Album](https://docs.sharinpix.com/documentation/lightning-web-component/sharinpix-album-lwc)—either on the current Form Response record or its parent record.

![](https://2221230591-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5EvYRrLbUyvRh8o1jmMG%2Fuploads%2Fgit-blob-2f2492a512bbd94490fc1760e50f66257060ab6c%2FDOC%20SF%20-%201920%20x%20360%20\(1920%20x%20600%20px\)%20\(1920%20x%20240%20px\)%20\(1\)%20\(1\)%20\(1\).png?alt=media)

{% hint style="info" %}
**Info**

This feature is only available on **Lightning Experience**.\
It can only be used on the **Form Response record page** , including:

* On Page Builder
* On Desktop
* On Mobile
* In your own Lightning Component development

⚠️ This component cannot be used in Flows or Community Builder.
{% endhint %}

{% hint style="warning" %}
**Prerequisites**

* **Permissions:**\
  Users must have the **SharinPix Forms** **Admin** or **SharinPix Forms User** permission set assigned. For more information on these two permission sets, check [*SharinPix Permission sets*](https://docs.sharinpix.com/documentation/access-and-security/sharinpix-permission-sets).
* **Package Version:**\
  Ensure that SharinPix Package Version 1.355 (or later) is installed.
* A **SharinPix Form Template** is needed beforehand.
  {% endhint %}

## Getting Started

To use the SharinPix Generate PDF on Form Response component, you simply need to drag and drop the component from the Lightning App Builder onto your page layout.

![](https://2221230591-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5EvYRrLbUyvRh8o1jmMG%2Fuploads%2Fv2PDMmxexAOGYlqlvtBg%2FQQQQQ.png?alt=media\&token=de4bbc66-7485-44c8-81be-010b9f69800f)

### Lightning Component Parameters

![](https://2221230591-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5EvYRrLbUyvRh8o1jmMG%2Fuploads%2Fgit-blob-58fd5809658ed79cddc633301a995d6fa6f5e3e7%2FDOC%20SF%20-%201920%20x%20360%20\(1920%20x%20600%20px\)%20\(1\)%20\(1\)%20\(1\).png?alt=media)

| Parameter                 | Description                                                                                                                                                                                                                              | Default/Notes                        |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| Button Label              | The text displayed on the button that users will click to generate the SharinPix form response PDF.                                                                                                                                      | Default value: Download PDF          |
| Select Action             | This dropdown lets you choose what to do with the generated PDF. You can either open it in a new browser tab, or import it directly into a SharinPix album linked to the same record.                                                    | Default value: Open Pdf in a New Tab |
| Save PDF to Parent Record | When this checkbox is enabled, the generated PDF will be stored in the SharinPix Album associated with the parent record object. (e.g., `Account`) Else, the PDF will be stored in the album linked to the current Form Response record. | Default: Unchecked                   |

### Demo: Fire Safety Inspection Example

The image below shows the **SharinPix Generate PDF on Form Response** component configured in the Salesforce App Builder, with properties filled:

* **Select Action** set to *Import to SharinPix album*
* *Enable* **Save PDF to Parent Record** checkbox

![](https://2221230591-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5EvYRrLbUyvRh8o1jmMG%2Fuploads%2Fgit-blob-d808606daecfc46fff42336268d02787a28ab50b%2FDOC%20SF%20-%201920%20x%20360%20\(1920%20x%20600%20px\)%20\(2\)%20\(1\)%20\(1\).png?alt=media)

Assuming at least one form response exists for the *Fire Safety Inspection* form template, clicking the button will generate a PDF of the current form response and automatically import it into the SharinPix album associated with its *parent record*.

To confirm that the feature works as expected, navigate to the parent record as illustrated in **Step 2** in the image below. **Step 3** shows the generated PDF stored within the **SharinPix album** linked to that parent record.

![](https://2221230591-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5EvYRrLbUyvRh8o1jmMG%2Fuploads%2Fgit-blob-e5a94a93a73c1bd8d1f57c404eb2956107cf4f7f%2FDOC%20SF%20-%201920%20x%20360%20\(1920%20x%20600%20px\)%20\(1920%20x%201200%20px\)%20\(2\)%20\(1\).png?alt=media)

![](https://2221230591-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5EvYRrLbUyvRh8o1jmMG%2Fuploads%2Fgit-blob-938fba7dd5a1e4e68abf8a7da7f429875d41526f%2FDOC%20SF%20-%201920%20x%20360%20\(1920%20x%20600%20px\)%20\(1920%20x%201200%20px\)%20\(1\)%20\(1\)%20\(1\).png?alt=media)

{% hint style="danger" %}
**Alert**

The import to the SharinPix album will **only** occur once the **PDF URL** for the form response is **available**. For example, if the SharinPix form response includes images that are still uploading, the PDF may not be immediately generated.
{% endhint %}
