-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul Printing #936
Comments
It also seems printing only works if the content fits on one site. If it is longer, it is trunkated. So i took the liberty to also add the bug-tag. |
I have build a tiny working prototype. Its based on marked, jspdf, dompurify and html2canvas. First marked converts the markdown to html, which then gets passed to jspdf. The rest is dependency for jspdf. The upside is that we are independend of the DOM for printing, but we also have to provide a custom stylesheet to get a pdf that looks halfway decent. |
I appreciate your work, but wouldn't it be easier to just use pure CSS A button (if planned and / or wished) could just trigger the native printing then - it would be faster and dependency-free... |
It was just a 10 minute prototype, so no time lost ;) I don't think the css is the problem, but how we display the note. Granted, i have not looked that deeply into it, but currently printing the file via native printing just cuts off everything that is not in view by the dom. (vertically and horizontally) |
Yep, that looks like a bug. This may have come with Nextcloud 25, since there was an overhaul of the scroll areas. It definitely has worked in the past (with older Nextcloud server versions). Therefore, I think fixing that bug would be better than introducing complex PDF generation. And to be honest: how many people print out their notes? |
Yeah, you are probably right about that. We should at least fix that though ;) And then, later, we could introduce a print button sometime later when the toolbar has been merged. |
it's not like they could if they wanted. |
This comment was marked as duplicate.
This comment was marked as duplicate.
Related: nextcloud/text#4536 (since fixed in nextcloud/text#5054) |
Is your feature request related to a problem? Please describe.
I would like to see an overhaul to the printing-process. Currently the user has to know that "printing the page" will only print the note rendered in markdown. That is a bit limited and i can see some improvements.
Describe the solution you'd like
I would like to see dedicated printing-buttons somewhere. The Collectives-App has a button for that in each collective, but the notes app should have one on each note.
Additionally, i think it would be a good idea to have a "print all" button per folder, where we build a pdf from each note, making each note-title the chapter-title, and depending on the nesting of that file, subchapters. This allows for printing "whole books" similarly to the collectives app.
This would work with the current category-approach, but it would be trivially to understand if we would also switch to a folder based concept.
Additional Context:
There is https://www.npmjs.com/package/markdown-pdf. Alternatives were discussed in #179. It worked fine locally, and as per documentation, concatenation works aswell.
The text was updated successfully, but these errors were encountered: