Auto-Convert OneNote to PDF - onenote

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:
Find an application that may be programmatically called (via a Python script e.g.) that will convert a Microsoft OneNote file to a PDF.
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?

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"

Related

Dynamic PDF Generation from Salesforce Data

I'm looking for some recommendations on a solution to build dynamic PDFs using salesforce object data. We currently have a layout designed in photoshop, that we're looking to import into Salesforce and fill in various snippets/images based on data that lies within an object. The final product should come out as a PDF
I started building this using Adobe XFDF. I exported the PSD as a PDF and created a fillable form from it. This was then populated from an XFDF file generated from Salesforce. This does work but the design issues with fillable forms, requirement for acrobat pro on every system that uses it and the lack of support for referencing file templates that are not local have killed this. One of these issues alone wouldn't be deal breakers, but all 3 combined are too much to overcome.
While this is mostly all sorted out on the Salesforce side, I'm not sure of the best way to proceed with this when it comes to PDF generation, here are a couple of ideas that might work, but I don't have enough experience to be sure:
Generate HTML/CSS File from PSD file, upload to salesforce, modify html file within salesforce, send to PDF generation API - adobe api looks promising for this, but can I send over html and css files together to generate a single PDF?
Use Salesforce PDF tools to generate PDF, will need to modify visualforce page to the same design as reference design in PSD.
Use some sort of third party PDF generator tool that will allow me to reference my current design as a template.
I'm open to any suggestions, Thanks!
In salesforce, PDF can be generated without using any app. Check out the official document by Salesforce.
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_output_pdf_renderas.htm
A quick start guide How to generate PDF in Salesforce
It does not require any purchase or separate license. If you are looking specifically an App, it can be found on app exchange.
https://appexchange.salesforce.com/appxSearchKeywordResults?keywords=pdf%20generator

Print Multiple HTML files automatically using a printer/Network Printer

I looking for a solution to print multiple HTML files/URLs to print automatically from the printer with Just one click from my custom android app.
So earlier I use to print these multiple files using Google Cloud API. So using that API we use to add those files to the Google cloud and then Google Cloud automatically prints those HTML files from the printer which is configured. Since Google cloud is no more available to use so I am looking for an automatic solution.
Is there any solution for printing multiple HTML files using EPSON printer tm-t20 by using some API OR some android code which I can integrate to print these HTML automatically?
This is a very broad question. I suggest asking a series of more focussed questions to get specific answers to the various problems you are faced with. Anyway here are some ideas for you...
There are a few things going on here. You need to process a URL, convert that URL into something printable (probably a PDF file) and then automate the printing of it on your Epson printer.
Software is available to automatically print documents that appear in a folder on your network, so you can use that kind of thing to print PDFs. Google "automatically print pdf files in folder" and find something that will work with your printer.
For the other problem of getting something printable from a URL, I presume you do not wish to code up your own solution, so perhaps you can find an App to render HTML to PDF and save the file to a folder or network location. Have a look at IFTT, there is an app there called Pocket, that can convert a URL to PDF and save it to Google Drive. If you link Google Drive to the folder on your network that automatically prints documents, perhaps you will have a solution!
You can use ezeep print api it is a replacement for gooogle ckoud print,
I'm the developer community manager I help people with the api integrations and the pai is pretty easy to use . check it out at ezeep.com
let me know if oyu need help

Programatically send a copy of a local file system notebook to Onedrive Onenote

Locally, I have several OneNote notebooks in the OneNote 2007 format. For reasons out of scope it is difficult to convert them to the new format first.
I want to be able to send a copy of the notebook to OneNote Online so that I can read-only it from wherever OneNote Online is accessible.
Programmatically, I have used the OneNote desktop API to export a page as an MHT file. Then I have used further code to convert the MHT to an HTML file. Finally, I then used MS graph explorer (because I haven't written that part of the code yet), to create a new OneNoteAPI page with the HTML that I exported.
I had expected the resulting page in OneNote Online to look like the HTML I had just uploaded.
It .. did not.
a) Where before I had a nice OneNote list with checkboxes I now had them laid out vertically. So checkbox\nitem\ncheckbox\item.
b) The title box that was exported as part of the HTML .. remained in its place and the new page did not absorb it into its title box.
So, how can I programmatically send a page from a desktop OneNote to a OneNote Online folder and have it look the same?
NB: I actually want to send the entire notebook but am trying one page at a time.
NB2: I cannot port all the notebooks to OneNote online once off and then just use that. They need to live in the local network.
NB3: I suppose I could just set up an FTP site with the HTML pages that I just exported - that is plan Z.
Thank you

Generating a web site from xsn files

As we all know, the infopath forms service residing on a sharepoint server generates a web site each time we publish an inforpath form template to the sharepoint server.
Here is the question: how does sharepoint do that. Is there any way for us to do that programmatically via some kind of api provided by MS?
In fact, what I need to do is getting all the html, js, css etc. files and applying some kind of operations like deleting some divs or insert some html code into the particular web page. I have come up with two ways to do this.
Generating the web page via sharepoint api and apply those operations at the same time
Extracting the web page files from the IIS server and apply those operations
I am totally new to this kind of work. All in my mind is that each time we right click on a web page in the browser and choose to save the web page, the browser gets some of the files we need to render the web page and makes it possible for us to browse the web page offline.
httrack
WinWSD
and tools like that seems to work fine with extracting html files from online web pages but not that well with js, css files.
Now I am trying to dig into the chromium project for some kind of inspiration, although whether it helps or not is unpredictable.
Any kind of advice will be appreciated.
Best Regards,
Jordan
Infopath xsn files are just zip files with a different extension. you can rename the extension to .zip and extract out the files. you will find a number of files that make up the form. the two main ones are the .xml and .xsl files. the .xsl will have the html to generate when applied to the xml.

How to generate preview of documents saved in google drive?

I am trying trying to create a preview of a document saved in google drive using google viewer with -
https://docs.google.com/viewer?authuser=0&srcid={some document id}&pid=explorer&a=v&chrome=false&embedded=true
Unfortunately it only works for pdf files. The other important point is that I want to do it without making the uploaded document public.
For get PDF file preview you can use below link :
https://lh3.google.com/u/0/d/]{FILEID}=w200-h150-p-k-nu-iv1
for example : https://lh3.google.com/u/0/d/0BwVBMmQvtcsJUkNSVFllbjRLMzZab0haTEtLajE1M2haekZj=w200-h150-p-k-nu-iv1
Drive/docs only supports importing of Word documents, as I understand, it doesn't support previewing on them in their native form. So you would have to use the Google Documents List API to import and convert them to the native Google Document text format. The problem with this is that you don't get a round-trip (you can't reopen that document in Word). The only real option here is to export as pdf from word and save that. And if you want the general public to be able to preview it, making it public is the only solution. I don't think the technologies you're using match the problem you're trying to solve...
Try using this URL for PDF: http://docs.google.com/viewer?url=https%3A%2F%2Fdocs.google.com%2Fuc%3Fexport%3Ddownload%26id%3D{fileID}&embedded=true
and this URL for other files: https://docs.google.com/viewer?url=https%3A%2F%2Fdocs.google.com%2Fdocument%2Fd%2F{fileID}%2Fexport%3Fformat=pdf&embedded=true
Keep in mind that files should be public.