diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Notes/Printing & Exporting as PDF.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Notes/Printing & Exporting as PDF.html index bf04b3afc..dbb508461 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Notes/Printing & Exporting as PDF.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Notes/Printing & Exporting as PDF.html @@ -4,7 +4,6 @@
Screenshot of the note contextual menu indicating the “Export as PDF” option.
-

Printing

This feature allows printing of notes. It works on both the desktop client, but also on the web.

@@ -60,9 +59,9 @@ class="admonition note"> orientation, size. However, there are a few Attributes to adjust some of the settings:

@@ -76,9 +75,9 @@ class="admonition note"> href="#root/_help_4TIF1oA4VQRO">Options and assigning a key combination for:

Constraints & limitations

@@ -86,27 +85,58 @@ class="admonition note"> supported when printing, in which case the Print and Export as PDF options will be disabled.

+

Customizing the print CSS

+

As an advanced use case, it's possible to customize the CSS used for printing + such as adjusting the fonts, sizes or margins. Note that Custom app-wide CSS will + not work for printing.

+

To do so:

+ +

For example, to change the font of the document from the one defined by + the theme or the user to a serif one:

body {
+	--main-font-family: serif !important;
+    --detail-font-family: var(--main-font-family) !important;
+}
+

To remark:

+

Under the hood

Both printing and exporting as PDF use the same mechanism: a note is rendered individually in a separate webpage that is then sent to the browser or diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Theme development/Custom app-wide CSS.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Theme development/Custom app-wide CSS.html index 190a542f0..acdfa774d 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Theme development/Custom app-wide CSS.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Theme development/Custom app-wide CSS.html @@ -43,7 +43,7 @@

Since v0.99.2, it's no longer possible to use #appCss to customize the printing CSS, since the printing is now done in an isolated environment.

However, it's still possible to customize the CSS via ~printCss; - see Printing and exporting to PDF for + see Printing & Exporting as PDF for more information.

Per-workspace styles

diff --git a/docs/Developer Guide/Developer Guide/Concepts/Printing and exporting to PDF.md b/docs/Developer Guide/Developer Guide/Concepts/Printing and exporting to PDF.md index 4db40a295..ad057206b 100644 --- a/docs/Developer Guide/Developer Guide/Concepts/Printing and exporting to PDF.md +++ b/docs/Developer Guide/Developer Guide/Concepts/Printing and exporting to PDF.md @@ -15,28 +15,4 @@ Syntax highlighting for code blocks is supported as well: * It works by injecting a Highlight.js stylesheet into the print. * The theme used is hard-coded (the _Visual Studio Light theme_, at the time of writing) in order not to have a dark background in print. -* Syntax highlighting is handled by the content renderer. - -## Customizing the print CSS - -As an advanced use case, it's possible to customize the CSS used for printing such as adjusting the fonts, sizes or margins. Note that Custom app-wide CSS will not work for printing. - -To do so: - -* Create a CSS [code note](#root/pOsGYCXsbNQG/KSZ04uQ2D1St/6f9hih2hXXZk). -* On the note being printed, apply the `~printCss` relation to point to the newly created CSS code note. -* To apply the CSS to multiple notes, consider using [inheritable attributes](#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/bwZpz2ajCEwO) or Templates. - -For example, to change the font of the document from the one defined by the theme or the user to a serif one: - -``` -body { - --main-font-family: serif !important; - --detail-font-family: var(--main-font-family) !important; -} -``` - -To remark: - -* Multiple CSS notes can be add by using multiple `~printCss` relations. -* If migrating from a previous version where Custom app-wide CSS, there's no need for `@media print {`  since the style-sheet is used only for printing. \ No newline at end of file +* Syntax highlighting is handled by the content renderer. \ No newline at end of file diff --git a/docs/User Guide/!!!meta.json b/docs/User Guide/!!!meta.json index 057df9c87..27f4866db 100644 --- a/docs/User Guide/!!!meta.json +++ b/docs/User Guide/!!!meta.json @@ -4078,6 +4078,20 @@ "value": "printing-and-pdf-export", "isInheritable": false, "position": 110 + }, + { + "type": "relation", + "name": "internalLink", + "value": "bwZpz2ajCEwO", + "isInheritable": false, + "position": 120 + }, + { + "type": "relation", + "name": "internalLink", + "value": "KC1HB96bqqHX", + "isInheritable": false, + "position": 130 } ], "format": "markdown", @@ -11006,6 +11020,13 @@ "value": "bx bxs-file-css", "isInheritable": false, "position": 50 + }, + { + "type": "relation", + "name": "internalLink", + "value": "NRnIZmSMc5sj", + "isInheritable": false, + "position": 60 } ], "format": "markdown", diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Printing & Exporting as PDF.md b/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Printing & Exporting as PDF.md index 27d5326d6..21fbe12e6 100644 --- a/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Printing & Exporting as PDF.md +++ b/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Printing & Exporting as PDF.md @@ -64,11 +64,36 @@ Not all Note Types  * Line numbers are not printed. * Syntax highlighting is enabled, however a default theme (Visual Studio) is enforced. * For Collections: - * Only Presentation View is currently supported. + * Only Presentation is currently supported. * We plan to add support for all the collection types at some point. * Using Custom app-wide CSS for printing is not longer supported, due to a more stable but isolated mechanism. * We plan to introduce a new mechanism specifically for a print CSS. +## Customizing the print CSS + +As an advanced use case, it's possible to customize the CSS used for printing such as adjusting the fonts, sizes or margins. Note that Custom app-wide CSS will not work for printing. + +To do so: + +* Create a CSS [code note](../../Note%20Types/Code.md). +* On the note being printed, apply the `~printCss` relation to point to the newly created CSS code note. +* To apply the CSS to multiple notes, consider using [inheritable attributes](../../Advanced%20Usage/Attributes/Attribute%20Inheritance.md) or Templates. + +For example, to change the font of the document from the one defined by the theme or the user to a serif one: + +``` +body { + --main-font-family: serif !important; + --detail-font-family: var(--main-font-family) !important; +} +``` + +To remark: + +* Multiple CSS notes can be add by using multiple `~printCss` relations. +* If the note pointing to the `printCss` doesn't have the right note type or mime type, it will be ignored. +* If migrating from a previous version where Custom app-wide CSS, there's no need for `@media print {`  since the style-sheet is used only for printing. + ## Under the hood Both printing and exporting as PDF use the same mechanism: a note is rendered individually in a separate webpage that is then sent to the browser or the Electron application either for printing or exporting as PDF. diff --git a/docs/User Guide/User Guide/Theme development/Custom app-wide CSS.md b/docs/User Guide/User Guide/Theme development/Custom app-wide CSS.md index 62e5b4c63..05ae225da 100644 --- a/docs/User Guide/User Guide/Theme development/Custom app-wide CSS.md +++ b/docs/User Guide/User Guide/Theme development/Custom app-wide CSS.md @@ -18,7 +18,7 @@ Adding a new _app CSS note_ or modifying an existing one does not immediately ap > [!TIP] > Since v0.99.2, it's no longer possible to use `#appCss` to customize the printing CSS, since the printing is now done in an isolated environment. > -> However, it's still possible to customize the CSS via `~printCss`; see Printing and exporting to PDF for more information. +> However, it's still possible to customize the CSS via `~printCss`; see Printing & Exporting as PDF for more information. ### Per-workspace styles