Table of Contents

Class CloudEnvironment

Namespace
CobaltPdf.WebKit
Assembly
CobaltPDF.WebKit.dll

Ready-made PoolOptions presets for common deployment targets.

Provided for drop-in API compatibility with the Chromium-based CobaltPDF, so startup code written for that engine compiles and runs unchanged here. Each preset does apply useful pool sizing (MinSize / MaxSize) — that part takes effect. However the Chromium command-line switches it adds (NoSandbox, DisableDevShm, DisableGpu, SingleProcess) are stored but ignored: this backend renders with WebKitGTK, which does not read Chromium flags.

To tune WebKit, set PoolOptions directly — MinSize, MaxSize, MaxUsesPerBrowser, MaxMemoryMb, MaxQueueDepth, RenderTimeout. The flag constants below have no effect on rendering.

public static class CloudEnvironment
Inheritance
CloudEnvironment
Inherited Members

Fields

DisableDevShm

Chromium --disable-dev-shm-usage switch. Accepted for API compatibility; ignored by the WebKitGTK backend.

public const string DisableDevShm = "--disable-dev-shm-usage"

Field Value

string

DisableGpu

Chromium --disable-gpu switch. Accepted for API compatibility; ignored by the WebKitGTK backend.

public const string DisableGpu = "--disable-gpu"

Field Value

string

NoSandbox

Chromium --no-sandbox switch. Accepted for API compatibility; ignored by the WebKitGTK backend.

public const string NoSandbox = "--no-sandbox"

Field Value

string

SingleProcess

Chromium --single-process switch. Accepted for API compatibility; ignored by the WebKitGTK backend.

public const string SingleProcess = "--single-process"

Field Value

string

Methods

ConfigureForAwsEcs(PoolOptions)

AWS ECS / Fargate preset: keeps one worker warm (MinSize = 1) and caps concurrency at half the host's logical processors (MaxSize). The Chromium flags it adds are ignored by the WebKitGTK backend — see the CloudEnvironment remarks.

public static void ConfigureForAwsEcs(PoolOptions options)

Parameters

options PoolOptions

ConfigureForAzure(PoolOptions)

Azure App Service / Functions preset: keeps one worker warm (MinSize = 1) and caps concurrency at half the host's logical processors (MaxSize) — e.g. 1 on a 2-vCPU B2. The Chromium flags it adds are ignored by the WebKitGTK backend — see the CloudEnvironment remarks.

public static void ConfigureForAzure(PoolOptions options)

Parameters

options PoolOptions

ConfigureForDocker(PoolOptions)

Docker preset: keeps one worker warm (MinSize = 1) and caps concurrency at half the host's logical processors (MaxSize). The Chromium flags it adds are ignored by the WebKitGTK backend — see the CloudEnvironment remarks.

public static void ConfigureForDocker(PoolOptions options)

Parameters

options PoolOptions

ConfigureForLinux(PoolOptions)

Linux preset: keeps one worker warm (MinSize = 1) and caps concurrency at half the host's logical processors (MaxSize). The Chromium flags it adds are ignored by the WebKitGTK backend — see the CloudEnvironment remarks.

public static void ConfigureForLinux(PoolOptions options)

Parameters

options PoolOptions

ConfigureForLowMemory(PoolOptions)

Memory-constrained preset: no warm worker (MinSize = 0) and a single render slot (MaxSize = 1), trading throughput for the lowest resident footprint. The Chromium flags it adds are ignored by the WebKitGTK backend — see the CloudEnvironment remarks.

public static void ConfigureForLowMemory(PoolOptions options)

Parameters

options PoolOptions