You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an optional parameter to the constructor containing the data directory. If absent the directory defaults to __dirname/data.
Around line 5814 add: this.dataDir = options.dataDir || "__dirname/data";
Change the 15 lines containing __dirname accordingly.
This change is useful because in an ElectronJS application bundled by Vite the __dirname points to dist-electron but the data dir is /node_modules/pdfkit/js/data and haven't found a way to relocate it to dist-electron.
Activity
blikblum commentedon Apr 25, 2025
This is a workaround
I will do a properly fix (do not rely on fs on non browser environments)