API reference / Common / UDocType
Type Alias: UDocType
type UDocType = "image" | "portable" | "presentation" | "spreadsheet" | "wordprocessing";Which of the five doc types a document is — the tag every UDoc* union (UDocSelection, UDocCommand, …) carries, with the payload dropped.
A document type, not a file format — that is FileFormat, and many formats open into one doc type: Image covers JPEG, PNG, TIFF, SVG, EMF and more, and a .doc beside .docx would open into Wordprocessing rather than earn a variant here.
Fixed at construction — UDocSession opens the file into the doc type its format names and builds that doc type's session, and a document never changes type afterwards.
Crosses the host boundary by variant name ("portable", "presentation", …) — the same tag the UDoc* unions carry, so a host tags a UDocSelectionEdit with it directly.