Skip to content
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

Support printing notes (first print CSS, then export to PDF) #112

Closed
rkaraba opened this issue Jun 27, 2019 · 20 comments · Fixed by #2867
Closed

Support printing notes (first print CSS, then export to PDF) #112

rkaraba opened this issue Jun 27, 2019 · 20 comments · Fixed by #2867
Labels
1. to develop enhancement New feature or request good first issue Good for newcomers

Comments

@rkaraba
Copy link

rkaraba commented Jun 27, 2019

Please add PDF export because people sometimes need print their notes.

@rkaraba rkaraba added the enhancement New feature or request label Jun 27, 2019
@jancborchardt
Copy link
Member

@juliushaertl what do you think? Does this require some PDF generation library?

Another thing we can do is look at a proper print stylesheet which hides the top bar and adjusts some other things. @rkaraba would that solve the problem?

@juliusknorr
Copy link
Member

Maybe we can use https://github.com/MrRio/jsPDF to build the pdf file, but that needs a deeper look.

I agree that a proper print sylesheet work actually be a good first step.

@jancborchardt jancborchardt added this to the 2.0 📋 milestone Jun 28, 2019
@rkaraba
Copy link
Author

rkaraba commented Jun 28, 2019

@jancborchardt
Your solution is better than nothing so yes it will help

@jancborchardt jancborchardt changed the title Export to PDF Support printing notes (first print CSS, then export to PDF) Jun 28, 2019
@jancborchardt jancborchardt added the good first issue Good for newcomers label Jul 23, 2019
@nicostuhlfauth
Copy link

I already worked with jsPDF before. It's very easy to use, well documented and performant.

@jancborchardt
Copy link
Member

@nicostuhlfauth cool, do you want to help implement this? :)

@juliushaertl maybe also helpful: for the Mail app @sourenaraya implemented a print stylesheet, and PDF export can then be done through the browsers/OS own "Print as PDF" functionality: nextcloud/mail#1804

@juliusknorr
Copy link
Member

Did not make it for 18

@juliusknorr juliusknorr removed this from the 2.0 📋 (Nextcloud 18) milestone Dec 6, 2019
@Jab2870
Copy link

Jab2870 commented May 11, 2020

Is this still on your radar? Printing would be excellent, printing to pdf is (IMO) secondary.

@jancborchardt
Copy link
Member

@Jab2870 yes, are you interested in contributing a fix?

See nextcloud/mail#1804 where @sourenaraya implemented a print stylesheet for the Mail app. This could be done just the same here. :)

@jjdsec
Copy link

jjdsec commented Aug 2, 2021

Hi, just wanted to add that I encountered this issue today when attempting to print my markdown document. I could not a find working md-to-pdf or print from md feature within nextCloud that actually worked and I was not able to get the pdf flow working either. just wanted to thank you in advance for making this possible and keeping the beautiful css of nextCloud while printing. Thanks!

@ImaCrea
Copy link

ImaCrea commented Mar 7, 2022

Hello ! It'd be very helpful to be able to print or export as pdf notes. I see the discussion here stopped a while ago. Is there any chance we see that feature shipped at some point please? 🙏

@WilliamDEdwards
Copy link

In NextCloud, notes are stored as - and therefore also accessible as - regular files. To print a note before this issue is solved, without having to copy + paste it to some application manually, you could download the file from the file browser, or open it from your NextCloud client, and print it using your text editor.

@ImaCrea
Copy link

ImaCrea commented Apr 9, 2022

In NextCloud, notes are stored as - and therefore also accessible as - regular files. To print a note before this issue is solved, without having to copy + paste it to some application manually, you could download the file from the file browser, or open it from your NextCloud client, and print it using your text editor.

Sure, this is I do at the moment. Thanks for pointing out that solution but it's also important to realize this is not as trivial is it sounds for many users (no opinion here, just what I observe).

@EricKerby
Copy link

In NextCloud, notes are stored as - and therefore also accessible as - regular files. To print a note before this issue is solved, without having to copy + paste it to some application manually, you could download the file from the file browser, or open it from your NextCloud client, and print it using your text editor.

When text files / notes are in markdown *.md format, keep in mind most users don't have a MarkDown-compatible text editor installed locally, so printing outside the nextcloud web app isn't necessarily an easy workaround.

@susnux
Copy link
Contributor

susnux commented Sep 6, 2022

PDF export can then be done through the browsers/OS own "Print as PDF" functionality: nextcloud/mail#1804

