In this post we will generate PDF’s with Ruby, exploring the exemplary use case of creating customer invoices. In order to output PDF’s from your (custom) billing system, you’ll need a library that exports PDF’s. There are different ways to achieve HTML to PDF conversion in Ruby. Let’s take a closer look.
HTML to PDF libraries
Two major players in this field are PDFlib and Prawn. PDFlib is a commercial library, and as such more advanced than Prawn. You’ll find table configuration and formatting to be a helpful feature. PDFlib has many more bindings, with support for PHP, Perl, Python, Ruby, Java, .NET and C++/C.
Yet, the Prawn ‘API’ will feel more natural to a Rubyists The PDFlib extension doesn’t feel like Ruby most of the time, it’s just a wrapper for the normal PDFlib C calls. Plus: Prawn is open source (and thus free of charge).
Yesterday, little after seven-thirty, the Emacs Berlin user group came together for the very first time. As a Textmate-turned-Atom user myself, I was nothing but ears for the stories about what I’ve learned to be one of the most powerful tools out there.
The format of the meetup is an interesting one. Everybody is expected to show something to the rest of the group and you get up to 10 minutes to do so. Plus, you’re requested to prepare notes beforehand and share the link to your gist on the mailing list, so people can easily follow along on their own machine.
I diligently wrote down all tips shared at what is already jokingly referred to as “the biggest yak shaving meetup in town”. Please refer to the official notes, if you distrust my judgement as an Atom user. Really, it’s ok.
Last year, Rails Girls Summer of Code was a raging success: over 30 students worked on Open Source projects for 3 months, most of them full-time and supported by the community and company sponsors. We’re excited to see Rails Girls Summer of Code shaping up for yet another summer. The office we share with Travis CI in Berlin is full of life and Ruby code!
Rails Girls Summer of WHAT?
Rails Girls Summer of Code offers students a scholarship so they’re free to learn coding. It’s all about helping students to further expand their knowledge and skills by contributing to an Open Source project – like Sinatra, Rails or Spree, last year’s projects.
What does anynines have to do with that?
Last year we supported this initiative in a more classic sponsor way (read: we donated money). This year we are determined to be more personally involved. Floor (who is already quite involved with the Rails Girls community) will spend part of her time co-organizing, and we support her. This makes us a Supporting Organizer. Some of last year’s most successful students teams have been supported greatly by local companies like Soundcloud who allowed developers to spend a certain amount of company time on coaching students. (more…)