Skip to content

Extensions

Extensions is a static class defined in PdfFormat.cs offering a single display-formatting extension method for PdfFormat. Its name is very generic for a public extension class shipped from a package, since it gives no indication of what it extends.*

Purpose

  • Renders a PdfFormat value as its display string ("pdf" or "pdf/a") for use in user-facing or logged output.

Context

  • Namespace: PdfAPI.Core
  • Assembly/package: PdfAPI.Core

Public members

Member Signature Purpose
ToDisplay(PdfFormat) static string ToDisplay(this PdfFormat format) Converts PdfFormat.Pdf to "pdf" and PdfFormat.PdfA to "pdf/a".

Behavioral notes

  • Being a public, generically-named static class, Extensions could collide with an identically-named extension class from another referenced library if both are imported in the same file.*

Constraints and usage notes

  • Import the PdfAPI.Core namespace to bring ToDisplay into scope as an extension method on PdfFormat.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • PdfAPI.Core\PdfFormat.cs