mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-05 00:08:49 +01:00
🎨 导出 PDF 预览界面不受主界面缩放影响 Fix https://github.com/siyuan-note/siyuan/issues/6262
This commit is contained in:
parent
2e160b93fd
commit
4ceae7fd1b
1 changed files with 4 additions and 1 deletions
|
|
@ -2,7 +2,7 @@ import {hideMessage, showMessage} from "../../dialog/message";
|
|||
import {Constants} from "../../constants";
|
||||
/// #if !BROWSER
|
||||
import {OpenDialogReturnValue} from "electron";
|
||||
import {BrowserWindow, dialog, app} from "@electron/remote";
|
||||
import {app, BrowserWindow, dialog} from "@electron/remote";
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
import {afterExport} from "./util";
|
||||
|
|
@ -382,6 +382,9 @@ const renderPDF = (id: string) => {
|
|||
},
|
||||
});
|
||||
window.siyuan.printWin.webContents.userAgent = `SiYuan/${app.getVersion()} https://b3log.org/siyuan Electron`;
|
||||
window.siyuan.printWin.once("ready-to-show", () => {
|
||||
window.siyuan.printWin.webContents.setZoomFactor(1);
|
||||
})
|
||||
fetchPost("/api/export/exportTempContent", {content: html}, (response) => {
|
||||
window.siyuan.printWin.loadURL(response.data.url);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue