Skip to main content

API Reference

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​

ScopeResponsibilityStart here
PdfDocumentOwns the document lifecycle and outputDocument
PdfPageOwns page size, orientation, and page flowPage
PdfContentAdds text, tables, images, and other elementsContent

Fluent conventions​

  • Methods beginning with With configure the current builder.
  • Methods beginning with Add create 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.