PDF Writer
Real PDFs from Godot in pure GDScript. Any language, any font, pages that lay themselves out.
var pdf := PdfDocument.new()
pdf.title = "Run report"
pdf.footer = "Page {page} of {pages}"
pdf.add_heading("Run 42")
pdf.add_bbcode("Finished in [b]12:31[/b] with [color=#d33]3 deaths[/color].")
pdf.add_table([["Floor", "Time"], ["1", "1:02"], ["2", "3:40"]])
pdf.save("user://run_42.pdf")
Get it: $3 on itch.io, with the demo project, 91 automated tests and a full README.



What it does
- Any language. Godot's own text engine lays out the text, so the PDF prints what a Label shows. Chinese, Japanese and Korean wrap without spaces. Arabic and Hebrew run right to left, and Arabic letters join and justify. Hindi and Thai marks land where they belong.
- Any font. Your game's
.ttfor.otf, a variable font at any weight, or the system's fonts. Text stays selectable, searchable and copyable. - Pages that lay themselves out. Headings, paragraphs (plain or BBCode), lists, tables and images flow onto new pages by themselves. Tables repeat their header row, and headings become bookmarks.
- Draw anywhere. Text, shapes, images and links at any position, plus a page decorator for title bands and footers on every page.
- Images that behave. Transparency is kept, JPEG is available for photos, and images are stored at print resolution for the size you draw them.
- Runs everywhere Godot does. No plugins or binaries, so web exports work too.
