Table of Contents

Class PdfEmbeddedFile

Namespace
PDiffy
Assembly
PDiffy.dll

A file attached to the document, in its list of attachments or through a FileAttachment annotation on a page. Hash is the first 16 hex digits of a SHA-256 of its contents. Unreadable is set when the contents are damaged.

public sealed record PdfEmbeddedFile : IEquatable<PdfEmbeddedFile>
Inheritance
PdfEmbeddedFile
Implements
Inherited Members

Properties

Description

The description the viewer shows for it; null when it has none.

public required string? Description { get; init; }

Property Value

string

FileName

The file name it was attached under; null when it has none.

public required string? FileName { get; init; }

Property Value

string

Hash

The first 16 hex digits of a SHA-256 of its contents; null when they're missing or damaged.

public required string? Hash { get; init; }

Property Value

string

Name

The file's key in the document's list of attachments, or for a file attached on a page, its file name.

public required string Name { get; init; }

Property Value

string

NamedBothWays

Whether its file specification gives the file name both ways PDF/UA asks: as /F and as /UF (Unicode). Snapshots print both-names=no when it doesn't.

public bool NamedBothWays { get; init; }

Property Value

bool

Page

The page of the FileAttachment annotation that holds it; null for a file in the document's list.

public int? Page { get; init; }

Property Value

int?

Relationship

How the file relates to the document, such as Source, Data or Supplement; null when it doesn't say. PdfFileRelationships lists them.

public required string? Relationship { get; init; }

Property Value

string

Size

The size of its contents in bytes, once decompressed; null when they're missing or damaged.

public required int? Size { get; init; }

Property Value

int?

Unreadable

Whether the contents are damaged, which leaves Size and Hash null.

public bool Unreadable { get; init; }

Property Value

bool