Implementing a PDF Library in Ruby

Design and implementation decisions to create a fully-featured, fast and memory-efficient PDF library

Headshot of Thomas Leitner
Presenter: Thomas Leitner, gettalong EDV-Dienstleistungen e.U.
Language: English
Date/Time: Sep, 13, 2022 - 14:15

Symbol calendar download
Download this presentation date to create your personal agenda


HexaPDF ( is a PDF library written in Ruby. It aims to provide the full spectrum of PDF functionality with the exception of rendering.

This presentation focuses on how HexaPDF implements the PDF specification and how Ruby is actually quite a good language for this task. It is said that Ruby, being a scripting language, is rather slow and, truth be told, it is when compared to languages like C++ or Java. However, by understanding how Ruby internally works and by carefully designing the library we can create quite a performant library while still retaining a Ruby-esque, easy-to-use API.

In this presentation you will learn about HexaPDF's approach to parsing, how HexaPDF maps the PDF object types to Ruby's built-in classes, how references and convenience classes are automatically mapped behind the scenes, how algorithmic choices influence performance, and more.


View the PDF Days Europe 2022 agenda

This presentaton is part of PDF Days Europe 2022.
Register now!

View our terms and conditions.