[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.Spec.IPdfRefExt.TryResolve

TryResolve Method

TryResolve<T>(IPdfRef, out T, out bool, bool)

Tries to resolve the reference and return the GrapeCity.Documents.Pdf.Spec.IPdfObject of the specified type referenced by this IPdfRef.

Declaration
public static bool TryResolve<T>(this IPdfRef pr, out T value, out bool isNull, bool addWarning) where T : IPdfObject
Public Shared Function TryResolve(Of T As IPdfObject)(pr As IPdfRef, ByRef value As T, ByRef isNull As Boolean, addWarning As Boolean) As Boolean
Parameters
Type Name Description
IPdfRef pr

The current IPdfRef.

T value

OUT: The referenced PDF indirect object.

bool isNull

OUT: Indicates whether the referenced value is IPdfNull.

bool addWarning

Indicates whether to add a warning if the reference cannot be resolved to an object of the specified type.

Returns
Type Description
bool

true if successful, false otherwise.

Type Parameters
Name Description
T

The type of the indirect PDF object.

TryResolve<T>(IPdfRef, out T, bool)

Tries to return actual GrapeCity.Documents.Pdf.Spec.IPdfObject referenced by the IPdfRef.

Declaration
public static bool TryResolve<T>(this IPdfRef pr, out T value, bool addWarning) where T : IPdfObject
Public Shared Function TryResolve(Of T As IPdfObject)(pr As IPdfRef, ByRef value As T, addWarning As Boolean) As Boolean
Parameters
Type Name Description
IPdfRef pr

The current IPdfRef.

T value

OUT: The referenced PDF indirect object.

bool addWarning

Indicates whether to add a warning if referenced can't be resolved to an object of specified type.

Returns
Type Description
bool

true if successful, false otherwise.

Type Parameters
Name Description
T

The type of indirect PDF object.