diff --git a/electron/src/ipc/print.ts b/electron/src/ipc/print.ts index aa19f554c..c4bf5d3c0 100644 --- a/electron/src/ipc/print.ts +++ b/electron/src/ipc/print.ts @@ -2,9 +2,9 @@ import { Messages } from "../shared/ipc" import { getOpenWindows } from "../window" import { expose } from "./_ipc" -expose(Messages.Print, () => { +expose(Messages.Print, (options?: Electron.WebContentsPrintOptions) => { const windows = getOpenWindows() if (windows.length) { - windows[0].webContents.print() + windows[0].webContents.print(options) } }) diff --git a/shared/types/ipc.d.ts b/shared/types/ipc.d.ts index b60d7a22a..6b39e4b79 100644 --- a/shared/types/ipc.d.ts +++ b/shared/types/ipc.d.ts @@ -63,7 +63,7 @@ declare namespace IPC { [Messages.OpenLink]: (href: string) => void - [Messages.Print]: (content: string | undefined, options: object | undefined) => void + [Messages.Print]: (options: object | undefined, content: string | undefined) => void [Messages.DeepLinkURL]: () => string diff --git a/src/AccountSettings/components/ExportKeyDialog.tsx b/src/AccountSettings/components/ExportKeyDialog.tsx index 435dab7d2..780431019 100644 --- a/src/AccountSettings/components/ExportKeyDialog.tsx +++ b/src/AccountSettings/components/ExportKeyDialog.tsx @@ -31,7 +31,7 @@ const printOptions = orientation: "landscape", pageCount: 1 } - : {} + : { landscape: true } interface PromptToRevealProps { children: React.ReactNode diff --git a/src/App/cordova/print.ts b/src/App/cordova/print.ts index 4e27442d3..e973919c4 100644 --- a/src/App/cordova/print.ts +++ b/src/App/cordova/print.ts @@ -8,5 +8,5 @@ function print(content?: string, options?: object) { } export default function initializePrinter() { - expose(Messages.Print, (storage, keystore, content, options) => print(content, options)) + expose(Messages.Print, (storage, keystore, options, content) => print(content, options)) } diff --git a/src/Platform/print.ts b/src/Platform/print.ts index 976fe4b41..e683ec728 100644 --- a/src/Platform/print.ts +++ b/src/Platform/print.ts @@ -2,5 +2,5 @@ import { Messages } from "~shared/ipc" import { call } from "./ipc" export async function print(options?: object, content?: string) { - return call(Messages.Print, content, options) + return call(Messages.Print, options, content) }