cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
G99
Post Prodigy
Post Prodigy

Place all attachments (pictures only) in to 1 PDF

hello,

 

I am not at all sure if this is possible. I have for previous canvas apps PDF the data from Power Apps, using Power Automate.

I now have a requirement to place all the attachments (SharePoint is the data source) a user uploads in the app and export them into the same PDF as the data (text). I am not sure if this has been attempted, but I will be restricting users to only be able to upload image file types in the attachment control.

In theory I expect this is possible but cannot find the right information online 

 

Thank you

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @G99 ,

It is possible, but the maximum size of the PDF is 2mb. Below is an example from one of my Flows - this is getting the files from a SharePoint Library based on an identifier.

PDFPhotos1.jpg

PDFPhotos2.jpg

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

 

View solution in original post

16 REPLIES 16
WarrenBelz
Super User
Super User

Hi @G99 ,

It is possible, but the maximum size of the PDF is 2mb. Below is an example from one of my Flows - this is getting the files from a SharePoint Library based on an identifier.

PDFPhotos1.jpg

PDFPhotos2.jpg

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

 

View solution in original post

G99
Post Prodigy
Post Prodigy

Hello @WarrenBelz 

 

Would this work if my attachments were stored in a list item?

 

The 2mb limit of the pdf seems quiet small, I presume there is a reason for this and it cannot be increased?

@G99 ,

You could send the ID and use Get Attachments then Apply to each and  Get Attachment Content and then the rest as per the Library.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

G99
Post Prodigy
Post Prodigy

Hi Warren,

 

Thank you for your responses, I will come back to you in a few days I've been asked to work on something else. Once I have attempted your suggestions I will let you know if I require any more help or if it is working.

 

Thank you once again

G99
Post Prodigy
Post Prodigy

Hello @WarrenBelz 

Sorry about not coming back to this sooner I was moved off this project.

I am finally attempting this and struggling at the start:

 

My trigger is when an item is created or modified.

Then I get attachments - get attachment contents.

I attempted to get file properties but this is for doc libraries only it appears.

I attempted to Append to string variable action, but again I have no option in the Name field as yours is pointing to a doc lib i presume... are you able to advise what I am doing wrong as per your first response?

 

 

G99_0-1641404528105.png

 

Thanks

 

Hi @G99 ,

You need to initialise the Variable first (this was further up my Flow). I wanted to work this one out anyway and the below works fine and emails the PDF file back

AttachPhotos1.png

AttachPhotos2.png

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

G99
Post Prodigy
Post Prodigy

Hi @WarrenBelz 

 

Thanks for the detailed instructions with screen shot, I seem to be stumbling across a problem in the append to sting variable function:

 

G99_1-1641456981616.png

 

 

G99_0-1641456677971.png

 

Tried a number of times but the expression won't save

 

@G99 ,

My expression that works is 

dataUri(outputs('Get_attachment_content')?['body'])

The other content on both sides is Text

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

G99
Post Prodigy
Post Prodigy

Thanks @WarrenBelz 

 

That's solved that issue, do you have any issues opening the PDF?

I get this when I attempt to open the file from the email or from OneDrive:

G99_0-1641463621411.png

 

 

But I can see the merge was successful in the HTML file in the OneDrive folder, so it appears the conversion to PDF is failing, any ideas what I may have done wrong:

 

G99_3-1641463768657.png

 

G99_2-1641463731395.png

 

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,282)