# SharinPix Generate Form Response PDF

## Overview

The **Generate Form Response PDF** component is a button that allows users to instantly generate a PDF version of the latest SharinPix form they have submitted. Users can configure it, choosing to either open the generated Form Response PDF in a new tab for immediate viewing or import it directly into a [SharinPix Album](https://docs.sharinpix.com/documentation/lightning-web-component/sharinpix-album-lwc).

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

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

This feature is only available on Lightning. It can be used:

* On Page Builder
* On Desktop
* On Mobile
* On Community Builder
* In your own Lightning Component development
* In Flows
  {% 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 the SharinPix Package Version **1.355 (or later)** is installed. Refer to the article below to upgrade your current package: [*How to upgrade SharinPix package*](https://app.gitbook.com/s/i8tH1o5AHthxksYgF6ij/how-to-update-sharinpix-package-from-the-appexchange)
* A [**SharinPix Form Template**](https://app.gitbook.com/s/rRD1Xcn9HtKcyfQ9Ghyk/form-elements/sharinpix-form-template-editor) should be configured beforehand.
  {% endhint %}

## Getting Started

To use the SharinPix Generate Form Response PDF 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%2Fgit-blob-82a65e6504441faa00b66ca89139e87d59190db4%2FDOC%20SF%20-%201920%20x%20360%20\(1\)%20\(1\)%20\(1\)%20\(1\)%20\(1\).png?alt=media)

## Lightning Component Parameters

![](https://2221230591-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5EvYRrLbUyvRh8o1jmMG%2Fuploads%2F2TwZOfv6keACeMlcCNSK%2FSFSDFSDGFDS.png?alt=media\&token=f51d6a40-6cfd-4e15-b7df-16a0d15b6669)

| 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: Generate Form Response PDF            |
| SharinPix Form Template Name or ID | Specifies which SharinPix Form Template to use to generate the PDF. Provide the template’s Name, ID, or a Salesforce field containing the template's Name or ID in the format: `{Inspection_Template__c}`. The PDF will be generated from the **latest Form Response** of the specified template submitted on the current record. The template must have been created in the [SharinPix Form Template Editor](https://app.gitbook.com/s/rRD1Xcn9HtKcyfQ9Ghyk/form-elements/sharinpix-form-template-editor). | Must match an existing template in your system.      |
| 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*               |
| **Record ID** \*                   | (**Required in Flow Screens and Community Pages**) The Salesforce record ID of the record page.                                                                                                                                                                                                                                                                                                                                                                                                             | Auto-populated in some contexts; required otherwise. |

## Demo: Fire Safety Inspection Example

This example demonstrates importing the **fire safety inspection PDF** into the related site’s SharinPix album when a form is submitted.

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

* **SharinPix Form Template Name** set to *Fire Safety Inspection*
* **Select Action** set to *Import to SharinPix album*

![](https://2221230591-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5EvYRrLbUyvRh8o1jmMG%2Fuploads%2F8OhjwxXFS3g81QuCVwqA%2FVVVVV.png?alt=media\&token=752d786f-dc8f-4d81-b8d3-c8930975acfd)

Assuming at least one form response exists for the *Fire Safety Inspection* form template, clicking the **SharinPix Generate Form Response PDF** button will generate a PDF of the latest form response and automatically import it into the SharinPix album linked to the same record. You may need to **refresh the page** to see the PDF appear in the album.

The image below displays the generated PDF stored within the SharinPix album:

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

![](https://2221230591-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5EvYRrLbUyvRh8o1jmMG%2Fuploads%2Fgit-blob-bc24f5929b66ad16e14487e589a7e1ad0765d7e5%2FDOC%20SF%20-%201920%20x%20360%20\(3\)%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 %}
