Class PdfLimitExceededException
Namespace: AdCodicem.Pdf.Diagnostics
Assembly: AdCodicem.Pdf.dll
Thrown when reading reaches one of the reader's guards and PdfReaderOptions.ThrowOnLimit asks for an exception rather than a warning.
public sealed class PdfLimitExceededException : PdfException, ISerializable
Inheritance
object ← Exception ← PdfException ← PdfLimitExceededException
Implements
Inherited Members
Exception.GetBaseException(), Exception.GetType(), Exception.ToString(), Exception.Data, Exception.HelpLink, Exception.HResult, Exception.InnerException, Exception.Message, Exception.Source, Exception.StackTrace, Exception.TargetSite, object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Remarks
The guard is the reader's, not a fault of the file: the document may be valid. Raising the property PdfLimitExceededException.LimitName names on PdfReaderLimits reads it further.
Constructors
PdfLimitExceededException(string, string, int, string, long)
Initializes a new instance.
public PdfLimitExceededException(string code, string limitName, int limit, string message, long position = -1)
Parameters
code string
The limit.* code of PdfDiagnosticCodes the guard reports under.
limitName string
The PdfReaderLimits property that sets the guard.
limit int
The value of that property when the guard was reached.
message string
What was reached, and where.
position long
The byte offset the guard was reached at, or -1 when it relates to no position.
Properties
Code
Gets the limit.* code of PdfDiagnosticCodes the guard reports under.
public string Code { get; }
Property Value
Limit
Gets the value of that property when the guard was reached.
public int Limit { get; }
Property Value
LimitName
Gets the name of the PdfReaderLimits property that sets the guard, such as
MaxDecodedStreamLength.
public string LimitName { get; }
Property Value
Position
Gets the byte offset the guard was reached at, or -1 when it relates to no position, as the diagnostic the guard reports under places it (PdfDiagnostic.Position): a chain of cross-reference sections cut where it goes on outside the file is placed at the section that names where.
public long Position { get; }