PdfElixide.Document.Metadata (pdf_elixide v0.8.0)

Copy Markdown View Source

Document Info dictionary metadata — a PDF's classic /Info fields.

Every field is optional and defaults to nil; a document with no /Info dictionary yields a struct with all fields nil. Obtain it with PdfElixide.Document.metadata/1.

For richer, XML-based metadata (which many modern PDFs carry instead of, or in addition to, the Info dictionary) see PdfElixide.Document.xmp_metadata/1.

Fields

  • :title, :author, :subject — document title, author, and subject.
  • :keywords — the raw /Keywords string (PDF stores it as a single string; the split list, when available, is on the XMP :subjects field).
  • :creator — the application that created the original document.
  • :producer — the application that produced the PDF.
  • :creation_date, :mod_date — the raw PDF date strings (e.g. "D:20230101120000+00'00'"); not parsed into DateTime.
  • :trapped — the /Trapped value ("True", "False", or "Unknown").

Summary

Types

t()

@type t() :: %PdfElixide.Document.Metadata{
  author: String.t() | nil,
  creation_date: String.t() | nil,
  creator: String.t() | nil,
  keywords: String.t() | nil,
  mod_date: String.t() | nil,
  producer: String.t() | nil,
  subject: String.t() | nil,
  title: String.t() | nil,
  trapped: String.t() | nil
}