This was sitting in my notes for years. I’m still not sure if publishing this is a good idea. It’s bound to stir some discussion and I’m not ent

prawnpdf / prawn

submited by
Style Pass
2021-06-14 12:30:07

This was sitting in my notes for years. I’m still not sure if publishing this is a good idea. It’s bound to stir some discussion and I’m not entirely sure if I’ll handle it right but it seems like now is as good a time as any other.

Prawn is an old gem. It sprang from a very concrete need to generate PDF without external dependencies. I wasn’t around at the very beginning and can’t be certain for sure but this can be pieced together from commit messages, old emails, issues, and PRs.

The gem grew very organically. That is, it started with minimal features to arrive at the end goal as fast as possible. It’s amazing how much functionality is covered. But at the same time there was not much in the way of architecture.

Later things got untangled a bit here and there but it’s still can’t quite be called an architecture. For example, pdf-core was extracted into a separate gem but it still sticks its fingers deep into Prawn here and there and can’t be used entirely on its own. Likewise, there’s not clear mapping from Prawn to PDF features (or the other way around) which might guide implementation of missing features.

It didn’t do all the thing I wanted so I contributed a few features. I liked interactions with the maintainers. I liked giving back to Prawn in return for what it gave me. I fixed a few bugs, improved performance in a few places.

Leave a Comment
Related Posts