Document Renderer Module
Generate PDFs from text, Markdown, and HTML content. Built-in branding, pagination, and tenant isolation.
Why Use Primus Documents?
PDF generation libraries are complex. Primus Documents provides a simple API with built-in formatting.
// Generate PDF from content
var pdf = await renderer.RenderPdfAsync(request);
Supported Content Types
Plain Text
Simple text content with automatic formatting.
Simple
Markdown
Markdown content converted to formatted PDF.
MDTables
HTML
HTML content rendered as PDF.
HTMLStyling
Result Object (IDocumentRenderer)
| Method | Returns | Description |
|---|---|---|
RenderPdfAsync(request) | Task<byte[]> | PDF as byte array |
RenderDocumentRequest
| Property | Type | Description |
|---|---|---|
Title | string | Document title |
Content | string | Document content |
ContentType | DocumentContentType | Text, Markdown, or Html |
TenantId | string? | Tenant for branding |
Examples
Quick Install
dotnet add package PrimusSaaS.Documents
Next Steps
| Want to... | See Guide |
|---|---|
| Get started | Quick Start |
| Full reference | Document Renderer |