[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.Spec.IPdfRefExt

Class IPdfRefExt

Namespace
GrapeCity.Documents.Pdf.Spec
Assembly
GcDocs.Pdf.dll

Contains extension methods for the IPdfRef interface, allows working with PdfRef and PdfRefObject in the same way.

public static class IPdfRefExt
Inheritance
object
IPdfRefExt
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Methods

Resolve(IPdfRef)

Returns the GrapeCity.Documents.Pdf.Spec.IPdfObject referenced by this IPdfRef, or null if the referenced object cannot be fetched.

public static IPdfObject Resolve(this IPdfRef ipr)

Parameters

ipr IPdfRef

The current IPdfRef.

Returns

GrapeCity.Documents.Pdf.Spec.IPdfObject

The referenced indirect object.

Resolve<T>(IPdfRef, bool)

Return actual GrapeCity.Documents.Pdf.Spec.IPdfObject referenced by the IPdfRef.

public static T Resolve<T>(this IPdfRef pr, bool addWarning = true) where T : IPdfObject

Parameters

pr IPdfRef

The current IPdfRef.

addWarning bool

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

Returns

T

The referenced PDF indirect object.

Type Parameters

T

The type of indirect PDF object.

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

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

public static bool TryResolve<T>(this IPdfRef pr, out T value, bool addWarning) where T : IPdfObject

Parameters

pr IPdfRef

The current IPdfRef.

value T

OUT: The referenced PDF indirect object.

addWarning bool

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

Returns

bool

true if successful, false otherwise.

Type Parameters

T

The type of indirect PDF object.

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.

public static bool TryResolve<T>(this IPdfRef pr, out T value, out bool isNull, bool addWarning) where T : IPdfObject

Parameters

pr IPdfRef

The current IPdfRef.

value T

OUT: The referenced PDF indirect object.

isNull bool

OUT: Indicates whether the referenced value is IPdfNull.

addWarning bool

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

Returns

bool

true if successful, false otherwise.

Type Parameters

T

The type of the indirect PDF object.