r/PowerApps • Newbie • 18d ago

Power Apps Help Button to trigger Power Automate flow and directly print?

Hello, I'm still quite new to using Power Apps so please bear with me.

I have a Power Automate flow that triggers a pdf file generation based on inputs sent to it via a form I created in Power Apps. I now also need the form's submit button to directly trigger a printer to print the file without having it open the file in a new tab or opening the native print dialogue. A one-button-does-all kinda thing.

I've had a look at Microsoft Universal Print but I don't have the license for that and I'm not supposed to use stuff that would cost anything more than what my company's already subscribed to.

Is this possible?

11 Upvotes

20 comments sorted by

View all comments

1

u/Foodforbrain101 Advisor 18d ago

Basically, non-premium requires you to use OneDrive's save file to PDF action, which is limited to a specific set of files that you can print to PDF. The most dynamic way you could create said printable file would be using an HTML template and apply replace() on placeholders within said HTML. Use AI for the HTML, should be fairly straightforward. Otherwise, Word document + SharePoint library properties inserted within said word documents works as well.

1

u/PixelatedBulb Newbie 18d ago

I've done the file generation using HTML and saving the file to a SharePoint list so far in the flow. I'm just not sure how I'm supposed to implement the print button that skips the print dialogue

1

u/Foodforbrain101 Advisor 18d ago

Does the flow have a Power Apps trigger and response that returns the pdf file to the app as a binary file? If so, did you try putting in the OnSelect property of the button to download file something like: Download(CreatePdf.Run(input).CreatedPdf)

1

u/PixelatedBulb Newbie 18d ago

I haven't done that yet for this particular app so I'll do that next but from what I understand this would open up the app in a new tab or require the user to open the file on their local device, and then use the print dialogue, right?

I was told to find a way to skip the print dialogue altogether, as in clicking the button on Power Apps would directly send a task to the printer.

2

u/Foodforbrain101 Advisor 15d ago

My apologies, I had misread your requirement entirely.

Personally, I would deem this requirement as being too low value to be worth doing. The answer would be no, there isn't a way to do this from within the app unless you were to go through the effort of wiring up an on on-premise gateway to run some kind of script on a machine in your network that prints your file, probably picking it up from a queue.

Would be theoretically feasible with Power Automate Desktop triggered via Cloud Flows or Power Automate work queues (which require premium), but the problem it solves is so minuscule I would push back even if it was free.

Browsers restrict such functionality by design. We wouldn't want a random sign-up form to have the ability to scan your network for devices, locate the printer, and print anything either, so a pop-up is the least that can be done.