# PdfReadLimits

Resource budgets applied while parsing PDF syntax and object graphs.

Class 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[PdfReadLimits.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L39)

**Modifiers**

sealed

Resource budgets applied while parsing PDF syntax and object graphs.

## Inheritance

- object
- PdfReadLimits

## Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 2

- Property [PdfLoadOptions.Limits](/api/pdf/officeimo-pdf-pdfloadoptions/#property-limits)
- Method [PdfReadLimits.Clone](/api/pdf/officeimo-pdf-pdfreadlimits/#method-clone)

Filter members 

Show inherited

## Constructors

`public PdfReadLimits()` [#](#constructor-ctor)

[PdfReadLimits.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L39)

## Methods

`public PdfReadLimits Clone()` [#](#method-clone)

[PdfReadLimits.Snapshot.cs:5](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.Snapshot.cs#L5)

Creates an independent snapshot of every parser and content resource budget.

Returns

`PdfReadLimits`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public long MaxInputBytes { get; init; }` [#](#property-maxinputbytes)

[PdfReadLimits.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L39)

Maximum input byte count accepted before text/object scanning. Default: 512 MiB.

`public int MaxIndirectObjects { get; init; }` [#](#property-maxindirectobjects)

[PdfReadLimits.cs:42](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L42)

Maximum number of indirect object declarations accepted. Default: 500,000.

`public int MaxRawStreamBytes { get; init; }` [#](#property-maxrawstreambytes)

[PdfReadLimits.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L45)

Maximum raw byte count allocated for one stream. Default: 256 MiB.

`public int MaxDecodedStreamBytes { get; init; }` [#](#property-maxdecodedstreambytes)

[PdfReadLimits.cs:48](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L48)

Maximum decoded byte count produced from one filtered stream. Default: 256 MiB.

`public long MaxTotalDecodedStreamBytes { get; init; }` [#](#property-maxtotaldecodedstreambytes)

[PdfReadLimits.cs:51](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L51)

Maximum aggregate decoded stream bytes cached while parsing one document. Default: 512 MiB.

`public int MaxPageContentBytes { get; init; }` [#](#property-maxpagecontentbytes)

[PdfReadLimits.cs:54](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L54)

Maximum aggregate decoded content-stream bytes materialized for one page. Default: 256 MiB.

`public long MaxRetainedContentBytes { get; init; }` [#](#property-maxretainedcontentbytes)

[PdfReadLimits.cs:57](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L57)

Maximum aggregate decoded content-stream bytes retained by one document-wide validation operation. Default: 512 MiB.

`public int MaxActualTextCharacters { get; init; }` [#](#property-maxactualtextcharacters)

[PdfReadLimits.cs:60](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L60)

Maximum characters emitted from marked-content ActualText replacements on one page, including nested Form XObjects. Default: 1,000,000.

`public int MaxDecodedTextCharacters { get; init; }` [#](#property-maxdecodedtextcharacters)

[PdfReadLimits.cs:63](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L63)

Maximum font-decoded text characters emitted on one page, including nested Form XObjects. Default: 10,000,000.

`public int MaxTextSearchMatches { get; init; }` [#](#property-maxtextsearchmatches)

[PdfReadLimits.cs:66](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L66)

Maximum text-search matches materialized by one Find or ReplaceAll operation. Default: 100,000.

`public int MaxTextSearchFlowComparisons { get; init; }` [#](#property-maxtextsearchflowcomparisons)

[PdfReadLimits.cs:69](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L69)

Maximum geometric line-pair comparisons while grouping text-search flows on one page. Default: 1,000,000.

`public int MaxTextSearchTableDetectionWork { get; init; }` [#](#property-maxtextsearchtabledetectionwork)

[PdfReadLimits.cs:72](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L72)

Maximum layout work spent detecting table cells for text search on one page. Default: 1,000,000.

`public int MaxObjectCharacters { get; init; }` [#](#property-maxobjectcharacters)

[PdfReadLimits.cs:75](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L75)

Maximum characters tokenized from one object or dictionary. Default: 16,000,000.

`public int MaxTokensPerObject { get; init; }` [#](#property-maxtokensperobject)

[PdfReadLimits.cs:78](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L78)

Maximum syntax tokens accepted in one object or dictionary. Default: 1,000,000.

`public int MaxObjectNestingDepth { get; init; }` [#](#property-maxobjectnestingdepth)

[PdfReadLimits.cs:81](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L81)

Maximum nested array/dictionary depth accepted by the object parser. Default: 128.

`public TimeSpan MaxObjectParsingTime { get; init; }` [#](#property-maxobjectparsingtime)

[PdfReadLimits.cs:84](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L84)

Maximum wall-clock time spent in the core object parsing pass. Default: 30 seconds.

`public int MaxRevisions { get; init; }` [#](#property-maxrevisions)

[PdfReadLimits.cs:87](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L87)

Maximum cross-reference revisions discovered in one input. Default: 10,000.

`public int MaxPageTreeNodes { get; init; }` [#](#property-maxpagetreenodes)

[PdfReadLimits.cs:90](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L90)

Maximum page-tree dictionaries traversed. Default: 100,000.

`public int MaxPageTreeDepth { get; init; }` [#](#property-maxpagetreedepth)

[PdfReadLimits.cs:93](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L93)

Maximum nested page-tree depth. Default: 1,024.

`public int MaxPages { get; init; }` [#](#property-maxpages)

[PdfReadLimits.cs:96](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L96)

Maximum pages discovered in one document. Default: 100,000.

`public int MaxFormFields { get; init; }` [#](#property-maxformfields)

[PdfReadLimits.cs:99](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L99)

Maximum AcroForm field-tree nodes or terminal fields. Default: 100,000.

`public int MaxFormFieldDepth { get; init; }` [#](#property-maxformfielddepth)

[PdfReadLimits.cs:102](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L102)

Maximum nested AcroForm field-tree depth. Default: 256.

`public int MaxNameTreeNodes { get; init; }` [#](#property-maxnametreenodes)

[PdfReadLimits.cs:105](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L105)

Maximum indirect nodes traversed in one PDF name tree. Default: 100,000.

`public int MaxNameTreeDepth { get; init; }` [#](#property-maxnametreedepth)

[PdfReadLimits.cs:108](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L108)

Maximum nested PDF name-tree depth. Default: 128.

`public int MaxJavaScriptBytes { get; init; }` [#](#property-maxjavascriptbytes)

[PdfReadLimits.cs:111](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L111)

Maximum decoded source bytes retained for one named, form-field or widget JavaScript action. Default: 4,000,000.

`public int MaxJavaScripts { get; init; }` [#](#property-maxjavascripts)

[PdfReadLimits.cs:114](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L114)

Maximum JavaScript entries discovered in one PDF action surface. Default: 10,000.

`public int MaxWidgetActions { get; init; }` [#](#property-maxwidgetactions)

[PdfReadLimits.cs:117](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L117)

Maximum field and widget action nodes materialized while reading AcroForm action graphs. Default: 100,000.

`public long MaxTotalJavaScriptBytes { get; init; }` [#](#property-maxtotaljavascriptbytes)

[PdfReadLimits.cs:120](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L120)

Maximum aggregate decoded source bytes retained for one PDF JavaScript action surface. Default: 32 MiB.

`public int MaxAttachments { get; init; }` [#](#property-maxattachments)

[PdfReadLimits.cs:123](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L123)

Maximum attachment records discovered across name trees, associated files, and annotations. Default: 100,000.

`public long MaxTotalAttachmentBytes { get; init; }` [#](#property-maxtotalattachmentbytes)

[PdfReadLimits.cs:126](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L126)

Maximum aggregate decoded bytes retained for unique embedded attachment streams. Default: 256 MiB.

`public int MaxFormFieldAppearanceStates { get; init; }` [#](#property-maxformfieldappearancestates)

[PdfReadLimits.cs:129](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L129)

Maximum named appearance states declared for one AcroForm widget. Default: 4,096.

`public int MaxAnnotationsPerPage { get; init; }` [#](#property-maxannotationsperpage)

[PdfReadLimits.cs:132](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L132)

Maximum annotations declared on one page. Default: 100,000.

`public int MaxColorSpaceResourcesPerPage { get; init; }` [#](#property-maxcolorspaceresourcesperpage)

[PdfReadLimits.cs:135](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L135)

Maximum named color-space resources inspected on one page. Default: 4,096.

`public int MaxContentOperations { get; init; }` [#](#property-maxcontentoperations)

[PdfReadLimits.cs:138](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L138)

Maximum operators parsed from one page or form content stream. Default: 16,000,000.

`public int MaxFunctionShadingPixels { get; init; }` [#](#property-maxfunctionshadingpixels)

[PdfReadLimits.cs:141](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L141)

Maximum aggregate pixels sampled from function shadings during one page projection. Default: 16,000,000.

`public int MaxFunctionShadingEvaluationWork { get; init; }` [#](#property-maxfunctionshadingevaluationwork)

[PdfReadLimits.cs:144](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L144)

Maximum aggregate calculator work for function shading during one page projection. Default: 512,000,000.

`public int MaxContentOperands { get; init; }` [#](#property-maxcontentoperands)

[PdfReadLimits.cs:148](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L148)

Maximum operand values and dictionary keys parsed from one page or form content stream, and maximum cumulative dash-array entries projected during one page operation, including nested forms. Default: 16,000,000.

`public int MaxContentNestingDepth { get; init; }` [#](#property-maxcontentnestingdepth)

[PdfReadLimits.cs:151](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L151)

Maximum nested lexical arrays/dictionaries, marked-content scopes, or form XObjects while parsing page content. Default: 128.

`public int MaxGraphicsStateDepth { get; init; }` [#](#property-maxgraphicsstatedepth)

[PdfReadLimits.cs:161](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L161)

Maximum graphics states saved with q and not yet restored with Q in one content stream: page contents, a form XObject, a pattern, a Type 3 glyph or an annotation appearance. Default: 1,024.

`public int MaxType3GlyphInvocationsPerPage { get; init; }` [#](#property-maxtype3glyphinvocationsperpage)

[PdfReadLimits.cs:164](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L164)

Maximum Type 3 glyph programs invoked while rendering one page, including nested forms. Default: 1,000,000.

`public int MaxImageReferenceSteps { get; init; }` [#](#property-maximagereferencesteps)

[PdfReadLimits.cs:167](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L167)

Maximum indirect-reference steps followed while resolving one image's filter and decode-parameter arrays. Default: 100,000.

`public int MaxPositionedTextCharactersPerPage { get; init; }` [#](#property-maxpositionedtextcharactersperpage)

[PdfReadLimits.cs:170](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L170)

Maximum characters expanded into individually positioned drawing glyphs per page, including nested forms. Glyph frames rejected by page or clip bounds do not count. Default: 100,000.

`public int MaxPositionedTextWorkCharactersPerPage { get; init; }` [#](#property-maxpositionedtextworkcharactersperpage)

[PdfReadLimits.cs:173](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L173)

Maximum characters materialized or measured for positioned-glyph visibility in one page render, including invisible glyphs and nested forms. Charged before glyph strings or outlines are allocated. Default: 100,000.

`public int MaxPositionedTextProjectionCharactersPerPage { get; init; }` [#](#property-maxpositionedtextprojectioncharactersperpage)

[PdfReadLimits.cs:176](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L176)

Maximum characters scanned while projecting spaced text on one rendered page, including clipped and off-page runs. Default: 1,000,000.

`public int MaxClippedTextFontCopyWorkPerPage { get; init; }` [#](#property-maxclippedtextfontcopyworkperpage)

[PdfReadLimits.cs:179](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L179)

Maximum estimated face comparisons while copying fonts for clipped positioned text on one page. Default: 1,000,000.

`public long MaxClippingIntersectionWorkPerPage { get; init; }` [#](#property-maxclippingintersectionworkperpage)

[PdfReadLimits.cs:186](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L186)

Maximum clip-path intersection work (flattened vertices compared) while resolving the clipping paths of one page operation. Default: 1,000,000. Raise it for trusted documents whose dense clipping needs more; rendering retains clipped geometry per element, so higher values also raise render memory.

`public int MaxPrintProductionContexts { get; init; }` [#](#property-maxprintproductioncontexts)

[PdfReadLimits.cs:189](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L189)

Maximum distinct content-stream contexts examined by one PDF/X color inspection. Default: 4,096.

`public int MaxPrintProductionOperations { get; init; }` [#](#property-maxprintproductionoperations)

[PdfReadLimits.cs:192](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Options/PdfReadLimits.cs#L192)

Maximum aggregate content operations examined by one PDF/X color inspection. Default: 5,000,000.

<!-- PowerForge markdown artifact sha256:A1D7D494D8EBA9A1C53BF29AA9DD57D855CF02413139938837B72548AF41A51B -->
