Yes, OnePDF can be used in a commercial C# app. You can sell the app and keep its source code closed under either license. The core package has no revenue threshold, per-seat fee, or license key.
OnePDF is a free, open-source PDF library for .NET from Recursive AI, licensed MIT or Apache-2.0 at your option. NuGet · GitHub
In a .NET 10 console project, run dotnet add package RecursiveAI.OnePdf --version 1.25.0. This core-only example writes an invoice and reads back its text. It references the standard PDF font Helvetica without embedding a font file.
using OnePdf; using var doc = PdfDocument.CreateEmpty(); var page = doc.InsertBlankPage(0, 612, 792); var font = doc.AddStandardFont("Helvetica"); using (var content = page.BeginContent()) { content.SetFont(font, 18); content.DrawText("Invoice 1042", 72, 720); content.Commit(); } doc.Save("invoice.pdf"); using var saved = PdfDocument.Open("invoice.pdf"); Console.WriteLine($"Pages: {saved.Pages.Count}"); Console.WriteLine(saved.Pages[0].ExtractText().Text.Trim());
Pages: 1 Invoice 1042
Pick MIT or Apache-2.0
The NuGet license expression is MIT OR Apache-2.0. The “or” means you can choose either license for OnePDF, not that you have to comply with both. The table refers to the license texts at release 1.25.0.
| License | What to account for when you ship the library |
|---|---|
| MIT | Include the copyright and permission notice in all copies or substantial portions of OnePDF. Keeping the full MIT text with your third-party notices preserves both. |
| Apache-2.0 | If you ship OnePDF unchanged, include a copy of the Apache-2.0 license. Section 4 also covers marking files you modify, retaining applicable notices in distributed source derivatives, and carrying forward relevant attributions if the work includes a NOTICE file. Section 3 includes an express patent grant with a patent-litigation termination clause. |
What are you distributing?
- A desktop app, SDK, or container that includes OnePDF: keep the chosen license and the applicable third-party notices with what you deliver. Bundling the DLL into a single-file app doesn’t change what you’re shipping.
- A hosted service that sends only generated PDFs: sending an invoice doesn’t send a copy of OnePDF. The library license doesn’t impose MIT or Apache-2.0 on the invoice. Check the terms of any fonts, images, or other assets you embed separately.
- A modified copy of OnePDF: neither choice requires publishing your app’s source. If you ship a modified library under Apache-2.0, check the modified-file and notice conditions in Section 4.
Check the font terms if you add layout
RecursiveAI.OnePdf has no NuGet dependencies. The package list at 1.25.0 distinguishes it from RecursiveAI.OnePdf.Layout, a package for laying out new PDFs in C# that pulls in RecursiveAI.OnePdf.Fonts. That package’s code is MIT or Apache-2.0; its bundled fonts are separately licensed under SIL Open Font License 1.1, with notices in the package’s licenses/ folder. RecursiveAI.OnePdf.Layout.Core omits that package and uses fonts you register. Check those fonts’ terms before embedding or shipping them.
For a release checklist, record the package versions you actually ship, the license you chose, and the notices for those versions. OnePDF also lists its embedded third-party data and notices. For API and deployment details, see the OnePDF getting-started guide.