The following returns a specific file (image) for use in a PDF conversion.
I'm returns the same image to every PDF file created regardless of the rest of the content it's the company header image.
I would like to use similar actions to return 'dynamic' content - the image of the employee in the data set. Is this possible?
The below would return the company header image, while another would return a 'output' that is the specific employee's image.
Where would you get the image of each employee? Do you have images of each employee stored somewhere, or did you mean the image associated with their User Profile?
If from the User Profile, you could use the Get user photo (V2) action which return the Image file content of the photo that you can use essentially the same as you did with your Company Logo.
<img src="data:image/jpeg;base64,@{body('Get_user_photo_(V2)')?['$content']}" />
From SP Library or SP List; The images are in both.
I figured out how to get it from an Active Directory, assuming the pic is loaded. However, I have had projects where active directory is not an option.
I wanted to also have a more general use ready to go.
In my test all employees have a pic in the 'CompanyLogo' column of the SP 'Employee List'.
That same photo is in the SP 'Employee Image Library'.
The employee full name (Title/FullName column in SP List) and image name (Title/Name column in SP Library) match.
I'm guessing the anwer is in an edit of the 'Get file content...' action, as it currently calls for a specific image, rather than the image associated with the specific member of the orginal trigger action..
User | Count |
---|---|
91 | |
43 | |
19 | |
18 | |
15 |
User | Count |
---|---|
137 | |
54 | |
42 | |
41 | |
30 |