This repository was archived by the owner on Jun 24, 2025. It is now read-only.
Merged
Conversation
pano9000
reviewed
Jan 31, 2025
This was referenced Jan 31, 2025
|
Amazing addition making Trilium even more feature rich!! Until now, I have been turning on share toggle and printing it as a pdf from the browser. I suppose if the share feature could be reutilized for the PDF export in this case, but the share UI needs to be further enhanced for decent visual reproduction in the PDF. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the desktop application of Trilium it is possible to export a note as PDF. On the server or PWA (mobile), the option is not available due to technical constraints and it will be hidden.
To print a note, select the
button to the right of the note and select Export as PDF.
Afterwards you will be prompted to select where to save the PDF file. Upon confirmation, the resulting PDF will be opened automatically.
Should you encounter any visual issues in the resulting PDF file (e.g. a table does not fit properly, there is cut off text, etc.) feel free to report the issue. In this case, it's best to offer a sample note (click on the
button, select Export note → This note and all of its descendants → HTML in ZIP archive). Make sure not to accidentally leak any personal information.
Landscape mode
When exporting to PDF, there are no customizable settings such as page orientation, size, etc. However, it is possible to specify a given note to be printed as a PDF in landscape mode by adding the
#printLandscapeattribute to it.Page size
By default, the resulting PDF will be in Letter format. It is possible to adjust it to another page size via the
#printPageSizeattribute, with one of the following values:A0,A1,A2,A3,A4,A5,A6,Legal,Letter,Tabloid,Ledger.Keyboard shortcut
It's possible to trigger the export to PDF from the keyboard by going to Keyboard Shortcuts and assigning a key combination for the
exportAsPdfaction.