mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-06 07:31:48 +01:00
🎨 导出 PDF 时支持将资源文件作为附件嵌入 https://github.com/siyuan-note/siyuan/issues/7414
This commit is contained in:
parent
c0c605b664
commit
f003aac384
6 changed files with 9 additions and 9 deletions
|
|
@ -3,7 +3,7 @@ import {exportLayout, getInstanceById, JSONToLayout, resetLayout, resizeDrag, re
|
|||
import {hotKey2Electron, setStorageVal, updateHotkeyTip} from "../protyle/util/compatibility";
|
||||
/// #if !BROWSER
|
||||
import {dialog, getCurrentWindow} from "@electron/remote";
|
||||
import {webFrame, ipcRenderer, OpenDialogReturnValue} from "electron";
|
||||
import {ipcRenderer, OpenDialogReturnValue, webFrame} from "electron";
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
import {afterExport} from "../protyle/export/util";
|
||||
|
|
@ -418,7 +418,7 @@ export const initWindow = () => {
|
|||
const pdfFilePath = path.join(result.filePaths[0], replaceLocalPath(ipcData.rootTitle) + ".pdf");
|
||||
fs.writeFileSync(pdfFilePath, pdfData);
|
||||
window.siyuan.printWin.destroy();
|
||||
fetchPost("/api/export/addPDFOutline", {
|
||||
fetchPost("/api/export/processPDF", {
|
||||
id: ipcData.rootId,
|
||||
merge: ipcData.mergeSubdocs,
|
||||
path: pdfFilePath
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue