PdfEmbeddedFileCollection Class

The files embedded in a document: the /EmbeddedFiles name tree of the name dictionary of the catalog (ISO 32000-2, 7.7.4, 7.11.4). The files added are also associated with the document (/AF of the catalog, 14.13), as PDF/A-3 and PDF/A-4f require.

Implements

Properties

NameDescription
CountGets the number of files.

Gets the number of files.

public int Count { get; }

Property value

int

Indexers

NameDescription
this[int]Gets a file.

Gets a file.

public PdfEmbeddedFile this[int index] { get; }

Parameters

index int
The index, in the order of the keys of the name tree.

Property value

PdfEmbeddedFile

Methods

NameDescription
Add(string, ReadOnlySpan<byte>, PdfEmbeddedFileOptions?)Embeds a file in the document.
GetEnumerator()Returns an enumerator over the files.
Remove(PdfEmbeddedFile)Removes a file from the document: from the name tree and from the files associated with the document.
System.Collections.IEnumerable.GetEnumerator()

Add(string, ReadOnlySpan<byte>, PdfEmbeddedFileOptions?)

PdfEmbeddedFileCollection.cs

Embeds a file in the document.

public PdfEmbeddedFile Add(string fileName, ReadOnlySpan<byte> data, PdfEmbeddedFileOptions? options = null)

Parameters

fileName string
The name of the file, the key of the name tree: it is unique in the document.
data ReadOnlySpan<byte>
The content of the file.
options PdfEmbeddedFileOptions?
The attributes of the file, or null for the defaults.

Returns

PdfEmbeddedFile The file.

Exceptions

ArgumentException
fileName is empty or the name of another file of the document, or the MIME type is not valid.

Returns an enumerator over the files.

public IEnumerator<PdfEmbeddedFile> GetEnumerator()

Returns

IEnumerator<PdfEmbeddedFile> The enumerator.

Remove(PdfEmbeddedFile)

PdfEmbeddedFileCollection.cs

Removes a file from the document: from the name tree and from the files associated with the document.

public bool Remove(PdfEmbeddedFile file)

Parameters

file PdfEmbeddedFile
The file.

Returns

bool true when the file was a file of the document.

System.Collections.IEnumerable.GetEnumerator()

PdfEmbeddedFileCollection.cs
IEnumerator IEnumerable.GetEnumerator()

No documentation is available.