diff --git a/Cargo.lock b/Cargo.lock
index de715a3..60be62c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2674,7 +2674,7 @@ dependencies = [
[[package]]
name = "rustpad"
-version = "0.2.94"
+version = "0.2.95"
dependencies = [
"argon2",
"aws-config",
diff --git a/Cargo.toml b/Cargo.toml
index 4e6595e..8126f5e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "rustpad"
-version = "0.2.94"
+version = "0.2.95"
edition = "2024"
rust-version = "1.94"
description = "Collaborative Markdown notepad built with Axum, WebSockets and SQLite, PostgreSQL and MySQL"
diff --git a/README.md b/README.md
index fcb5541..16ae99d 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,13 @@
RustPad is a collaborative Markdown editor with standalone notes and workspaces.
+## Release 0.2.95 — dark PDF export
+
+- PDF export now includes a dark-mode checkbox enabled by default.
+- Exported PDFs use the selected light/dark mode consistently for content, syntax highlighting, and Mermaid diagrams; colors and backgrounds are preserved automatically.
+- PDF margins are selectable again (0 / 8 / 12 / 20 mm) and are applied to every page format, including 16:9 and 4:3 presentation pages.
+- PDF pagination keeps short lists, short code blocks, and heading lead-ins together when possible to avoid awkward splits between pages.
+
## Release 0.2.94 — authentication session handling
- `GET /api/auth/session` checks the visitor's login state: `200 {"authenticated":false,"session":null}` for guests, missing/expired cookies, or logged-out users; `200 {"authenticated":true,"session":{...}}` for a valid account session. The response is never cached. Expired cookies are cleared; valid session cookies are refreshed as before.
@@ -71,7 +78,7 @@ The selected interface language is stored in the browser and can be changed from
## PDF export and page breaks
-Use the **PDF** button in the editor header to choose the page format and margins, then generate a browser-native PDF print view. The export supports A5/A4/A3, Letter, 16:9, and 4:3 layouts. Enable **Preserve colors and backgrounds** to keep syntax highlighting, alerts, quotes, highlighted text, table headers, inline code, links, and other styled Markdown elements. The exporter re-applies Highlight.js to the print copy and uses a print-safe light color palette so code colors do not depend on the editor theme. The end of the exported document includes one subtle localized RustPad footer.
+Use the **PDF** button in the editor header to choose the page format and margins, then generate a browser-native PDF print view. The export supports A5/A4/A3, Letter, 16:9, and 4:3 layouts. Syntax highlighting, alerts, quotes, highlighted text, table headers, inline code, links, and other styled Markdown elements keep their colors and backgrounds automatically. The exporter re-applies Highlight.js to the print copy and uses print-safe light/dark palettes so code colors do not depend on the editor theme. The end of the exported document includes one subtle localized RustPad footer.
A Markdown line containing only `[PAGEBREAK]` creates an explicit page break during PDF export. Insert it from **More → Page break (PDF)** or with `Ctrl/Cmd+Enter`. A normal `---` remains a Markdown horizontal rule and no longer forces a new PDF page.
diff --git a/lang/en.json b/lang/en.json
index 5e3f3e3..8dd89ba 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -388,8 +388,7 @@
"editor.pageBreakShortcut": "Page break (PDF) · Ctrl/Cmd+Enter",
"editor.pageFormat": "Page format",
"editor.pdfPageBreakHelp": "Use Page break (PDF) or Ctrl/Cmd+Enter to start a new PDF page.",
- "editor.preservePdfColors": "Preserve colors and backgrounds",
- "editor.pdfColorHelp": "Keeps syntax highlighting, alerts, quotes, highlights, table headers, and other colors in the PDF.",
+ "editor.darkPdf": "Dark PDF",
"editor.pdfPrintHelp": "The browser print dialog will open. Choose Save as PDF.",
"editor.pdfGeneratedFooter": "Generated by RustPad",
"editor.presentation16x9": "16:9 — Presentation",
diff --git a/lang/pl.json b/lang/pl.json
index afaf730..29e511f 100644
--- a/lang/pl.json
+++ b/lang/pl.json
@@ -388,8 +388,7 @@
"editor.pageBreakShortcut": "Podział strony (PDF) · Ctrl/Cmd+Enter",
"editor.pageFormat": "Format strony",
"editor.pdfPageBreakHelp": "Użyj opcji Podział strony (PDF) lub Ctrl/Cmd+Enter, aby rozpocząć nową stronę PDF.",
- "editor.preservePdfColors": "Zachowaj kolory i tła",
- "editor.pdfColorHelp": "Zachowuje w PDF kolorowanie składni, alerty, cytaty, wyróżnienia, nagłówki tabel i inne kolory.",
+ "editor.darkPdf": "Ciemny PDF",
"editor.pdfPrintHelp": "Otworzy się okno drukowania przeglądarki. Wybierz Zapisz jako PDF.",
"editor.pdfGeneratedFooter": "Wygenerowano przez RustPad",
"editor.presentation16x9": "16:9 — prezentacja",
@@ -1020,4 +1019,4 @@
"home.account.loading": "Sprawdzanie konta...",
"home.account.retry": "Odśwież stronę"
}
-}
\ No newline at end of file
+}
diff --git a/static/css/styles.css b/static/css/styles.css
index 70bf1ec..1c4851e 100644
--- a/static/css/styles.css
+++ b/static/css/styles.css
@@ -9186,7 +9186,7 @@ dialog::backdrop {
.pdf-export-fields {
display: grid;
- grid-template-columns: minmax(0, 1fr) minmax(150px, .62fr);
+ grid-template-columns: 1fr;
gap: 12px;
}
@@ -9209,22 +9209,17 @@ dialog::backdrop {
gap: 9px;
}
-.pdf-export-color-toggle,
+.pdf-export-dark-toggle,
.pdf-export-title-toggle {
width: fit-content;
}
-.pdf-export-color-help,
.pdf-export-help {
color: var(--muted);
font-size: .78rem;
line-height: 1.45;
}
-.pdf-export-color-help {
- margin: -6px 0 0 24px;
-}
-
#pdf-export-dialog .dialog-actions .primary-button {
width: auto;
min-width: 132px;
diff --git a/static/editor.html b/static/editor.html
index 852ffc5..0ee8f36 100644
--- a/static/editor.html
+++ b/static/editor.html
@@ -316,20 +316,18 @@
+
-
-
Keeps syntax highlighting, alerts, quotes,
- highlights, table headers, and other colors in the PDF.
The browser print dialog will open. Choose Save as PDF.