🐛 设置访问授权码后无法导出 PDF https://github.com/siyuan-note/siyuan/issues/5959

This commit is contained in:
Liang Ding 2022-09-25 22:13:34 +08:00
parent 30535ba6af
commit 8e62f4c625
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -2,7 +2,7 @@ import {hideMessage, showMessage} from "../../dialog/message";
import {Constants} from "../../constants";
/// #if !BROWSER
import {OpenDialogReturnValue} from "electron";
import {BrowserWindow, dialog} from "@electron/remote";
import {BrowserWindow, dialog, app} from "@electron/remote";
import * as fs from "fs";
import * as path from "path";
import {afterExport} from "./util";
@ -86,6 +86,8 @@ const renderPDF = (id: string) => {
webSecurity: false,
},
});
window.siyuan.printWin.webContents.userAgent = 'SiYuan/' + app.getVersion() + ' https://b3log.org/siyuan Electron'
let pdfWidth = "";
if (localData.pageSize === "A3") {
if (localData.landscape) {