Text, fonts and overflow
Text APIs accept UTF-8 strings, but built-in PDF fonts cover a much smaller character repertoire than Unicode. An external font must contain the required glyphs, and fallback fonts can be specified. Text boxes default to truncating excess content and return what was not printed. Shrinking to fit has a minimum font size, so it can still leave text unprinted. These behaviors make overflow checks important for variable-length names, descriptions or translated text.[2]
Runtime and licensing
Prawn supports maintained Ruby versions and matching JRuby implementations. Its release policy distinguishes stable APIs from experimental ones and warns that bug fixes can change behavior, so version numbers alone do not establish unchanged output. The license offers a choice of Ruby-style conditions, GPL version 2 or GPL version 3. Its output clause states that generated files do not automatically become subject to the library's copyright.[1][5]
Capabilities & limitations
Code-driven PDF creation
supportedRuby APIs create text, vector graphics and repeated page content.[1]
Generate PDFs from application code · Ruby, JRuby · Version, build and integration requirements apply
1 source · check evidence
Rich HTML conversion
unsupportedLimited inline text styling is not a general HTML/CSS renderer.[1]
Generate PDFs from application code · Ruby, JRuby · Version, build and integration requirements apply
1 source · check evidence
Text-box overflow handling
limitedTruncation is the default; callers can inspect unprinted text or choose another overflow mode.[2]
Generate PDFs from application code · Ruby, JRuby · Version, build and integration requirements apply
1 source · check evidence
Raster image embedding
limitedThe core image API supports JPEG and PNG, with performance considerations for alpha-channel PNGs.[3]
Generate PDFs from application code · Ruby, JRuby · Version, build and integration requirements apply
1 source · check evidence
Revision history
Open a revision to read an earlier version of this article.
| Revision | Timestamp | Edit summary |
|---|
| 669 | 2026-10-13 00:12:42 | /* wbeditentity-create-item:0| */ sf:3d250132-fe67-47f2-aef6-b445822ecc2d:v1 | Add Prawn with code-driven layout, overflow handling, image and licensing boundaries. | attribution: /proposals/3d250132-fe67-47f2-aef6-b445822ecc2d |