Skip to main content

Advanced Configuration

Additional options for customizing the Document Renderer.


Configuration Reference

OptionTypeDefaultDescription
Providerstring"Default"Provider name
BrandNamestring-Text in footer
MaxContentLengthint20000Max character limit
LinkTtlTimeSpan10 minExpiry for temp links
IncludeTimestampInFooterbooltrueShow timestamp
IncludeTenantInFooterbooltrueShow tenant ID
PageMarginint50Page margin in points

HTML Content Type

var request = new RenderDocumentRequest
{
Title = "Invoice",
ContentType = DocumentContentType.Html,
Content = "<h1>Invoice #123</h1><p>Total: $500</p>"
};

Self-Test Mode

Validate your configuration:

var result = await _renderer.SelfTestAsync();
if (!result.Success)
{
_logger.LogError("Document Renderer self-test failed: {Error}", result.Error);
}

Troubleshooting

Issue: Font not found

Solution: Ensure host system has standard fonts installed (Arial, Helvetica) if running in Linux/Docker container.

Issue: PDF is blank

Solution: Check that Content is not empty and ContentType matches the actual content format.