SharinPix PDF Photo Field

The SharinPix PDF Photo Field allows mobile users to add images to a PDF on the SharinPix mobile app. This helps make the PDF more communicative.

This article:

Warning:

Signing the PDF before capturing the photos using the photo fields will result in losing the signature.

We recommend that users sign the PDF after capturing the photos on the photo fields.

Demo

The screenshot below shows the first screen when you have uploaded a PDF.

Photo fields should be of type Text and the name should start with "sp_photo_".

For this example, we have clicked on "top view". Once you click on one of the text fields, the app redirects you to the camera screen. Once you have taken the image, an upload icon will appear.

Once the image is uploaded you will be redirected to the PDF. The photo taken appears on the photo field previously selected.

Note:

You can replace the photo field thumbnail by selecting the field and capturing a new photo.

You can also click on the save icon, to save the work progress. Then, if you close the page and open it again, your image will still be on the PDF.

You can also delete the progress by clicking on the back arrow. A popup will appear, allowing you to choose to continue workingdelete, or save and exit.

Photo Field Parameters

This section lists the different parameters that can be used in the Photo Field:

The parameters should be configured in the default value section as indicated in the picture below:

template_image

We can use the Photo Field to open a template image in annotation mode in the SharinPix mobile app. The template_image parameter takes as value an encoded version of the template image public URL. 

Here is an example of the key and value to be added in the Default Value field with the template image URL 'https://p.sharinpix.com/image.test.com/smart_solar.png':

template_image=https%3A%2F%2Fimage.test.com%2Fsmart_solar.png

This parameter can also be passed via the URL to have dynamic images tailored to specific Salesforce records that launch the SharinPix mobile app. In the above example, where the Photo Field's name is sp_photo_templateImage, the URL launching SharinPix can override its value with a URL parameter as provided below:

...&pvsp_photo_templateImage=template_image%3Dhttps%253A%252F%252Fimage.test.com%252Fsmart_solar.png

For more information on pre-filling PDFs, see Using SharinPix deeplink to launch a PDF from Salesforce mobile.

SharinPix also includes an additional parameter pf_fill, that can be used along with the template_image. The pf_fill parameter controls the behavior of displaying the template image on the photo field when initially opening a PDF document.

This parameter accepts two values:

  • true: When set to true, the template image associated with the photo field will be automatically filled into the field when the PDF is first opened.

"pf_fill": true

  • false: When set to false, the photo field will be blank when the PDF is first opened. (If no value is specified, the flag defaults to false.)

"pf_fill": false


Here is an example of the key and value to be added in the Default Value field with the template image URL https://p.sharinpix.com/image.test.com/smart_solar.png and the pf_fill parameter.
template_image=https%3A%2F%2Fimage.test.com%2Fsmart_solar.png&pf_fill=true

The picture below shows a PDF form with 2 photo fields, one with template_image as default value and the other with both template_image and pf_fill as default value.

Prefill Photo Fields with Template Images Using URL

In addition to setting the template_image and pf_fill parameters directly in the Default Value of the PDF form field, SharinPix also supports pre filling photo fields via URL parameters when launching the PDF from a deep link.

Syntax:
To pass a template image as a prefill value, use the pv prefix followed by the photo field name. The value should include the template_image URL and the optional pf_fill parameter, both URL-encoded.

Example:

sharinpix://upload?token=...&pdf=https%3A%2F%2Fpdf-mobile-templates.com%2Ftemplate_image_test.pdf&pvsp_photo_field=template_image%3Dhttps%3A%2F%2Fpdf-template-image.jpg%26pf_fill%3Dtrue

In the above example:

  • sp_photo_field is the name of the photo field you want to prefill.
  • The pv prefix indicates that it's a prefill value.
  • The value of pvsp_photo_field includes:
    • template_image=https://pdf-template-image.jpg (image URL)
    • pf_fill=true

Both the key and value should be properly URL-encoded.

Notes

  • If pf_fill=true is provided, the image will appear directly in the photo field when the PDF is opened.
  • If pf_fill is not specified or set to false, the field will display the template image only when the user opens the photo field manually.
  • This method is useful when launching PDFs from external apps or workflows where field values need to be set dynamically.

 

0 Comments

Add your comment

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