cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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 @Anonymous ,

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

22 REPLIES 22
WarrenBelz
Super User
Super User

Hi @Anonymous ,

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

 

 

Anonymous
Not applicable

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?

@Anonymous ,

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

Anonymous
Not applicable

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

Anonymous
Not applicable

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 @Anonymous ,

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

 

Anonymous
Not applicable

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

 

@Anonymous ,

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

Anonymous
Not applicable

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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,338)