Global | |
| Exception | Condition |
|---|---|
| NotSupportedException | InProcess was assigned but the in-process engine host is not installed beside the engine, or is built for another architecture than the process. |
The setting applies to the whole application: the engine is initialised once per process, so it cannot differ between two conversions running side by side (one conversion can still be sent to a separate engine process, see below). Set it during start-up, before the first conversion; the value in force at the first conversion is the one used for the life of the process.
The default is decided at the first conversion from the engine folder that conversion resolves: the in-process host is used when its library (SelectPdf.Cef.Host.dll, .so or .dylib) is present there and built for the architecture of the application's process, and the per-conversion engine process otherwise, so a deployment without the host library, or a 32-bit process with the 64-bit engine package, keeps converting. The environment variable SELECTPDF_CHROMIUM_ENGINE_HOST (outofprocess or inprocess) overrides the default without a code change; an explicit assignment overrides both.
One conversion can still be sent to a separate engine process with the ForceOutOfProcess property of HtmlToPdfOptions (and of the other engine-driven types), whatever this property says.
Assigning InProcess where the host library is not installed, or is built for another architecture than the application's process, throws NotSupportedException immediately, rather than failing later at the first conversion.