Dynamically load pictures from Salesforce into your documents. Linked to records, eg products. Multiple pictures linked to a single record, eg case. And the super complex scenario to add APEX to get exactly what you want.
There are 4 ways to scale an image:
NONE: The system will stretch or squeeze the image to make it fit the placeholder while keeping the placeholder’s exact height and width.
BY WIDTH: The system will keep the width of the placeholder to fit the image and automatically recalculate the height.
BY HEIGHT: The system will keep the height of the placeholder to fit the image and automatically recalculate the width.
CONTAIN: The system will always contain the image within the placeholder, as in the “NONE” option, but it will adjust either the height or the width to ensure the image scales correctly.
Product pictures (not complex): #
Let’s say you want to show opportunity products with picture of the product in your document. You have to use PICTURE LIST Data Source and Picture Config type to achieve this.
Steps to achieve this:
- Create data source to fetch opportunity products.
- Make Sure to have pictures for product records in your salesforce and give some keyword or identifier name for all those products.
- Create PICTURE List type data source as a child to above data source to fetch pictures of the products as shown below.
- Create Doc Config.
- Open PDF Butler and add two data sources as shown below.
- Upload Product Picture template in Doc Config Documents section. Create Config types as shown below.
- Open any opportunity and edit the page to add PDF Butler Convert component into the page. Supply Doc Config Id to the component.
- Generate the document and pictures will be shown in the placeholder.