I am trying to create an Electron JS app that has the purpose to print letter size PDFs.
This is my snippet of code for printing:
win = new BrowserWindow
The easiest way to do this is to render the PDF pages to individual canvas elements on a page using PDF.js and then call print.
I fixed this gist to use the PDF.js version (v1) it was designed for and its probably a good starting point.
This is essentially what the electron/chrome pdf viewer is doing but now you have full control over the layout!