feat(pdf): add configurable PDF export and improve print rendering
This commit is contained in:
@@ -51,6 +51,13 @@ The selected interface language is stored in the browser and can be changed from
|
||||
- Alert blocks: `success`, `info`, `warning`, and `danger`.
|
||||
- Table of contents generated with `[TOC]`, using headings after the marker and nesting them by level.
|
||||
- Optional line numbers in fenced code blocks.
|
||||
- PDF export with selectable A5/A4/A3, Letter, 16:9, and 4:3 page formats; optional color/background preservation keeps syntax highlighting, alerts, quotes, highlights, and table styling; `---` creates a hard PDF page break.
|
||||
|
||||
## 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.
|
||||
|
||||
A Markdown line containing only `---` is treated as a page break during PDF export. Insert it from **More → Page break (PDF)** or with `Ctrl/Cmd+Enter`. In the editor preview it remains visible as a dashed horizontal divider.
|
||||
|
||||
## Fenced code blocks and language aliases
|
||||
|
||||
|
||||
Reference in New Issue
Block a user