Sadly this feature does not exist on mobile browsers (firefox mobile removed that feature one or two years ago).

@szaimen
Copy link
Contributor

szaimen commented Sep 6, 2022

Sadly this feature does not exist on mobile browsers (firefox mobile removed that feature one or two years ago).

They are working on a successor IIRC.

susnux added a commit that referenced this issue Sep 6, 2022
Currently printing will include the menubar and
longer text files will be cropped after the first page.
This enabled printing of text documents without any big styling changes,
slightly adjusted margins and add table borders.
This implements the CSS part of #112

Signed-off-by: Ferdinand Thiessen <[email protected]>
susnux added a commit that referenced this issue Sep 6, 2022
Currently printing will include the menu bar and longer text files will be cropped after the first page.
This enables printing of text documents without any major styling changes,
slightly adjusted margins and added table borders.
This implements the CSS part of #112

Signed-off-by: Ferdinand Thiessen <[email protected]>
susnux added a commit that referenced this issue Sep 6, 2022
Currently printing will include the menu bar and longer text files will be cropped after the first page.
This enables printing of text documents without any major styling changes,
slightly adjusted margins and added table borders.
This implements the CSS part of #112

Signed-off-by: Ferdinand Thiessen <[email protected]>
susnux added a commit that referenced this issue Sep 6, 2022
Currently printing will include the menu bar and longer text files will be cropped after the first page.
This enables printing of text documents without any major styling changes,
slightly adjusted margins and added table borders.
This implements the CSS part of #112

Signed-off-by: Ferdinand Thiessen <[email protected]>
susnux added a commit that referenced this issue Sep 8, 2022
Currently printing will include the menu bar and longer text files will be cropped after the first page.
This enables printing of text documents without any major styling changes,
slightly adjusted margins and added table borders.
This implements the CSS part of #112

Signed-off-by: Ferdinand Thiessen <[email protected]>
susnux added a commit that referenced this issue Sep 8, 2022
Currently printing will include the menu bar and longer text files will be cropped after the first page.
This enables printing of text documents without any major styling changes,
slightly adjusted margins and added table borders.
This implements the CSS part of #112

Signed-off-by: Ferdinand Thiessen <[email protected]>
susnux added a commit that referenced this issue Sep 8, 2022
Currently printing will include the menu bar and longer text files will be cropped after the first page.
This enables printing of text documents without any major styling changes,
slightly adjusted margins and added table borders.
This implements the CSS part of #112

Signed-off-by: Ferdinand Thiessen <[email protected]>
susnux added a commit that referenced this issue Sep 8, 2022
Currently printing will include the menu bar and longer text files will be cropped after the first page.
This enables printing of text documents without any major styling changes,
slightly adjusted margins and added table borders.
This implements the CSS part of #112

Signed-off-by: Ferdinand Thiessen <[email protected]>
vinicius73 pushed a commit that referenced this issue Sep 8, 2022
Currently printing will include the menu bar and longer text files will be cropped after the first page.
This enables printing of text documents without any major styling changes,
slightly adjusted margins and added table borders.
This implements the CSS part of #112

Signed-off-by: Ferdinand Thiessen <[email protected]>
susnux added a commit that referenced this issue Sep 12, 2022
Currently printing will include the menu bar and longer text files will be cropped after the first page.
This enables printing of text documents without any major styling changes,
slightly adjusted margins and added table borders.
This implements the CSS part of #112

Signed-off-by: Ferdinand Thiessen <[email protected]>
@Uatschitchun
Copy link

@susnux @vinicius73
Is there a regression in NC 27? When trying to print a md file from within my browser (opera), I only see one page to print?!

@juliusknorr
Copy link
Member

Can you open a new issue for this please?

@Uatschitchun
Copy link

Can you open a new issue for this please?

Done, see #4536

@geonom
Copy link

geonom commented Feb 20, 2024

Is this still being worked on? Cannot see a workaround - copying the contents to Word works for the text but the images do not show up. Printing does not work beyond the first 1.5 pages. And there is no export or convert button to be found. Confused and feels like .md files are a lock in right now.

@ImaCrea
Copy link

ImaCrea commented Feb 20, 2024

Hi there, if it may help meanwhile for those in need to convert their notes in PDF in order to print them (or simply share them with other people through another medium) : here the best tool I found (after many tries) which let you convert md to great pdf : https://md-to-pdf.fly.dev/

It let you choose between different conversion engines and even customize CSS. ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.