The configuration of a PdfEngine, set fluently: Use* methods select an implementation or behavior,
With* methods set a value.
public sealed class PdfOptions
An engine copies its options when it is constructed, so changing an options object afterwards does not change any engine built from it. The properties are settable so the same type binds through the options pattern of dependency injection.
kind:method, kind:property, kind:ctor. Press Esc to clear.DefaultContentCacheBudgetThe default of ContentCacheBudget: 32 MiB.DefaultDisplayListCacheBudgetThe default of DisplayListCacheBudget: 32 MiB.DefaultGlyphCacheBudgetThe default of GlyphCacheBudget: 8 MiB.DefaultImageCacheBudgetThe default of ImageCacheBudget: 64 MiB.DefaultMaxDecodedStreamLengthThe default of MaxDecodedStreamLength: 1 GiB.DefaultMaxImagePixelsThe default of MaxImagePixels: 2^28 (268,435,456) pixels, a 16384 x 16384 image.DefaultMaxMeshVerticesThe default of MaxMeshVertices: 2^22 (4,194,304) vertices.DefaultRangeBlockSizeThe default of RangeBlockSize: 4 KiB.DefaultRangeCacheLimitThe default of RangeCacheLimit: 64 MiB.DefaultStreamBufferLimitThe default of StreamBufferLimit: 64 MiB.ContentCacheBudgetGets or sets the most bytes of decoded content streams (pages, form XObjects, tiling patterns, Type 3 glyphs) a document keeps for its next content run; the least recently used are dropped beyond it and decoded again when needed. Zero keeps none. Default 32 MiB.DisplayListCacheBudgetGets or sets the most bytes of display lists a document keeps, so that rendering a page again (another zoom, another tile) reuses its list while the document is unchanged; the least recently used are dropped beyond it. A list is charged its tables and the images it holds. Zero keeps none: CreateDisplayList() builds a new list on every call. Default 32 MiB.GlyphCacheBudgetGets or sets the most bytes of glyph outlines a document keeps once read from its font programs; the least recently used are dropped beyond it and read again when shown. Zero keeps none: each display list reads its own. Default 8 MiB.ImageCacheBudgetGets or sets the most bytes of decoded images (image XObjects with their masks, soft masks and colour tables, and stencil masks) a document keeps for its next display lists; the least recently used are dropped beyond it and decoded again when painted. An image larger than the budget is decoded for each list that paints it. Zero keeps none: each list decodes its own. Default 64 MiB.MaxDecodedStreamLengthGets or sets the most bytes one stream may decode to; longer output is truncated with a diagnostic. Default 1 GiB.MaxImagePixelsGets or sets the most pixels (width x height) one image may have; a larger image is not decoded, with a diagnostic. Default 2^28. The bytes of its samples are also limited by MaxDecodedStreamLength.MaxMeshVerticesGets or sets the most vertices one mesh shading (Types 4 to 7) decodes, a patch counting as 16; the rest of a larger mesh is dropped with a MeshSizeExceeded diagnostic. Default 2^22.RangeBlockSizeGets or sets the unit a remote file is fetched and cached in, in bytes: every request covers whole blocks. Default 4 KiB.RangeCacheLimitGets or sets the most bytes of a remote file a document keeps cached; the least recently used blocks are dropped beyond it and fetched again when needed. Default 64 MiB.ReadingModeGets or sets how deviations from the specification are treated. The default is Lenient.StreamBufferLimitGets or sets how many bytes of a non-seekable stream are copied into memory when a document is opened from it; a longer stream is copied into a temporary file, deleted when the document is disposed, and read from there. Default 64 MiB.SynchronousRangeFetchGets or sets whether a synchronous read of a remote document that needs bytes not yet fetched blocks on the request. When off, the read throws PdfRangeNotLoadedException, and a page is read after awaiting its PrefetchAsync(CancellationToken). On by default, except on the browser platform (and WASI), which cannot block on HTTP; turning it on there has no effect.SystemFontIndexPathGets or sets the file where the default operating-system font resolver keeps the index of the font files it has read, so a later process finds installed fonts without reading their files again; null (the default) keeps no index and writes nothing.UseColorManagement(IColorManagement)Uses colorManagement to convert colours of device, CIE-based and ICCBased spaces to device colours, in place of Default.UseFilter(IStreamFilter)Uses filter for every stream whose Filter entry names Name, replacing the managed default of that name or adding a filter the defaults lack. A later registration of the same name wins.UseFontProgramParser(IFontProgramParser)Uses parser for embedded font programs, tried before the managed defaults and before parsers registered earlier: the first parser whose CanParse(ReadOnlySpan<Byte>) accepts a program's bytes reads it, so a parser for a format the defaults read replaces them, and a parser for a new format adds it.UseFontResolver(IFontResolver)Uses resolver to find font programs for fonts that are not embedded, and named font resources (predefined CMaps, CID-to-Unicode tables). Resolvers are asked in registration order, all before the operating system's fonts; the first answer wins.UseLenient()Repairs deviations and records them as diagnostics on the document. The default.UseSecurityHandler(ISecurityHandler)Uses handler for encrypted documents whose encryption dictionary's Filter is Filter, or whose SubFilter it lists, replacing the default of that name (StandardSecurityHandler for Standard). A later registration of the same name wins.UseStreamEncoder(IStreamEncoder)Uses encoder to write data for the filter its Name names, replacing the managed default of that name (FlateEncoder, AsciiHexEncoder, Ascii85Encoder, RunLengthEncoder) or adding an encoder the defaults lack. A later registration of the same name wins. Saving compresses streams with the encoder registered for FlateDecode.UseStrict()Throws a DiagnosticException for the first deviation.UseSystemFontResolver(IFontResolver?)Uses resolver in place of the operating system's fonts (SystemFontResolver), asked after every resolver registered with UseFontResolver(IFontResolver); null asks no operating-system fonts at all, so output does not depend on the machine.UseTimeProvider(TimeProvider)Uses timeProvider as the clock that dates what the engine writes, such as the modification date a save records (ISO 32000-2 §14.3.4), in place of .WithCredentials(PdfCredentials?)Offers credentials to every encrypted document opened without credentials of its own.WithLoggerFactory(ILoggerFactory?)Logs every diagnostic through loggerFactory as well as recording it on the document. Without it, an engine built through dependency injection logs through the container's logger factory and any other engine logs nothing.WithPassword(String?)Offers password to every encrypted document opened without credentials of its own.UseIccColorManagement(PdfOptions)Converts ICCBased colours through their embedded profiles: registers an IccColorManagement wrapping Default with UseColorManagement(IColorManagement).UseStandard14Fonts(PdfOptions)Draws non-embedded Standard 14 fonts with the package's fonts (Liberation Sans, Serif and Mono, Foxit Symbol and Dingbats), on every machine, ahead of operating-system fonts: registers a Standard14FontResolver with UseFontResolver(IFontResolver).UsePredefinedCMaps(PdfOptions)Gives composite fonts that name a predefined CMap (such as 90ms-RKSJ-H or UniGB-UTF16-H) its mappings, and makes the CID-to-Unicode tables of the Adobe CJK collections available: registers a PredefinedCMapResolver with UseFontResolver(IFontResolver).