Table of Contents

Class FileAttachment

Namespace
Rustaveli.Pdf
Assembly
Rustaveli.Pdf.Operations.dll

A file carried inside a PDF, listed among its attachments: the XML of an electronic invoice, a spreadsheet of the figures a report shows, the source a drawing was made from.

public sealed class FileAttachment
Inheritance
FileAttachment
Inherited Members

Constructors

FileAttachment(string, byte[])

An attachment of content, listed as name.

public FileAttachment(string name, byte[] content)

Parameters

name string
content byte[]

Properties

Content

public byte[] Content { get; }

Property Value

byte[]

CreationDate

public DateTimeOffset? CreationDate { get; init; }

Property Value

DateTimeOffset?

Description

What the file is, as readers show it beside the name.

public string? Description { get; init; }

Property Value

string

MediaType

The file's media type, such as text/xml; PDF/A-3 requires one.

public string? MediaType { get; init; }

Property Value

string

ModificationDate

When the file last changed; PDF/A-3 requires one, and the moment of saving stands in when none is given.

public DateTimeOffset? ModificationDate { get; init; }

Property Value

DateTimeOffset?

Name

The file's name as readers list it, such as factur-x.xml.

public string Name { get; }

Property Value

string

Relationship

How the file relates to the document, as PDF/A-3 records it.

public AttachmentRelationship Relationship { get; init; }

Property Value

AttachmentRelationship

Methods

FromFile(string)

An attachment of the file at path, listed by its file name.

public static FileAttachment FromFile(string path)

Parameters

path string

Returns

FileAttachment