7 comments

[ 2.9 ms ] story [ 22.5 ms ] thread
Hi, author here! I'm excited to share a project I created to scratch my itch: a generator of a PDF calendar for ReMarkable tablets (and possibly other e-ink devices). It's pretty niche, but I'm really happy how it turned out.

It started as a PHP script [1] to quickly verify the idea. I got lots of great feedback on it [2], plus I used it for a few months myself. But I've hit a few technical walls with the (otherwise very competent) PDF framework I chose [3]. Most notably, it only supported a subset of CSS and layout was done using tables (hello, 2000s!). This led to a growing list of pain-points (links did not span the whole cell, not easy to re-order elements, etc.). I also kept thinking on how to make this project more approachable - without needing to install and know a bit of PHP. However, since it was a PHP script, that meant PDF generation on the backend. Which meant abuse protection, beefy server, etc.

So I rewrote the project from scratch [4], this time in JavaScript. Using react-pdf, I was able to move PDF generation entirely to client-side. It internally uses Yoga Layout, which means flexbox, finally! (subset, but still) React allowed me to extract and re-use components better. Internationalization was smooth as well. Web workers ensure the browser does not lock up (unless you're generating the full PDF in Firefox, for some reason...). Everything runs in client-side, no data is transferred to any servers. Privacy FTW!

There's many features available [5], but one I wanted to highlight here is how I've achieved sharing and preserving configuration (so that you can share it with friends or regenerate the calendar next year). Since I wanted to avoid storing any information on my or (even worse) third-party servers, the options were limited. Stuffing the data into the URL was probably possible. But it's unclear what are the safe limits of URL length. Plus, you can easily lose the URL. Downloading the data (a JSON file? Copy & paste?) was also clunky - how to explain to users what this file is? It can also be easily misplaced. Then I realized - PDF files can have embedded file attachments :) So I'm saving the configuration file inside the generated PDF calendar. So if you ever want to reload the same settings (they are backwards compatible), you just upload the same PDF file (of course, PDF parsing happens on the client-side only as well). It's much safer approach and more intuitive - you will always have your PDF calendar file :)

In case you give my server the hug of death, the app is also available on GitHub Pages: https://recalendar.klimer.eu/

While the current version is tested only on ReMarkable tablets, it should be fairly easy to add support for other devices. Please open a new issue on GitHub, ideally with the specification of the device (screen size in pixels or mm).

[1] https://github.com/klimeryk/recalendar/

[2] https://www.reddit.com/r/RemarkableTablet/comments/odpl07/re...

[3] https://mpdf.github.io/

[4] https://github.com/klimeryk/recalendar.js/

[5] https://recalendar.me/features

So cool. Thanks for this!
I don't have a ReMarkable, but the way you have used links in the PDF to make it fully interactive is really neat, I can see how useful this would be. Maybe add some screenshots to the main site page?
Thanks for having a look! I thought about screenshots, but also wanted to make the configurator easy to just play with so that folks could try it for themselves. But I'll see if I can add some screenshots to make it an easier "sell".
This is awesome. Works great on my RM2, it's actually exactly what I was looking for. Great work!

The only downside I see so far is not being able to make changes to the PDF while also keeping existing writing. Not sure that's even plausible with a PDF but I may want to change the habit list/special dates throughout the year and keep all of the things I've written in there so far.

Thanks for checking and the kind words!

Yeah, I wish RM allowed "moving" notes from one PDF to a new version of it. But I recently found of a workaround [0]. It requires SSH access, so it's not for everyone. But I'm assuming it's not a problem for HN crowd. I would not be surprised if there's already some hack/software to automate it - or to write a simple script yourself.

Hope this helps!

[0] https://github.com/klimeryk/recalendar/issues/15#issuecommen...

Love the product - even for printing it is very nice.