web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Conversion of image fi...
Power Automate
Unanswered

Conversion of image file to pdf is not supported on Power Automate

(0) ShareShare
ReportReport
Posted on by 143

Hi,

I am having trouble converting an image file to PDF using Power Automate. It's showing me an error 'Conversion of an image file to pdf is not supported. Here I am attaching the flow with the error message. Convert Image to PDF failed.png

 

Conversion of image file tyo pdf is not supported.pngIf someone can help me figure out what's wrong, I would really appreciate it.

Thanks in Advance.

Categories:
  • Dahlqvist84 Profile Picture
    8 on at

    Hi,

     

    If you first convert to html and pdf it will work. See attached screenshot.

     

    Dahlqvist84_0-1643492121971.png

    Expression in Create HTML:
    outputs('Get_file_content')?['body']['$content-type']

    outputs('Get_file_content')?['body']['$content']

     
  • sonam1996sahoo Profile Picture
    143 on at

    Hi @Dahlqvist84 

     

    I tried this one, but still, I am getting errors on the converted file. 

    Convert Image to PDF using flowConvert Image to PDF using flow

     

  • Dahlqvist84 Profile Picture
    8 on at

    Can you show me what you got in compose and create file?

     

    The filename must be "filename.html" on the first create file before the convert file action. So you convert from html to PDF.

     

    Dahlqvist84_0-1643654892443.png

     

  • sonam1996sahoo Profile Picture
    143 on at

    I did not get that dynamic content that you have used in the Create HTML. So I used here File content from the Get file content. Also, I already used the File name using the '.html' extension.

    Create image to PDF using Power Automate.png

  • Dahlqvist84 Profile Picture
    8 on at

    Try to paste this in compose action and see if it works for you.

     

    <img src="data:@{outputs('Get_file_content')?['body']['$content-type']};base64,@{outputs('Get_file_content')?['body']['$content']}" style="max-width: 550px;">

     

     

    Else you need to type in the expression to the compose action.

     

    First type this in compose:

    <img src="data:;base64," style="max-width: 550px;">

     

    Then mark after "data:" and before ";base64"

    Click the expression icon

    Dahlqvist84_0-1643707311946.png

    Type in below text to the expression.

    outputs('Get_file_content')?['body']['$content-type']

     

    Do the same after "base64," and type the expression.

    outputs('Get_file_content')?['body']['$content']

  • RanieFibia Profile Picture
    20 on at

    Hey this solution works for me. But what if want to merge all attachments in a Email, save it as a .HTML before I convert to one PDF. Is that posiable and what should I I write in compose to create a html from an attachment?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 335 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard