[Vuejs]-Electron adding files to public folder after build fails

0👍

i’ve found a solution:
the client can put his files now in a folder "pdf" on the desktop. Inside of this folder are also the necessary files of PDF.js.
The path to the desktop on MAC and Windows is

const desktopPath = app.getPath('desktop')

so now i can

window.open('file://' + desktopPath + '/pdf/web/viewer.html?file=' + url)

while url holds the path to the pdf.

Leave a comment