Namespace CobaltPdf
Classes
- CloudEnvironment
Provides ready-made PoolOptions presets for common cloud and container deployment targets.
- CobaltCookie
Represents a browser cookie configuration used during the PDF generation process.
- CobaltEngine
The main PDF renderer for CobaltPdf. Create one instance and call fluent methods to configure each render, finishing with RenderUrlAsPdfAsync(string, CancellationToken) or RenderHtmlAsPdfAsync(string, CancellationToken).
- CobaltPdfServiceExtensions
Extension methods for registering CobaltPdf with the ASP.NET Core dependency injection container.
- LazyLoadOptions
Configuration for the lazy-load scroll behavior applied before PDF capture.
- MarginOptions
Represents the page margins for a PDF document.
- MetadataOptions
Defines the descriptive metadata to be embedded in the generated PDF document.
- PdfDocument
The rendered PDF artifact. Use this to save the file or access raw binary data.
- PdfDocumentTaskExtensions
Extension methods that allow PdfDocument operations to be chained directly off a Task<TResult> — i.e. off the render call itself — without an intermediate
await.
- PdfEncryptionOptions
Defines password protection and permission settings for the generated PDF.
- PdfGenerator
Provides functionality for generating PDF documents from HTML content or URLs.
- PdfOptions
Represents configuration options used when generating a PDF.
- PdfRequestExtensions
Extension methods that execute a CobaltPdf.Requests.PdfRequest using a CobaltEngine instance.
- PoolBusyException
Thrown by the render pool when MaxQueueDepth is set (> 0) and a render request arrives while every browser slot is in use and the bounded wait-queue is already full.
This is deliberate backpressure, not a failure: the work was never started, so it is always safe to retry. Hosts should translate it into a "server busy" response — HTTP
503 Service Unavailablewith aRetry-Afterheader — rather than a generic500, so callers and load balancers know to back off and retry shortly instead of treating it as a hard error.Never thrown when MaxQueueDepth is 0 (the default), which keeps the historical unbounded-queue behaviour.
- PoolOptions
Configuration options for the CobaltPdf browser pool.
- WaitOptions
Base class for defining a wait strategy before PDF rendering.
- WatermarkOptions
Defines visual settings for a watermark injected into the generated PDF.
Structs
- CobaltPoolStatistics
A point-in-time snapshot of the render pool's state and lifetime counters, returned by GetPoolStatistics(). Useful for health endpoints, capacity dashboards, and autoscaling signals.
The gauges (CurrentWorkers, LeasedWorkers, IdleWorkers, QueuedWaiters) are read without locking, so on a busy pool they are a close-but-not-transactional view; the cumulative counters are exact. Field-for-field identical to the CobaltPDF.WebKit edition's snapshot.
Interfaces
- IPdfGenerator
Defines the fluent configuration and render contract for a single PDF generation operation.
- IPdfGeneratorFinal
Continuation of the fluent chain after
WithCustomJShas been called. Prevents adding a second custom JS block by accident.
Enums
- BrowserLoggingMode
Specifies the destination modes for capturing browser-level console logs.
- CssMediaType
Specifies the CSS media type to emulate during PDF rendering.
- MarginUnit
Specifies the measurement units for margins.
- WatermarkPosition
Convenience positions for watermark placement, combining vertical and horizontal alignment.
- WatermarkStyle
Predefined visual styles for text watermarks.