默认打印机

This commit is contained in:
xianyi
2025-11-27 15:35:36 +08:00
parent b192e1bae9
commit 86efd6281a
3 changed files with 56 additions and 10 deletions

View File

@@ -4,7 +4,9 @@ contextBridge.exposeInMainWorld("electronAPI", {
// 获取PDF绕过CORS
fetchPdf: (pdfUrl) => ipcRenderer.invoke("fetch-pdf", pdfUrl),
// 打印PDF
printPdf: (pdfUrl) => ipcRenderer.invoke("print-pdf", pdfUrl),
printPdf: (pdfUrl, options) => ipcRenderer.invoke("print-pdf", pdfUrl, options),
// 获取打印机列表
getPrinters: () => ipcRenderer.invoke("get-printers"),
startIdCardListen: () => ipcRenderer.invoke("start_idcard_listen"),
stopIdCardListen: () => ipcRenderer.invoke("stop_idcard_listen"),
onIdCardData: (callback) =>