bcf
bcf

Reputation: 2134

Auto-Convert OneNote to PDF

I am trying to automatically convert some Microsoft OneNote files to PDF to send as a daily email attachment. I have thought of two systematic solutions but need some help in finding the right tools:

  1. Find an application that may be programmatically called (via a Python script e.g.) that will convert a Microsoft OneNote file to a PDF.
  2. Find a way for OneNote to automatically save files as PDFs every time it auto-saves.

Is anyone aware of tools available for either solution?

Upvotes: 0

Views: 1605

Answers (1)

codeye
codeye

Reputation: 627

See my answer to your other question
The approach would be to get the pages content with

./me/onenote/pages/1-1c13bcbae2fdd747a95b3e5386caddf1!1-xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx/content?includeIDs=true&includeInkML=true&preAuthenticated=true

and then render the html on a canvas with javascript/jquery.
render ink with InkMLjs
and then use a library to convert the canvas to a pdf for example with canvas2pdf

Another approach might be something like Automator for osx. You could get the pages of interest with the microsoft-graph api, open them in a web browser using applescript and when the page has finished rendering -> print -> "Save as PDF"

Upvotes: 0

Related Questions