summaryrefslogtreecommitdiff
path: root/electron/src/main/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'electron/src/main/index.js')
-rw-r--r--electron/src/main/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/electron/src/main/index.js b/electron/src/main/index.js
index 09fd2959..d6f259fe 100644
--- a/electron/src/main/index.js
+++ b/electron/src/main/index.js
@@ -80,7 +80,9 @@ app.on('activate', () => {
ipcMain.on('save-pdf', function (event, pageSize) {
mainWindow.webContents.printToPDF({"pageSize": pageSize}, function(error, data) {
- dialog.showSaveDialog(mainWindow, {"defaultPath": "inkstitch.pdf"}, function(filename, bookmark) {
+ dialog.showSaveDialog(mainWindow, {"defaultPath": "inkstitch.pdf",
+ "filters": [{ name: 'PDF', extensions: ['pdf'] }]
+ }, function(filename, bookmark) {
if (typeof filename !== 'undefined')
fs.writeFileSync(filename, data, 'utf-8');
})