mirror of
https://github.com/zadam/trilium.git
synced 2026-01-02 20:54:24 +01:00
docs(user): mention new printing limitations
This commit is contained in:
parent
b49ca3efe3
commit
662423221e
@ -4,7 +4,6 @@
|
||||
<figcaption>Screenshot of the note contextual menu indicating the “Export as PDF”
|
||||
option.</figcaption>
|
||||
</figure>
|
||||
|
||||
<h2>Printing</h2>
|
||||
<p>This feature allows printing of notes. It works on both the desktop client,
|
||||
but also on the web.</p>
|
||||
@ -53,18 +52,27 @@ class="admonition note">
|
||||
the default application might seem incorrect (such as opening in GIMP).
|
||||
This is because it uses Gnome's “Recommended applications” list.</p>
|
||||
<p>To solve this, you can change the recommended application for PDFs via
|
||||
this command line. First, list the available applications via <code>gio mime application/pdf</code> and
|
||||
this command line. First, list the available applications via <code spellcheck="false">gio mime application/pdf</code> and
|
||||
then set the desired one. For example to use GNOME's Evince:</p><pre><code class="language-text-x-trilium-auto">gio mime application/pdf</code></pre>
|
||||
<h3>Customizing exporting as PDF</h3>
|
||||
<p>When exporting to PDF, there are no customizable settings such as page
|
||||
orientation, size. However, there are a few <a class="reference-link"
|
||||
href="#root/_help_zEY4DaJG4YT5">Attributes</a> to adjust some of the settings:</p>
|
||||
<ul>
|
||||
<li>To print in landscape mode instead of portrait (useful for big diagrams
|
||||
or slides), add <code>#printLandscape</code>.</li>
|
||||
<li>By default, the resulting PDF will be in Letter format. It is possible
|
||||
to adjust it to another page size via the <code>#printPageSize</code> attribute,
|
||||
with one of the following values: <code>A0</code>, <code>A1</code>, <code>A2</code>, <code>A3</code>, <code>A4</code>, <code>A5</code>, <code>A6</code>, <code>Legal</code>, <code>Letter</code>, <code>Tabloid</code>, <code>Ledger</code>.</li>
|
||||
<li data-list-item-id="eec9214505f224e0ef7d50955357f6f52">To print in landscape mode instead of portrait (useful for big diagrams
|
||||
or slides), add <code spellcheck="false">#printLandscape</code>.</li>
|
||||
<li
|
||||
data-list-item-id="ebc1a98e97b39978d0165f0befbf103a9">By default, the resulting PDF will be in Letter format. It is possible
|
||||
to adjust it to another page size via the <code spellcheck="false">#printPageSize</code> attribute,
|
||||
with one of the following values: <code spellcheck="false">A0</code>,
|
||||
<code
|
||||
spellcheck="false">A1</code>, <code spellcheck="false">A2</code>, <code spellcheck="false">A3</code>,
|
||||
<code
|
||||
spellcheck="false">A4</code>, <code spellcheck="false">A5</code>, <code spellcheck="false">A6</code>,
|
||||
<code
|
||||
spellcheck="false">Legal</code>, <code spellcheck="false">Letter</code>, <code spellcheck="false">Tabloid</code>,
|
||||
<code
|
||||
spellcheck="false">Ledger</code>.</li>
|
||||
</ul>
|
||||
<aside class="admonition note">
|
||||
<p>These options have no effect when used with the printing feature, since
|
||||
@ -74,21 +82,29 @@ class="admonition note">
|
||||
<p>Since v0.100.0, it is possible to print more than one note at the time
|
||||
by using <a class="reference-link" href="#root/_help_GTwFsgaA0lCt">Collections</a>:</p>
|
||||
<ol>
|
||||
<li>First create a collection.</li>
|
||||
<li>Configure it to use <a class="reference-link" href="#root/_help_mULW0Q3VojwY">List View</a>.</li>
|
||||
<li>Print the collection note normally.</li>
|
||||
<li data-list-item-id="e218b7d45c9a9ce882f16112aec9333be">First create a collection.</li>
|
||||
<li data-list-item-id="e159ed2993b564448ee15f5796bba1d31">Configure it to use <a class="reference-link" href="#root/_help_mULW0Q3VojwY">List View</a>.</li>
|
||||
<li
|
||||
data-list-item-id="ea82f390047ea239e7793145768738b97">Print the collection note normally.</li>
|
||||
</ol>
|
||||
<p>The resulting collection will contain all the children of the collection,
|
||||
while maintaining the hierarchy.</p>
|
||||
<aside class="admonition note">
|
||||
<p>Not all note types are supported when printing or exporting to PDF. When
|
||||
an unsupported note is encountered, it is skipped. At the end, if any of
|
||||
the notes were skipped, a message will be displayed with the possibility
|
||||
of viewing the full list of skipped notes. The same limitations as the
|
||||
ones described in <em>Constraints & limitations</em> apply.</p>
|
||||
</aside>
|
||||
<h2>Keyboard shortcut</h2>
|
||||
<p>It's possible to trigger both printing and export as PDF from the keyboard
|
||||
by going to <em>Keyboard shortcuts</em> in <a class="reference-link"
|
||||
href="#root/_help_4TIF1oA4VQRO">Options</a> and assigning a key combination
|
||||
for:</p>
|
||||
<ul>
|
||||
<li><em>Print Active Note</em>
|
||||
<li class="ck-list-marker-italic" data-list-item-id="e6b80294fd7a2d5f5d7cbf831691b53c8"><em>Print Active Note</em>
|
||||
</li>
|
||||
<li><em>Export Active Note as PDF</em>
|
||||
<li class="ck-list-marker-italic" data-list-item-id="eb2cc694f51e4e25dcf1f814e64523df9"><em>Export Active Note as PDF</em>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Constraints & limitations</h2>
|
||||
@ -96,41 +112,45 @@ class="admonition note">
|
||||
supported when printing, in which case the <em>Print</em> and <em>Export as PDF</em> options
|
||||
will be disabled.</p>
|
||||
<ul>
|
||||
<li>For <a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a> notes:
|
||||
<li data-list-item-id="e38dd484ec45f9bddf43bb9ecf708d339">For <a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a> notes:
|
||||
<ul>
|
||||
<li>Line numbers are not printed.</li>
|
||||
<li>Syntax highlighting is enabled, however a default theme (Visual Studio)
|
||||
<li data-list-item-id="e88456d3f86ed7e8656f60b837bf27f9f">Line numbers are not printed.</li>
|
||||
<li data-list-item-id="e1e5e18b8dedac46c49cc46360b6a444f">Syntax highlighting is enabled, however a default theme (Visual Studio)
|
||||
is enforced.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>For <a class="reference-link" href="#root/_help_GTwFsgaA0lCt">Collections</a>,
|
||||
<li data-list-item-id="e025b80306e7f736f3ae08e5693ab522e">For <a class="reference-link" href="#root/_help_GTwFsgaA0lCt">Collections</a>,
|
||||
the following are supported:
|
||||
<ul>
|
||||
<li><a class="reference-link" href="#root/_help_mULW0Q3VojwY">List View</a>, allowing
|
||||
<li data-list-item-id="e3553e19731217829ba704c7bbacf86f4"><a class="reference-link" href="#root/_help_mULW0Q3VojwY">List View</a>, allowing
|
||||
to print multiple notes at once while preserving hierarchy (similar to
|
||||
a book).</li>
|
||||
<li><a class="reference-link" href="#root/_help_zP3PMqaG71Ct">Presentation</a>,
|
||||
where each slide/sub-note is displayed.</li>
|
||||
<li><a class="reference-link" href="#root/_help_2FvYrpmOXm29">Table</a>, where the
|
||||
<li data-list-item-id="e96cab6a4cb4a18b1fa98d49f40d29496"><a class="reference-link" href="#root/_help_zP3PMqaG71Ct">Presentation</a>,
|
||||
where each slide/sub-note is displayed.
|
||||
<ul>
|
||||
<li data-list-item-id="ea145a7d22299304fbed7d8acb2cc05a0">Most note types are supported, especially the ones that have an image
|
||||
representation such as <a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_grjYqerjn243">Canvas</a> and
|
||||
<a
|
||||
class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_gBbsAeiuUxI5">Mind Map</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="e6eecc96905c6fb3d05ab360fbf02c395"><a class="reference-link" href="#root/_help_2FvYrpmOXm29">Table</a>, where the
|
||||
table is rendered in a print-friendly way.
|
||||
<ul>
|
||||
<li>Tables that are too complex (especially if they have multiple columns)
|
||||
<li data-list-item-id="e44cd46142fff861654387e9b040bb051">Tables that are too complex (especially if they have multiple columns)
|
||||
might not fit properly, however tables with a large number of rows are
|
||||
supported thanks to pagination.</li>
|
||||
<li>Consider printing in landscape mode, or using <code>#printLandscape</code> if
|
||||
<li data-list-item-id="edf28072a875e21fc21e18e7ddc0fec26">Consider printing in landscape mode, or using <code spellcheck="false">#printLandscape</code> if
|
||||
exporting to PDF.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>The rest of the collections are not supported, but we plan to add support
|
||||
<li data-list-item-id="e504297e0bafefa23c8c0ba28d67889e8">The rest of the collections are not supported, but we plan to add support
|
||||
for all the collection types at some point.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Using <a class="reference-link" href="#root/_help_AlhDUqhENtH7">Custom app-wide CSS</a> for
|
||||
printing is not longer supported, due to a more stable but isolated mechanism.
|
||||
<ul>
|
||||
<li>We plan to introduce a new mechanism specifically for a print CSS.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li data-list-item-id="eb2113dc9bd86628162fe2eb47488f5f2">Using <a class="reference-link" href="#root/_help_AlhDUqhENtH7">Custom app-wide CSS</a> for
|
||||
printing is no longer supported, instead a custom <code spellcheck="false">printCss</code> relation
|
||||
needs to be used (see below).</li>
|
||||
</ul>
|
||||
<h2>Customizing the print CSS</h2>
|
||||
<p>As an advanced use case, it's possible to customize the CSS used for printing
|
||||
@ -139,10 +159,10 @@ class="admonition note">
|
||||
printing.</p>
|
||||
<p>To do so:</p>
|
||||
<ul>
|
||||
<li>Create a CSS <a href="#root/_help_6f9hih2hXXZk">code note</a>.</li>
|
||||
<li>On the note being printed, apply the <code>~printCss</code> relation to
|
||||
point to the newly created CSS code note.</li>
|
||||
<li>To apply the CSS to multiple notes, consider using <a href="#root/_help_bwZpz2ajCEwO">inheritable attributes</a> or
|
||||
<li data-list-item-id="e3df5625e58cea9d50974335203d99caa">Create a CSS <a href="#root/_help_6f9hih2hXXZk">code note</a>.</li>
|
||||
<li data-list-item-id="e48c1388ee530c6301c75c8136617cf8f">On the note being printed, apply the <code spellcheck="false">~printCss</code> relation
|
||||
to point to the newly created CSS code note.</li>
|
||||
<li data-list-item-id="eaecc4fd4d22747aa15c85c988aab6d79">To apply the CSS to multiple notes, consider using <a href="#root/_help_bwZpz2ajCEwO">inheritable attributes</a> or
|
||||
<a
|
||||
class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>.</li>
|
||||
</ul>
|
||||
@ -153,19 +173,23 @@ class="admonition note">
|
||||
}</code></pre>
|
||||
<p>To remark:</p>
|
||||
<ul>
|
||||
<li>Multiple CSS notes can be add by using multiple <code>~printCss</code> relations.</li>
|
||||
<li>If the note pointing to the <code>printCss</code> doesn't have the right
|
||||
note type or mime type, it will be ignored.</li>
|
||||
<li>If migrating from a previous version where <a class="reference-link"
|
||||
href="#root/_help_AlhDUqhENtH7">Custom app-wide CSS</a>, there's no need for <code>@media print {</code> since
|
||||
the style-sheet is used only for printing.</li>
|
||||
<li data-list-item-id="ec9cd88d328b97422c11f4b25c1042ed5">Multiple CSS notes can be add by using multiple <code spellcheck="false">~printCss</code> relations.</li>
|
||||
<li
|
||||
data-list-item-id="e5ff782914a559055a1a72dda1be246bd">If the note pointing to the <code spellcheck="false">printCss</code> doesn't
|
||||
have the right note type or mime type, it will be ignored.</li>
|
||||
<li data-list-item-id="eab7b697428ef92d60ab6cd65bda76b69">If migrating from a previous version where <a class="reference-link"
|
||||
href="#root/_help_AlhDUqhENtH7">Custom app-wide CSS</a>, there's no need for
|
||||
<code
|
||||
spellcheck="false">@media print {</code> since the style-sheet is used only for printing.</li>
|
||||
</ul>
|
||||
<h2>Under the hood</h2>
|
||||
<p>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.</p>
|
||||
<p>The webpage that renders a single note can actually be accessed in a web
|
||||
browser. For example <code>http://localhost:8080/#root/WWRGzqHUfRln/RRZsE9Al8AIZ?ntxId=0o4fzk</code> becomes <code>http://localhost:8080/?print#root/WWRGzqHUfRln/RRZsE9Al8AIZ</code>.</p>
|
||||
browser. For example <code spellcheck="false">http://localhost:8080/#root/WWRGzqHUfRln/RRZsE9Al8AIZ?ntxId=0o4fzk</code> becomes
|
||||
<code
|
||||
spellcheck="false">http://localhost:8080/?print#root/WWRGzqHUfRln/RRZsE9Al8AIZ</code>.</p>
|
||||
<p>Accessing the print note in a web browser allows for easy debugging to
|
||||
understand why a particular note doesn't render well. The mechanism for
|
||||
rendering is similar to the one used in <a class="reference-link"
|
||||
|
||||
14
docs/User Guide/!!!meta.json
vendored
14
docs/User Guide/!!!meta.json
vendored
@ -4463,6 +4463,20 @@
|
||||
"value": "printing-and-pdf-export",
|
||||
"isInheritable": false,
|
||||
"position": 110
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "grjYqerjn243",
|
||||
"isInheritable": false,
|
||||
"position": 150
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "gBbsAeiuUxI5",
|
||||
"isInheritable": false,
|
||||
"position": 160
|
||||
}
|
||||
],
|
||||
"format": "markdown",
|
||||
|
||||
@ -59,6 +59,9 @@ Since v0.100.0, it is possible to print more than one note at the time by using
|
||||
|
||||
The resulting collection will contain all the children of the collection, while maintaining the hierarchy.
|
||||
|
||||
> [!NOTE]
|
||||
> Not all note types are supported when printing or exporting to PDF. When an unsupported note is encountered, it is skipped. At the end, if any of the notes were skipped, a message will be displayed with the possibility of viewing the full list of skipped notes. The same limitations as the ones described in _Constraints & limitations_ apply.
|
||||
|
||||
## Keyboard shortcut
|
||||
|
||||
It's possible to trigger both printing and export as PDF from the keyboard by going to _Keyboard shortcuts_ in <a class="reference-link" href="../UI%20Elements/Options.md">Options</a> and assigning a key combination for:
|
||||
@ -76,12 +79,12 @@ Not all <a class="reference-link" href="../../Note%20Types.md">Note Types</a>
|
||||
* For <a class="reference-link" href="../../Collections.md">Collections</a>, the following are supported:
|
||||
* <a class="reference-link" href="../../Collections/List%20View.md">List View</a>, allowing to print multiple notes at once while preserving hierarchy (similar to a book).
|
||||
* <a class="reference-link" href="../../Collections/Presentation.md">Presentation</a>, where each slide/sub-note is displayed.
|
||||
* Most note types are supported, especially the ones that have an image representation such as <a class="reference-link" href="../../Note%20Types/Canvas.md">Canvas</a> and <a class="reference-link" href="../../Note%20Types/Mind%20Map.md">Mind Map</a>.
|
||||
* <a class="reference-link" href="../../Collections/Table.md">Table</a>, where the table is rendered in a print-friendly way.
|
||||
* Tables that are too complex (especially if they have multiple columns) might not fit properly, however tables with a large number of rows are supported thanks to pagination.
|
||||
* Consider printing in landscape mode, or using `#printLandscape` if exporting to PDF.
|
||||
* The rest of the collections are not supported, but we plan to add support for all the collection types at some point.
|
||||
* Using <a class="reference-link" href="../../Theme%20development/Custom%20app-wide%20CSS.md">Custom app-wide CSS</a> 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.
|
||||
* Using <a class="reference-link" href="../../Theme%20development/Custom%20app-wide%20CSS.md">Custom app-wide CSS</a> for printing is no longer supported, instead a custom `printCss` relation needs to be used (see below).
|
||||
|
||||
## Customizing the print CSS
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user