Table of Contents

Class ArrayOrSingleItemHelper

Namespace
PdfSharp.Pdf
Assembly
PdfSharp.dll

Provides methods to handle keys that may contain a PdfArray or a single PdfItem.

public class ArrayOrSingleItemHelper
Inheritance
object
ArrayOrSingleItemHelper

Constructors

ArrayOrSingleItemHelper(DictionaryElements)

Initializes ArrayOrSingleItemHelper with PdfDictionary.DictionaryElements to work with.

Methods

Add(string, PdfItem, bool)

Adds a PdfItem to the given key. Creates a PdfArray containing the items, if needed.

Contains<T>(string, Func<T, bool>)

Returns true if the given key contains a PdfItem of type T matching a predicate.

Contains<T>(string, object)

Returns true if the given key contains a PdfItem of type T, that is equal to value.

Contains<T>(string, T)

Returns true if the given key contains a PdfItem of type T, that is equal to value.

GetAll(string)

Gets all PdfItems saved in the given key.

Get<T>(string, Func<T, bool>)

Gets the PdfItem(s) of type T saved in the given key, that match a predicate.

Get<T>(string, object)

Gets the PdfItem(s) of type T saved in the given key, that are equal to value.

Get<T>(string, T)

Gets the PdfItem(s) of type T saved in the given key, that are equal to value.

Remove<T>(string, Func<T, bool>)

Removes the PdfItem(s) of type T saved in the given key, that match a predicate. Removes the PdfArray, if no longer needed. Returns true if items were removed.

Remove<T>(string, object)

Removes the PdfItem(s) of type T saved in the given key, that are equal to value. Removes the PdfArray, if no longer needed. Returns true if items were removed.

Remove<T>(string, T)

Removes the PdfItem(s) of type T saved in the given key, that are equal to value. Removes the PdfArray, if no longer needed. Returns true if items were removed.