silverbullet icon indicating copy to clipboard operation
silverbullet copied to clipboard

Print to PDF

Open simone-viozzi opened this issue 1 year ago • 2 comments

Hi, thank you for the great tool.

If I need to share a note with a colleague, how can I print the silverbullet rendering of the note?

Doing print page to PDF from the browser (edge | firefox | chrome) prints only the first page.

Is there a command / plug I need to use to just save the rendered page as PDF?

Thank You!

simone-viozzi avatar Jan 19 '24 16:01 simone-viozzi

There’s no great way to do this right now. The only thing that comes to mind is to open the markdown preview (Cmd-p/Ctrl-p) and copy and paste from there into a word document or some other word processor and export to PDF from there.

I do see the value of this, though, but would have to investigate how to implement this.

zefhemel avatar Jan 22 '24 18:01 zefhemel

In Safari on macOS all the pages are printed. In iOS / iPad OS as well. Seems to be browser related.

gorootde avatar Feb 13 '24 20:02 gorootde

One thing I'd like to investigate is how much weight it would be to add pandoc and latex to the docker image to achieve this and offer export to docx, epub and other formats while at it.

zefhemel avatar Jul 28 '24 20:07 zefhemel

Or this can be done as a separate pandoc plug which dynamically attempts to install all dependencies. That probably makes more sense. Will investigate at some point.

zefhemel avatar Jul 29 '24 08:07 zefhemel

I'm wondering if it would be feasible to add a CSS stylesheet for printed media using @media print. That would also enable exporting to PDF via the browsers' "print to PDF" feature without extra dependencies.

Svedrin avatar Aug 28 '24 06:08 Svedrin

There is work in progress here: https://github.com/silverbulletmd/silverbullet/pull/1065

zefhemel avatar Aug 28 '24 15:08 zefhemel