Sign in

Thomas Leitner

@gettalong.bsky.social
34 followers 57 following 38 posts

(Open source) Software developer, creator of kramdown and HexaPDF, Sci-Fi fan.

PostsRepliesMedia
Thomas Leitner @gettalong.bsky.social · 22/09/2026
Released #HexaPDF 1.11.0 with support for creating LTV digital signatures. hexapdf.gettalong.org/documentatio...
hexapdf.gettalong.org
Changelog - HexaPDF
010
Thomas Leitner @gettalong.bsky.social · 12/09/2026
This year's Euruko in Brno draws near. See you there next week! I will have some HexaPDF stickers with me 😁
001
Thomas Leitner @gettalong.bsky.social · 08/09/2026
No, there is no support for the proprietary and deprecated XFA format.
110
Thomas Leitner @gettalong.bsky.social · 08/09/2026
For Ruby you have HexaPDF which is pure Ruby and can fill PDFs.
110
Thomas Leitner @gettalong.bsky.social · 08/09/2026
Feel free to contact me if you intend to use HexaPDF for the job and need help.
000
Thomas Leitner @gettalong.bsky.social · 08/09/2026
It depends greatly on what the content of the PDF is, i.e. just pure text vs also contains many tables vs contains many high-res images. If you modify hexapdf.gettalong.org/examples/pdf... to run the body 1000 times, it takes 16s with 400MB RAM on my machine, producing a 2.8MB file with 2000 pages.
hexapdf.gettalong.org
PDF/A Conformance - HexaPDF
100
Thomas Leitner @gettalong.bsky.social · 19/08/2026
PDF now supports Brotli compression through a new extension: pdfa.org/no-excuses-b... And #HexaPDF already has it implemented 😀
pdfa.org
No excuses: Brotli compression advances PDF – PDF Association
000
Reposted by Thomas Leitner
Vienna.rb @ruby.wien · 05/08/2026
Save the date! Vienna.rb is back with incredible talks and great vibes! See you at Platogo on the 3rd of September! ✌️
042
Thomas Leitner @gettalong.bsky.social · 07/06/2026
#HexaPDF 1.9.0 with support for HarfBuzz text shaping released! hexapdf.gettalong.org/news/2026/he...
hexapdf.gettalong.org
HexaPDF 1.9.0 - Text shaping et al. - HexaPDF
000
Thomas Leitner @gettalong.bsky.social · 01/06/2026
Coming to #HexaPDF with the next release: HarfBuzz based text shaping! First line in image without, second one with HarfBuzz based text shaping.
Screenshot of a PDF created by HexaPDF where the first line shows text with combining marks without correct shaping and the second line with correct shaping by HexaPDF's upcoming HarfBuzz support.
000
Thomas Leitner @gettalong.bsky.social · 13/04/2026
I just released #HexaPDF 1.7.0, with support for smart text extraction and the upcoming brotli compression filter, among other things. hexapdf.gettalong.org/documentatio... hexapdf.gettalong.org/documentatio...
hexapdf.gettalong.org
Changelog - HexaPDF
000
Reposted by Thomas Leitner
Vienna.rb @ruby.wien · 09/02/2026
Time for another Vienna Ruby Meetup! 🎉 It's been three months since the last meetup. To make up for it, we got three wonderful talks covering a wide range of topics this time. Thank you to Meister for hosting us!
012
Thomas Leitner @gettalong.bsky.social · 23/09/2025
Released #HexaPDF 1.4.1 with some fixes - see hexapdf.gettalong.org/documentatio...
hexapdf.gettalong.org
Changelog - HexaPDF
000
Thomas Leitner @gettalong.bsky.social · 23/09/2025
You can't generally use an embedded font to add new content (because it usually misses parts in the font data structure; even if usable it might be missing characters). Viewers work around this by loading the same font from the system paths. With HexaPDF you need to specify the font yourself.
000
Thomas Leitner @gettalong.bsky.social · 11/06/2025
Yes! But did you know that you can even parse arbitrary strings? 😆 Example: github.com/gettalong/he... (used for interleaving and handling file names and options).
github.com
hexapdf/lib/hexapdf/cli/merge.rb at master · gettalong/hexapdf
Versatile PDF creation and manipulation for Ruby. Contribute to gettalong/hexapdf development by creating an account on GitHub.
000
Thomas Leitner @gettalong.bsky.social · 10/06/2025
Maybe bind ALT-C to a command that sends CTRL-C? Or do something like this: unix.stackexchange.com/questions/78...
unix.stackexchange.com
how to send keyboard strokes programmatically (like "sendkeys" in Windows) to a Wayland Linux window (KDE/GNOME)?
I'm writing a desktop automation software, which drives a GUI desktop, on linux. It works pretty well, but Wayland is blocking inter-window communication, especially when entering non-ASCII charact...
000
Thomas Leitner @gettalong.bsky.social · 10/06/2025
* KDE lets you configure which short-cut switches between applications (ALT-Tab) and which between their windows (Alt-`). * The built-in KDE krunner application is sufficient as launcher for my needs. * Clipboard history just works in KDE. * Vim GUI -> gvim
000
Thomas Leitner @gettalong.bsky.social · 10/06/2025
If you are using KDE, you should be able to just configure this system-wide for all KDE based apps.
010
Thomas Leitner @gettalong.bsky.social · 10/06/2025
Or just use BreakVer www.taoensso.com/break-versio... and break things like before 😁
taoensso.com
BreakVer | Taoensso
000
Thomas Leitner @gettalong.bsky.social · 09/06/2025
So, I now have implemented a basic template system for VersaDok. However, using ERB as preprocessor instead of the built-in template system is faster in most cases (even though the larger source doc needs to be parsed every time) because AST nodes need to be rendered many times more.
000
Thomas Leitner @gettalong.bsky.social · 07/06/2025
Thanks for the great meetup! And thanks to @hansschnedlitz.com for organizing it and doing the cool Ruby quiz!
000
Thomas Leitner @gettalong.bsky.social · 02/06/2025
And now the code is available at github.com/gettalong/ve... It is not yet finished and not really polished etc. but already in a good state. This will be the basis for still more easily creating PDF documents with HexaPDF 😀
github.com
GitHub - gettalong/versadok: Versatile document creation markup and library
Versatile document creation markup and library. Contribute to gettalong/versadok development by creating an account on GitHub.
000
Thomas Leitner @gettalong.bsky.social · 24/04/2025
Worked now! And just released the new version - see hexapdf.gettalong.org/documentatio...
hexapdf.gettalong.org
Changelog - HexaPDF
000
Thomas Leitner @gettalong.bsky.social · 23/04/2025
Once rubygems.org sends me the password reset e-mail that I already requested a few times, I can release a new version of #HexaPDF
rubygems.org
RubyGems.org | your community gem host
100
Thomas Leitner @gettalong.bsky.social · 17/03/2025
Array#[]=(e.g. ary[-10, 10] = EMPTY_ARRAY) won't create an additional array but is slower then Array#pop, so I'm staying with the latter.
010
Thomas Leitner @gettalong.bsky.social · 12/03/2025
Full benchmark info here gist.github.com/gettalong/b8...
gist.github.com
Parsing into AST a file with kramdown vs versadok
Parsing into AST a file with kramdown vs versadok. GitHub Gist: instantly share code, notes, and snippets.
000
Thomas Leitner @gettalong.bsky.social · 12/03/2025
So I have been working on something lately, lightweight markup related. Turns out it's at least 4 times faster than kramdown when parsing the same document (n.b. a bit of an apple to banana comparison as kramdown can do much more at the moment but still 🤯)
Without YJIT on Ruby 3.4.1

Warming up --------------------------------------
            kramdown    259.422 i/s -     270.000 times in 1.040775s (3.85ms/i)
            versadok     1.158k i/s -      1.265k times in 1.091970s (863.22μs/i)
Calculating -------------------------------------
            kramdown    276.681 i/s -     778.000 times in 2.811901s (3.61ms/i)
            versadok     1.138k i/s -      3.475k times in 3.052762s (878.49μs/i)

Comparison:
            versadok:      1138.3 i/s
            kramdown:       276.7 i/s - 4.11x  slower

With YJIT on Ruby 3.4.1

Warming up --------------------------------------
            kramdown    334.871 i/s -     336.000 times in 1.003372s (2.99ms/i)
            versadok     1.853k i/s -      1.969k times in 1.062396s (539.56μs/i)
Calculating -------------------------------------
            kramdown    315.374 i/s -      1.004k times in 3.183520s (3.17ms/i)
            versadok     1.822k i/s -      5.560k times in 3.052272s (548.97μs/i)

Comparison:
            versadok:      1821.6 i/s
            kramdown:       315.4 i/s - 5.78x  slower
220
Thomas Leitner @gettalong.bsky.social · 11/03/2025
Ah, I forgot up that - thank you! You can further optimize it by using a constant empty array and doing `array[from, size] = EMPTY_ARRAY`. I did a benchmark comparing pop, slice! and your method using benchmark-driver. Interestingly pop was faster even though it creates arrays.
The benchmark YAML file for benchmark-driverWarming up --------------------------------------
                 pop     5.802M i/s -      6.040M times in 1.041085s (172.36ns/i, 187clocks/i)
              slice!     4.235M i/s -      4.459M times in 1.052689s (236.11ns/i, 625clocks/i)
                 []=     5.158M i/s -      5.168M times in 1.001836s (193.86ns/i, 211clocks/i)
Calculating -------------------------------------
                 pop     5.946M i/s -     17.406M times in 2.927538s (168.19ns/i, 426clocks/i)
              slice!     4.100M i/s -     12.706M times in 3.098945s (243.90ns/i, 738clocks/i)
                 []=     5.415M i/s -     15.475M times in 2.857926s (184.68ns/i, 808clocks/i)

Comparison:
                 pop:   5945557.8 i/s
                 []=:   5414702.4 i/s - 1.10x  slower
              slice!:   4100124.2 i/s - 1.45x  slower
110
Thomas Leitner @gettalong.bsky.social · 11/03/2025
So, Ruby friends, how do I remove count number of trailing elements from an array *without* creating a new result array? There is Array#pop(count) but that creates an array I don't need or want ;-)
220
Thomas Leitner @gettalong.bsky.social · 18/02/2025
@itext.bsky.social Congrats on the release of 9.1! 🎉 The table rendering speed-up is great! Is the source code for the benchmark available somewhere?
000
Thomas Leitner @gettalong.bsky.social · 09/02/2025
Coming with the next release to #HexaPDF: Line annotation appearance generation. Other annotation types will follow.
Image of 10 line annotations with different styles
000
Thomas Leitner @gettalong.bsky.social · 07/01/2025
Can also recommend weasyprint if you need HTML/CSS -> PDF. If you want more quality and better conversion, a commercial solution based on PrincePDF is available via www.europdf.eu And a heads up from me: There will be a markup-to-PDF pipeline for HexaPDF in the near future :-)
europdf.eu
EuroPDF - create PDFs from HTML, fast and secure!BASH_logo-transparent-bg-bw
252
Thomas Leitner @gettalong.bsky.social · 02/01/2025
It seems that Ruby getting faster with each release is now the norm. As no one is pointing it out anymore 😀
000
Thomas Leitner @gettalong.bsky.social · 01/01/2025
New release of hexapdf-extras to make it compatible with HexaPDF 1.0. The API docs now also have a visual example of a Swiss QR bill - hexapdf-extras.gettalong.org/api/HexaPDF/...
hexapdf-extras.gettalong.org
HexaPDF Extras: HexaPDF::Extras::Layout::SwissQRBill
Additional functionality for the HexaPDF library
000
Thomas Leitner @gettalong.bsky.social · 14/12/2024
I use unary + for normal UTF-8 encoded strings and "literal".b for binary ones.
000
Reposted by Thomas Leitner
Eric Wastl @was.tl · 30/11/2024
🎄 T-24 hours until #AdventOfCode 2024! 🎄
825246
Thomas Leitner @gettalong.bsky.social · 22/11/2024
Yes, I also think so. When I wanted to formulate the versioning scheme for HexaPDF, I came across BreakVer 🙂
010
Thomas Leitner @gettalong.bsky.social · 22/11/2024
Understood 😆 I also kept HexaPDF on 0.x versions for a long time (8 years) but decided to change it to 1.0 this October, now following BreakVer instead of SemVer.
110
Thomas Leitner @gettalong.bsky.social · 21/11/2024
What do you do in case of breaking changes? Just a highlighted entry in the changelog? I have found that BreakVer (www.taoensso.com/break-versio...) is the versioning scheme I'm most comfortable with.
taoensso.com
BreakVer | Taoensso
100
Thomas Leitner @gettalong.bsky.social · 18/11/2024
New version of kramdown released! kramdown.gettalong.org/news.html
kramdown.gettalong.org
News | kramdown
kramdown is a fast, pure-Ruby Markdown-superset converter
010
Thomas Leitner @gettalong.bsky.social · 17/11/2024
Initial post.
040