GlobalSettings Class

Contains global settings that configure the behavior of the library within application

Definition

Namespace: Winnovative.Pdf.Next
Assembly: Winnovative.Pdf.Next (in Winnovative.Pdf.Next.dll) Version: 20.75.0
C#
public static class GlobalSettings
Inheritance
Object    GlobalSettings

Properties

HtmlRendererMode Selects how the HTML renderer process is managed for the HTML conversions of the application, including the conversions of the HTML templates used for headers and footers. The value can be changed at any time; each conversion uses the value read at its start. The default value is PersistentProcess. Use ProcessPerConversion when no process may stay resident between conversions or when each conversion must run in its own process.
MaxParallelConversions Gets or sets the maximum number of HTML pages loaded in the rendering engine at the same time. Every load counts, the HTML templates of headers and footers included. The loads above the limit wait for a free slot. A value of 0 allows an unlimited number of concurrent conversions. If not explicitly set by the application, the default is the number of logical processors of the system, kept within a minimum and a maximum, which is the value that gives the highest throughput. Above it the loads contend for the same cores and the throughput falls. A value equal to the number of physical cores gives close to the same throughput with a lower latency per conversion. This property must be set before the first HTML conversion occurs. Changes made afterward will have no effect until the application is restarted.
PersistentRenderer The process-level settings of the persistent HTML renderer process used with PersistentProcess. A change takes effect at the next conversion, which replaces the running renderer process after it finishes its conversions in progress.
PersistentRendererStatus Gets the state of the persistent HTML renderer process: whether it runs, its process id, conversions sent and in progress, how many times it was replaced and why and the last start failure. For health checks and diagnostics.

Methods

StartPersistentRenderer Starts the persistent HTML renderer process ahead of the first conversion, so that the first conversion does not pay the engine startup. Does nothing if the process is already running. Requires HtmlRendererMode to be PersistentProcess. Typically called at application startup.
StartPersistentRendererAsync Starts the persistent HTML renderer process ahead of the first conversion. See StartPersistentRenderer(String).
StopPersistentRenderer Stops the persistent HTML renderer process if it is running. The renderer finishes the conversions in progress before it stops. A subsequent conversion with PersistentProcess starts a new renderer process.
StopPersistentRendererAsync Stops the persistent HTML renderer process if it is running, without blocking the calling thread while the conversions in progress finish. See StopPersistentRenderer.

Events

PersistentRendererRestarted Raised when the persistent HTML renderer process is replaced by a new one, with the reason (an unexpected exit, a settings change, a recycle rule). Handlers run on the thread pool.

See Also