0

When i add a PDF to a OneNote page as a multipart request it seems like the ordering of the pages are sorted alphabetically instead of lexical order. The pages in the PDF are numbered (1-22) but when the page has been updated with the content from the PDF, the order of the images are 1, 10, 11, 12..2, 20, 21, 22)

I am using this as a reference: https://learn.microsoft.com/en-us/graph/onenote-images-files#add-images-of-pdf-file-contents

How can i prevent or control this behaviour?

EirikSF
  • 31
  • 1
  • 5
  • This is an error in the Graph API. – EirikSF Sep 15 '20 at 14:08
  • I've not experienced that behaviour. Do you have an example request? – codeye Oct 29 '20 at 16:16
  • I am using the sample provided by Microsoft, see the link in the original post. Microsoft has confirmed that this is an issue, and has created an issue for the backlog for Graph API. However, if you have an working solution i am very curious about how you add pages to onenote, bacause i want to have a working solution asap. – EirikSF Oct 30 '20 at 23:31

1 Answers1

1

I just tried a 22 page pdf - Wow! All of the pdfs I upload are less than 10 pages in length - I have never noticed this. Given the behaviour is predictable I guess the 2 "automated options" available are to split pdfs that are greater than 9 pages into separate pdfs each 9 pages or less and upload them sequentially maximum number 6 at a time (54 pages) or to disassemble the pdf then reassemble it in such a way that page 2 -> page 10, page 3 -> page 11, etc.

codeye
  • 607
  • 3
  • 10
  • For our part its not acceptable to split the pdfs into different pages. What we are doing for pdf that exceed the 4MB size limit, or the 30 (?) page limit, are that we are adding a link to the pdf stored in the same Sharepoint site, but outside OneNote. But now we are setting the page limit at 9 pages. – EirikSF Nov 01 '20 at 13:03