PDF Generator

In many cases you may have images for individual Products which you want to show in the PDF Tables. To make it easier to show the images on Tables, you can create 2 custom fields – Image URL (On Product Object) and Image Formula field on Objects like Quote Line Item, Opportunity Product etc.

Recommended practice is to store the individual images under Static Resources and specify the image URL into Image URL field on Product level.

 

 

Image Formula will look like following –

IF(
PricebookEntry.Product2.sfcloud__Image_URL__c ==”,
‘Image Unavailable’,
IMAGE( PricebookEntry.Product2.sfcloud__Image_URL__c , “Image Unavailable”, 75, 75)
)

You can use this Image formula field as PDF Column which will render the images into PDF –

 

You can also change height/width in this formula field.

For Images stored outside of Salesforce – 

In some case images are stored in external repositories and in order to avoid duplication you may want to use external image. In those scenarios, one additional step needed is to add domain where image is stored as Remote Site Settings  –

– Go to Setup menu >> Administer >> Security Controls >> Remote Site Settings >> New
– Enter remote site name, URL (For example, http://MyURL.com), mark it Active and click Save

 

Note : If you are using Product Bundle app as well, Image URL and Formula fields described above are provided as part of that package.