API Reference
The Fluent API is organized around the shape of a PDF document. Start with a document, open a page, add content, and close each scope when its work is complete.
Reference map
| Scope | Responsibility | Start here |
|---|---|---|
PdfDocument | Owns the document lifecycle and output | Document |
PdfPage | Owns page size, orientation, and page flow | Page |
PdfContent | Adds text, tables, images, and other elements | Content |
Fluent conventions
- Methods beginning with
Withconfigure the current builder. - Methods beginning with
Addcreate content inside the current scope. End()returns to the parent scope.Save()or an output method completes the document.
PdfDocument.Create()
.WithPageSize(PdfPageSize.A4)
.Pages.Add()
.Content.AddText("Hello, PDF")
.End()
.End()
.Save("hello.pdf");
This reference is intentionally task-oriented. As the Fluent API grows, each public builder and method family can receive its own Markdown page under this folder.