[]
Contains extension methods for the IPdfRef interface, allows working with PdfRef and PdfRefObject in the same way.
public static class IPdfRefExt
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)
The referenced indirect object.
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
pr IPdfRefThe current IPdfRef.
addWarning boolIndicates whether to add a warning if referenced can't be resolved to an object of specified type.
The referenced PDF indirect object.
TThe type of indirect PDF object.
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
pr IPdfRefThe current IPdfRef.
value TOUT: The referenced PDF indirect object.
addWarning boolIndicates whether to add a warning if referenced can't be resolved to an object of specified type.
true if successful, false otherwise.
TThe type of indirect PDF object.
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
pr IPdfRefThe current IPdfRef.
value TOUT: The referenced PDF indirect object.
isNull boolOUT: Indicates whether the referenced value is IPdfNull.
addWarning boolIndicates whether to add a warning if the reference cannot be resolved to an object of the specified type.
true if successful, false otherwise.
TThe type of the indirect PDF object.