SharinPix To PDF

This component is only available in the Enterprise license plan of SharinPix. For more info, please contact [email protected]

The SharinPix To PDF component allows users to generate a PDF using preselected images from a SharinPix Album.

This is a great way for you to generate reports and send them as attachments in email. In addition, the PDF generated will be saved on the record as Content Document.

Information:

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

  • Page Builder
  • Desktop
  • Mobile
  • Community: For more information about how to use the SharinPix to PDF component in Salesforce Community, click here.

Getting Started

Note:

In order to use this component, you should ensure that:

  • Image Sync is enabled for the SharinPix Album component. To do so, check the Enable Image Sync checkbox in the SharinPix Album's parameters. This step is required to enable the creation of SharinPix Image Objects upon image uploads. Click here for more information about how to setup the SharinPix Image Sync.
  • The permission set SharinPix Lightning Components is assigned to all users attempting to use the SharinPix To PDF component.

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

Lightning Component Parameters

  • Generate PDF Button Label: Used to set the custom button's label. The default value is Generate PDF.
  • Image URL field: The image URL field from SharinPix Image object you want us to use. This refers to the type of image transformation.
  • Image Caption Text: The text field from SharinPix Image object is used as the caption for each image.
  • Number Of Columns: The number of columns you want for the table generated for the table of images.
  • First Page Content: This is used to display the content of the given field as the first page of the PDF. The parameter can take a list of one or more Rich Text field API names delimited by a semi-colon.
  • Last Page Content: This is used to display the content of the given field as the last page of the PDF. The parameter can take a list of one or more Rich Text field API names delimited by a semi-colon.
  • Images' Pre-description: Optional Rich Text field used as pre-description of the images. The parameter can take a list of one or more Rich Text field API names delimited by a semi-colon.
  • Images' Post-description: Optional Rich Text field used as post-description of the images. The parameter can take a list of one or more Rich Text field API names delimited by a semi-colon.
  • Page Orientation: Orientation of the generated PDF. The default value is portrait.
  • Single Image Per Page: Used to display only one image per page.
  • Footer format: An HTML format to display in the footer section of each page. Merge fields such as {pagenumber} and {pagecount} can include the page number and the total number of pages in the PDF.
  • Filename Field: The API name of the field that will contain the filename to be used for the generated PDF.
  • captionTextBelowImage: Used to display one column with caption text below each image. Number of Columns should be taken as 1 and the option 'Single Image Per Page' should be unchecked.

Tip:

Demo

To generated the PDF, select some images from the SharinPix Album and click on Generate PDF button as shown below:

Below is an instance of the PDF generated:

Resorts | Salesforce - Google Chrome

Tip:

For best results, use the SharinPix Transformations to have custom image size.

More information on transformation can be found here: SharinPix Transformation - get your images automatically resized!

Below are some references for optimal image transformations for you to have a visually appealing PDF:

Layout Columns Transformation type Value
Portrait 4 images per page 2 Pad to size 1000x1500
Portrait 6 images per page
2 Pad to size
1000x1000
Portrait 8 images per page
2 Pad to size
1000x650
Portrait 10 images per page
2 Pad to size
1000x580
Landscape 3 images per page 1 Pad to size 1000x1500

Note:

Salesforce has some limitations regarding PDF generation.

For the SharinPix to PDF component to work as expected, kindly ensure that the generated PDF file is less that file is 60 MB and that the maximum total size of all images included in a generated PDF is less than 30 MB.

For more information on Salesforce PDF generation limitations, kindly refer to this article:

Visualforce PDF Rendering Considerations and Limitations

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.