GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - themidnightgospel/Rustaveli.Pdf: A free, open source, fluent PDF generation library for .NET.

BranchesTags
Open more actions menu

Latest commit

 

History

801 Commits
801 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
benchmarks/Rustaveli.Pdf.Benchmarks
benchmarks/Rustaveli.Pdf.Benchmarks
 
 
docs
docs
 
 
eng
eng
 
 
fuzz
fuzz
 
 
samples/Rustaveli.Pdf.Gallery
samples/Rustaveli.Pdf.Gallery
 
 
src
src
 
 
tests
tests
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Directory.Build.props
Directory.Build.props
 
 
Directory.Packages.props
Directory.Packages.props
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
Rustaveli.Pdf.slnx
Rustaveli.Pdf.slnx
 
 
SECURITY.md
SECURITY.md
 
 
coverage.runsettings
coverage.runsettings
 
 
dotnet-tools.json
dotnet-tools.json
 
 
global.json
global.json
 
 
mkdocs.yml
mkdocs.yml
 
 
stryker-config.json
stryker-config.json
 
 

Repository files navigation

Rustaveli.Pdf

Rustaveli.Pdf

Free and fully featured PDF generation for C# and .NET

CI CodeQL OpenSSF Scorecard NuGet

Documentation   •   Quick start   •   Guides   •   API reference   •   Benchmarks   •   NuGet

Free, for everyone Fully featured Plain .NET
MIT-licensed, for commercial and closed-source software, and it stays MIT. No revenue limits, keys or tiers. Tables across pages, both text directions, complex scripts, PDF/A, PDF/UA, encryption and merging. Managed code, no native dependencies. .NET 10 and .NET Standard 2.0 (.NET Framework 4.7.2 and later).

Quick start

dotnet add package Rustaveli.Pdf
Code
using Rustaveli.Pdf;

(string Item, string Amount)[] lines =
[
    ("Design review", "1,600.00"),
    ("Implementation", "7,200.00"),
    ("Support, one month", "450.00"),
];

Ink blue = Ink.Hex("#1565C0");

Document invoice = Document.Compose(composition => composition.Section(section =>
{
    section.Trim = PaperSizes.A5;
    section.Margins = Sides.All(40);
    section.DefaultType = TypeStyle.Default.WithPointSize(10);

    section.Body().Stack(stack =>
    {
        stack.SpaceBetween(20);

        stack.Add().Text(text =>
        {
            text.Line("Invoice INV-0042")
                .PointSize(22)
                .Bold()
                .Ink(blue);

            text.Line("Issued 29 September 2026, due in 30 days");
        });

        stack.Add().Table(table =>
        {
            table.Columns(columns =>
            {
                columns.Share();
                columns.Fixed(70);
            });

            table.HeaderRows(header =>
            {
                header
                    .Cell()
                    .Fill(blue)
                    .Inset(6)
                    .Text(text => text
                        .Run("Item")
                        .Bold()
                        .Ink(Ink.White));

                header
                    .Cell()
                    .Fill(blue)
                    .Inset(6)
                    .FlushRight()
                    .Text(text => text
                        .Run("Amount")
                        .Bold()
                        .Ink(Ink.White));
            });

            foreach ((string item, string amount) in lines)
            {
                table
                    .Cell()
                    .StrokeBottom(0.5f)
                    .Inset(6)
                    .Text(item);

                table
                    .Cell()
                    .StrokeBottom(0.5f)
                    .Inset(6)
                    .FlushRight()
                    .Text(amount);
            }
        });

        stack
            .Add()
            .FlushRight()
            .Text(text => text
                .Run("Total due 9,250.00")
                .PointSize(14)
                .Bold());
    });
}));

invoice.ExportPdf("invoice.pdf");

Invoice INV-0042, made by the code above

Benchmarks

Measured again on every merge to main (as text, history):

The latest benchmarks: time, allocations and file size for each document, made by both libraries

What it makes

A page of styled text, framed and rounded boxes, lists and a table
Text, frames, lists and tables
Styled runs, rounded fills, numbered lists, tables with repeated headers.
Arabic, English with Arabic, Devanagari and justified Arabic text
Every script, both directions
Arabic shaped and set right to left beside English, Devanagari, justified Arabic.
  • Typography: OpenType features, kerning, fallback fonts per character, text in both directions, Arabic and Indic scripts.
  • Images and artwork: JPEG and PNG embedded as they are, SVG and drawn paths kept as vectors.
  • Standards: PDF/A-2 and A-3, tagged PDF and PDF/UA, AES-256, each checked by veraPDF and qpdf.
  • Existing files: merge, stamp, attach electronic invoices, protect and linearise.
  • Live preview: redraws as you edit, with an inspector that opens the code behind any frame.

About this project

Rustaveli.Pdf sets out to give C# and .NET a complete PDF generation toolkit that is free for everyone, for good. It is MIT-licensed, and every future release will be too.

It is built with an AI coding agent. A change is merged only after more than 10,000 tests pass, including veraPDF validation of PDF/A and PDF/UA output. The parsers are fuzzed every night, and every merge is benchmarked.

QuestPDF's MIT-licensed releases are its reference: they inspired its design, and its tests and benchmarks compare against their output. Rustaveli.Pdf and QuestPDF sets out how the two libraries relate.

Packages

Package Adds
Rustaveli.Pdf Layout, text, images and PDF export: everything most documents need
Rustaveli.Pdf.Raster Pages as PNG, JPEG or WebP, SVG pages and XPS; image recompression
Rustaveli.Pdf.Shaping Arabic, Hebrew points, and Indic and South-East Asian scripts
Rustaveli.Pdf.Operations Existing PDF files: merging, stamping, attaching, protecting
Rustaveli.Pdf.Preview A live preview in the browser, redrawn on hot reload

Documentation

  • Guides, starting with getting started
  • API reference
  • Features and known limitations
  • Coming from QuestPDF, and how the two libraries relate: Rustaveli.Pdf and QuestPDF
  • Changelog

Licence

MIT — see LICENSE. The bundled Noto Sans is under the SIL Open Font License.

About

A free, open source, fluent PDF generation library for .NET.

Topics

csharpdotnetpdfpdf-generationquestpdfreporting

Resources

Readme
MIT license

Contributing

Contributing

Security policy

Security policy
Activity

Stars

24 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.