Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Creating PDF from HTML

(0) ShareShare
ReportReport
Posted on by 14

Hello,

 

I am trying to create a workaround for converting a PNG to a PDF. My steps are as follows (with Power Automate step names in parenthesis) :

  1. Getting the PNG thumbnail (Get file Thumbnail)
  2. Compose HTML code (Compose)
  3. Create HTML File from thumbnail URL (Create File)
  4. Convert HTML to PDF (Convert File)
  5. Create PDF File from converted HTML (Create File)

The issue that I am running into is that my PDF shows up like this:

nj128534_0-1687547670818.png

I am confused about what is happening, since my HTML file is created correctly and contains all of the information that I need. 

 

Note that all steps are based on OneDrive for Business except for the Compose HTML Step.

 

Thank you in advance!

  • Verified answer
    v-mingkz-msft Profile Picture
    Microsoft Employee on at
    Re: Creating PDF from HTML

    Hi @nj128534,

    Do you want to convert the file thumbnail from PNG to PDF?

     

    I did some test according to your requirements.
    Convert HTML to PDF only supports pictures in Base64 format.
    You can convert the png to Base64 using base64() fuction.


    Following is my flow.

    vmingkzmsft_0-1687763056081.png

     

    vmingkzmsft_1-1687763372376.png

     

    vmingkzmsft_2-1687763392643.png

     

    Best Regards,

    Kyrie

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow