Table of Contents

Class PdfMetadata

Namespace
PDiffy
Assembly
PDiffy.dll

Document metadata from the Info dictionary and XMP. CustomProperties holds every Info entry not covered by the other properties, such as a company name or a classification label.

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

Properties

Author

The Info dictionary's author; null when it has none.

public required string? Author { get; init; }

Property Value

string

Creator

The program the document was made in before it became a PDF, such as a word processor; null when the Info dictionary doesn't say. Printed like Producer.

public required string? Creator { get; init; }

Property Value

string

CustomProperties

The Info entries the other properties don't cover, sorted by name.

public IReadOnlyList<PdfProperty> CustomProperties { get; init; }

Property Value

IReadOnlyList<PdfProperty>

Declarations

The PDF Declarations the XMP makes (pdfd:declarations), such as Well-Tagged PDF, sorted by what each conforms to. PDiffy records the claims; it doesn't check them.

public IReadOnlyList<PdfDeclaration> Declarations { get; init; }

Property Value

IReadOnlyList<PdfDeclaration>

HasCreatedDate

Whether the Info dictionary has a creation date. The date itself is left out, since it changes every time the file is made.

public required bool HasCreatedDate { get; init; }

Property Value

bool

HasModifiedDate

Whether the Info dictionary has a modification date, which is left out for the same reason.

public required bool HasModifiedDate { get; init; }

Property Value

bool

HasXmp

Whether the catalog has an XMP metadata stream. A snapshot can't tell a missing one from one with none of the values it prints.

public bool HasXmp { get; init; }

Property Value

bool

Keywords

The Info dictionary's keywords, as one string the way the PDF writes them; null when it has none.

public required string? Keywords { get; init; }

Property Value

string

PdfAConformance

The PDF/A part and conformance level the XMP claims, such as "2B".

public string? PdfAConformance { get; init; }

Property Value

string

PdfUaPart

The PDF/UA part the XMP claims (pdfuaid:part), such as "1" or "2"; null when it claims none.

public required string? PdfUaPart { get; init; }

Property Value

string

PdfUaRevision

The year of the PDF/UA revision the XMP claims (pdfuaid:rev), such as "2024" for PDF/UA-2; null when it claims none. PDiffy records the claim; it doesn't check it.

public string? PdfUaRevision { get; init; }

Property Value

string

Producer

The program that wrote the PDF, such as a PDF library; null when the Info dictionary doesn't say. Snapshots print only whether it's there unless ShowProducerAndCreator() is used.

public required string? Producer { get; init; }

Property Value

string

Subject

The Info dictionary's subject; null when it has none.

public required string? Subject { get; init; }

Property Value

string

Title

The Info dictionary's title; null when it has none. XmpTitle is the XMP's.

public required string? Title { get; init; }

Property Value

string

XmpCreator

The XMP creator (dc:creator), several joined with "; "; null when the XMP has none.

public string? XmpCreator { get; init; }

Property Value

string

XmpDescription

The XMP description (dc:description), several joined with "; "; null when the XMP has none.

public string? XmpDescription { get; init; }

Property Value

string

XmpKeywords

The XMP keywords (pdf:Keywords), the counterpart of the Info dictionary's Keywords; null when the XMP has none.

public string? XmpKeywords { get; init; }

Property Value

string

XmpLanguage

The XMP language (dc:language), several joined with "; "; null when the XMP has none.

public string? XmpLanguage { get; init; }

Property Value

string

XmpSubject

The XMP subject (dc:subject), a list of keywords joined with "; "; null when the XMP has none.

public string? XmpSubject { get; init; }

Property Value

string

XmpTitle

The XMP title (dc:title), not the Info dictionary's Title; the last language version when it has several, and null when the XMP has none.

public required string? XmpTitle { get; init; }

Property Value

string

XmpUnreadable

Set when the XMP isn't well-formed XML, has a DTD or nests more than 256 deep; the XMP values are then null.

public bool XmpUnreadable { get; init; }

Property Value

bool