Method GetObject
GetObject(int, VCF, Type?)
Gets the PdfObject with the specified index, or null if no such object exists. If the index refers to a reference, the referenced PdfObject is returned.
public PdfObject? GetObject(int index, VCF options = VCF.None, Type? valueType = null)
Parameters
indexintoptionsVCFvalueTypeType
Returns
GetObject<T>(int, VCF)
Gets a PDF object of type T from the specified index. If the found object is a PDF reference or a PDF container (array or dictionary) but not of type T it is tried to be transformed into this type and replaces the old object. If the transformation is not possible, e.g. because T does not match with the found type, an exception is thrown. Returns null if the found object is neither a PDF reference nor a PDF container.
public T? GetObject<T>(int index, VCF options = VCF.None) where T : PdfObject
Parameters
indexintThe 0-based index of the object.
optionsVCF
Returns
- T
Type Parameters
TThe type of the PDF object to get.