cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerDigitize
Regular Visitor

HTML Text as PDF

I have generated a barcode using HTML Text. But not able to convert that into a PDF  - 

 

This is what I am doing in Power App in HTML Text Input: (Barcode is being generated successfully) 

 

"<img src='https://www.barcodesinc.com/generator/image.php?code=" & 'txtStockCode.Text'& "&style=196&type=C128C'>"

 

Code in Power Automate (MS Flow) : (Not working)

 

concat("<!DOCTYPE html>
<html>
<body>
<img src='https://www.barcodesinc.com/generator/image.php?code=','', '&style=195&type=C128C'>

</body>
</html>
")

 

Also, how can i get what is stored in txtStockCode.Text text box from PowerApps ?

2 REPLIES 2
Ashwin7104
Super User
Super User

@PowerDigitize - The below link explains how values can be passed to Power Automate from Apps.

https://powerusers.microsoft.com/t5/Building-Flows/Pass-variable-from-powerapps-to-flow/td-p/66534 

Pstork1
Dual Super User
Dual Super User

To display an image in a PDF when converting HTML in Power Automate you can't just reference the URL of the image.  You have to retrieve the image and get its base64 representation.  That base64 string then needs to be input where the src='' code is in your HTML.  Take a look at the instructions in this blog.

Generate Any PDF Documents from HTML with Flow — John Liu .NET



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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