Home > Forum > Actions > PDF creation with variable images

PDF creation with variable images
0

Hi,

What would be the best way to generate pdfs that would contain different images (for example logos), based on a form field?

I was thinking of two ways:

-Create a couple of different document templates with pictures already inserted and dynamically select template based on the other field value(s).
-Insert picture into a image form field during the workflow and then insert the picture into the document with the generate word document action (this would not be a good solution, since users would all have to repeatedly insert pictures each time) and then generate pdf.

Is there an option to for example have a picture on a network drive and if user selects "Company A" in the form, the workflow would retrieve "Company A.jpg" from the drive, otherwise "Company B.jpg" and insert it into word and then pdf?

Are there any better solutions you are using?

Thank you

MVP
In reply to: Mark

Hi,

Thanks!

And how do I control this template selection? Create a dedicated field for the tenplate url to fill it based on the content of another field? Then how do I use this template of the Generate pdf action?

Thanks!

HI,
First, you should create a document templates process.
Next, add your templates there.
Each registered template has its own Guid address which remains unchanged after migration between environments.
Then you create a word generation action.
In template selection section, you choose: from the process templates documents.
At the end, you create a business rule that controls which template will be used.