PDFsharp-net6

PdfArray

Namespace: PdfSharp.Pdf

Represents a PDF array object.

public class PdfArray : PdfObject, System.ICloneable, System.Collections.Generic.IEnumerable`1[[PdfSharp.Pdf.PdfItem, PdfSharp, Version=0.1.3.0, Culture=neutral, PublicKeyToken=null]], System.Collections.IEnumerable

Inheritance ObjectPdfItemPdfObjectPdfArray
Implements ICloneable, IEnumerable<PdfItem>, IEnumerable

Properties

Elements

Gets the collection containing the elements of this object.

public ArrayElements Elements { get; }

Property Value

ArrayElements

Owner

Gets the PdfDocument this object belongs to.

public PdfDocument Owner { get; }

Property Value

PdfDocument

IsIndirect

Indicates whether the object is an indirect object.

public bool IsIndirect { get; }

Property Value

Boolean

Internals

Gets the PdfInternals object of this document, that grants access to some internal structures which are not part of the public interface of PdfDocument.

public PdfObjectInternals Internals { get; }

Property Value

PdfObjectInternals

Reference

Gets the indirect reference of this object. If the value is null, this object is a direct object.

public PdfReference Reference { get; internal set; }

Property Value

PdfReference

ReferenceNotNull

Gets the indirect reference of this object. Throws if it is null.

public PdfReference ReferenceNotNull { get; }

Property Value

PdfReference

Exceptions

InvalidOperationException
The indirect reference must be not null here.

Constructors

PdfArray()

Initializes a new instance of the PdfArray class.

public PdfArray()

PdfArray(PdfDocument)

Initializes a new instance of the PdfArray class.

public PdfArray(PdfDocument document)

Parameters

document PdfDocument
The document.

PdfArray(PdfDocument, PdfItem[])

Initializes a new instance of the PdfArray class.

public PdfArray(PdfDocument document, PdfItem[] items)

Parameters

document PdfDocument
The document.

items PdfItem[]
The items.

Methods

Clone()

Creates a copy of this array. Direct elements are deep copied. Indirect references are not modified.

public PdfArray Clone()

Returns

PdfArray

Copy()

Implements the copy mechanism.

protected object Copy()

Returns

Object

GetEnumerator()

Returns an enumerator that iterates through a collection.

public IEnumerator<PdfItem> GetEnumerator()

Returns

IEnumerator<PdfItem>

ToString()

Returns a string with the content of this object in a readable form. Useful for debugging purposes only.

public string ToString()

Returns

String

WriteObject(PdfWriter)

internal void WriteObject(PdfWriter writer)

Parameters

writer PdfWriter