💾 Archived View for bbs.geminispace.org › s › Gemini › 14800 captured on 2024-05-26 at 15:09:02. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-05-10)

➡️ Next capture (2024-07-09)

🚧 View Differences

-=-=-=-=-=-=-

I made a tool for Linux (it'll probably work on quite a few flavors of *BSD as well and maybe macOS) that converts gemtext files to pdf using groff, aptly named "gmi2pdf". Can save as "A4", "Letter", "Tabloid", and "Legal" sized PDFs. It can take a local file or a gemtext/plaintext remote gemini resource as input. Has support for TLS client certs as well. Currently only supports ASCII characters, but can optionally convert unicode characters to squares. Some lines can look a bit weird for now due to the justified alignment. Can be cloned via git or https from vigrey.com/git/gmi2pdf. Some repo info can be found at gemini://vigrey.com/git/gmi2pdf

vigrey.com/git/gmi2pdf

Posted in: s/Gemini

☀️ vi

Feb 08 · 4 months ago · 👍 hyperreal, ibannieto, MrSVCD

4 Comments ↓

🚂 MrSVCD · Feb 08 at 17:28:

Lovely, looking forward to the UTF-8/Unicode version.

Will you add support for changing the font and size for all the types of text?

☀️ vi [OP] · Feb 08 at 19:20:

Possibly at some point. I mostly needed a tool to archive gemtext files as pdf files so I could print them out at my local public library. I'll need to figure out more about font support with groff as well to add unicode support, although groff does natively support some accented characters. Might add support for text size changing, but we'll see.

🚂 MrSVCD · Feb 08 at 20:48:

I found this in the groff documentation

— https://www.gnu.org/software/groff/manual/groff.html.node/Using-Symbols.html

(Search for unicode)

👤 jdcard · Feb 08 at 21:51:

Cool! Unicode can be difficult. I ended up running my gemtext files through a PHP script to convert to HTML and then into a browser to render the Unicode characters, then using the browser's print-to-pdf capability. The entire process is scriptable. I'll have to give this a try.