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 / PDF to JPG converts th...
Power Automate
Answered

PDF to JPG converts the first page only

(0) ShareShare
ReportReport
Posted on by 111

I need to insert PDF on OneNote page as printout using Power Automate. To do that I convert a PDF file to JPG using standard OneDrive connector "Convert File" and then insert the result image on the OneNote page. It works but with one limitation: only 1st page of the PDF file is converted to JPG.

 

Is it convertor's limitation? If yes, then Is there any other way to insert PDF printout version on OneNote page?

 

Thanks in advance.

Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @SlavaS1 ,

     

    I found this document.

    https://docs.microsoft.com/en-us/graph/onenote-images-files#add-images-of-pdf-file-contents

    Does it help?

     

    Edit:

    You can try to use graph api to insert PDF printout.

    Sample:

    vxiaochenmsft_0-1658193145398.png

    {
     "$content-type": "multipart/form-data",
     "$multipart": [
     {
     "body": "<!DOCTYPE html><html> <head><title>A page with images of the pages of a PDF file</title></head><body> <p>The pages of this PDF file render as images.</p> <img data-render-src=\"name:file-part\" alt=\"PDF file as images\" width=\"500\"/> </body></html>",
     "headers": {
     "Content-Disposition": "form-data; name=\"Presentation\"",
     "Content-Type": "text/html"
     }
     },
     {
     "body": @{body('Get_file_content_using_path')},
     "headers": {
     "Content-Disposition": "form-data; name=\"file-part\""
     }
     }
     ]
    }

    For your information:

    https://willpage.dev/2019/12/20/using-the-http-action-to-post-multipart-form-data-in-power-automate-logic-apps/

     

    Best Regards,

    Wearsky

  • SlavaS1 Profile Picture
    111 on at

    Thank you @v-xiaochen-msft  this is exactly what I need.

    I would add for others that to run that HTTP call we have prior

    - register an App in Azure,

    - get permissions with scope Notes.ReadWriteAll

    - get token on the flow

    - use that bearer token to create OneNote page

  • SlavaS1 Profile Picture
    111 on at

    Hi @v-xiaochen-msft I was able to insert PDF printout when I create a OneNote page, thank you for your detailed reply, it helped me a lot.

     

    Now I'd like to update the page and insert another printout. I wrote a HTTP call body base on the article but something wrong, perhaps I use names "Presentation" and "Commands" wrongfully.

     

    Could you please look how is correctly compose the request to insert another printout on existed page.

     

    Thanks in advance.

     

    SlavaS1_0-1659293259017.png

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-xiaochen-msft 

     

    Thanks for this solution. this works perfectly for me. However, we have to update content of a pdf again after page is created.

    How can we add printouts in already created one note page.?

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 253 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 172 Super User 2026 Season 2

#3
trice602 Profile Picture

trice602 134 Super User 2026 Season 2

Last 30 days Overall leaderboard