Implementing a PDF Library in Ruby
Design and implementation decisions to create a fully-featured, fast and memory-efficient PDF library
Excerpt: HexaPDF (https://hexapdf.gettalong.org) 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 care … Read moreAbout the presenter(s)
Thomas Leitner is the founder of gettalong EDV-Dienstleistungen e.U., the company behind the PDF library HexaPDF.
Description
HexaPDF (https://hexapdf.gettalong.org) 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.