I need to generate a PDF which embeds images uploaded with File Upload control
It works ok with signature control or image, but not manage to map with File Upload.
Solved! Go to Solution.
To be able to use file uploads as images in document generation you need to be able to anticipate the images.
To ensure that only images are uploaded into the attachments field I would restrict the file type to images:
You also need to think about how many images you would want to have from the upload, if it is a single image then the process is simple and you should restrict the maximum files in the control to 1.
When you save the form and return to the workflow, the image for the upload will be in a collection.
This is done in assumption of multiple possible images and is normal behaviour, however this cannot be used as an image for document generation so we need to get the image file from the collection before we can use it, you can do that with these set of actions:
First create a new file type variable and name how you wish.
Then use the Get item from collection action to populate the variable with the uploaded image, the index used is 0 for the first and only item.
Now your image is stored in a file variable it can be used in the generate document action
To be able to handle multiple images can be a little more complex but follows a similar line to this process.
If your requirement does need multiple image uploads and you would like assistance following the instructions above then please reach out to me via your account manager and I will be happy to jump on a call to help you out.