Search code examples
imagepdfonenote

PDF rendering in onenote


I am creating onenote pages using the microsoft graph api. I try to display a pdf using the method found on the site https://learn.microsoft.com/en-us/graph/onenote-images-files#add-images-of-pdf-file-contents. However, it comes only as an attachment and does not render the pdf, like if I did a printout insertion in onenote. Has anyone encountered this and has anyone have some sample code if you did? Thanks


Solution

  • The tag to embed the PDF as an image is <img data-render-src="name:FileBlock" /> (replace name:FileBlock with whatever the name of that form part is).