Letter is a simple, highly customizable tool to create letters in your browser.
Instead of messing around in Word, Pages or even Indesign, you can write your letters in the browser, export them as HTML or PDF (via Apple Preview).
Written in plain HTML and CSS, Letter runs as a Docker container either on your machine or on a server. The original version was written in PHP by Bastian Allgeier and requires a separate web server. This version comes with a tiny web server written in Go, so you don’t need anything besides Docker.
Quill icon made by Pixel perfect from www.flaticon.com.
You can setup your own letter template and customize the design with CSS.
-
Adjust the settings in the
config
directory the to match your needs. -
Start the docker container and include your configuration:
docker run --rm \ -p 3000:3000 \ -v "$PWD/config:/config:ro" \ --name letter \ ghcr.io/fhemberger/letter
-
The web-server is exposed on
http://localhost:3000
. Happy writing.
You can save your letters by simply using the browser save dialog. Make sure to choose "Save HTML only" as the export option. You will get a nice and clean HTML file of your letter, which can be kept for later at any place you prefer.
Use your browser’s print dialog to print your finished Letters. Make sure to set "No margins" in your printing dialog to avoid broken dimensions of your document.
On macOS you can use your browser’s print dialog to export your Letter to PDF via Apple Preview. As long as you get the printing settings correct, the PDF will look good too.
You can setup the global content of your Letter in config/config.json
. Adjust the settings and add your own data there.
If you want to adjust Letter’s custom styles, go to config/styles.css
and add your own CSS there. Check out Letter’s custom HTML tags in the browser for further information what to adjust.
Replace Letter’s example signature.png in config/signature.png
with your own, to load it automatically.