From 9c4535badea54d06f2dc08d3f065a0249ad54a94 Mon Sep 17 00:00:00 2001 From: Adorian Doran Date: Sat, 1 Feb 2025 16:31:25 +0200 Subject: [PATCH 1/3] desktop app(export pdf): enable document outline and PDF tags generation --- src/services/window.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/services/window.ts b/src/services/window.ts index d8f86379f..ff391875b 100644 --- a/src/services/window.ts +++ b/src/services/window.ts @@ -76,6 +76,8 @@ ipcMain.on("export-as-pdf", async (e, opts: ExportAsPdfOpts) => { try { buffer = await browserWindow.webContents.printToPDF({ landscape: opts.landscape, + generateDocumentOutline: true, + generateTaggedPDF: true, displayHeaderFooter: true, headerTemplate: `
`, footerTemplate: ` From 8b8f0c289e9a1a71cd197f1686efbeee500c5bc9 Mon Sep 17 00:00:00 2001 From: Adorian Doran Date: Sat, 1 Feb 2025 16:51:04 +0200 Subject: [PATCH 2/3] client(print): use a different base font size --- src/public/stylesheets/print.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/public/stylesheets/print.css b/src/public/stylesheets/print.css index 34521d733..1f6fdc287 100644 --- a/src/public/stylesheets/print.css +++ b/src/public/stylesheets/print.css @@ -4,6 +4,12 @@ --launcher-pane-background-color: var(--main-background-color); --main-text-color: black; --input-text-color: var(--main-text-color); + + --print-font-size: 11pt; +} + +.ck-content { + font-size: var(--print-font-size); } .no-print, From f2cc98eeec8d611fdf4150364ddb4e0f397f0edc Mon Sep 17 00:00:00 2001 From: Adorian Doran Date: Sat, 1 Feb 2025 16:58:52 +0200 Subject: [PATCH 3/3] client(print): fix the content having a left margin when the note is read-only --- src/public/stylesheets/print.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/public/stylesheets/print.css b/src/public/stylesheets/print.css index 1f6fdc287..74153b94c 100644 --- a/src/public/stylesheets/print.css +++ b/src/public/stylesheets/print.css @@ -12,6 +12,10 @@ font-size: var(--print-font-size); } +.note-detail-readonly-text { + padding: 0 !important; +} + .no-print, .no-print *, .tab-row-container,