ComOfficeby KDAN API Reference for Windows and Linux
Table of Contents

Namespace ComOfficeKit

Classes

ComOfficeKitException

A failure inside ComOffice or its engine. Arguments are checked before the engine is called, with .NET's own exceptions (ArgumentException and its subclasses, ObjectDisposedException, InvalidOperationException); this type reports what only the engine can find.

CompareResult

What Compare(string, string, string, string?) found.

ContentLoss

What a save as OpenDocument text (.odt) would leave out: content OpenDocument text does not carry here, counted from the file the document came from and from the document.

ContentLossException

A save as OpenDocument text (.odt) refused because it would leave content out; nothing was written. Kind is ContentLost. Tell the user what Loss counts, then save again with AcceptContentLoss set.

CopiedRange

A range as Copy(string, string) copied it, for the host to put on the system clipboard: Text as its text and Html as its HTML.

Document

An open document. Open(string) returns a WordDocument, a Spreadsheet or a Presentation; what only one kind can do is on that type.

Engine

The native engine this package runs on.

EngineOptions

What a server decides about the engine before its first document, given to Configure(EngineOptions).

FontSubstitution

A font a document asked for and was drawn in another (FontSubstitutions).

License

Activating ComOffice. Until a licence is active, every operation that reads, writes, renders, exports or compares a document throws LicenseException. Every member is safe to call from any thread.

LicenseException

A licence check failed. Kind is License.

PageImage

A page drawn by RenderPage(int, double): BGRA32 pixels, premultiplied, every one opaque, the top row first. That is what WPF's PixelFormats.Pbgra32 and WinUI's WriteableBitmap take. The image holds its own copy of the pixels: it needs no disposal and outlives its document.

PageText

The text a page draws and where it draws it (GetPageText(int)): what an application lays over the page's image so its user can select, copy and search what the page shows, or reads to find where a word is. It holds what the page draws as text, as RenderPage(int, double) draws it: headers and footers, footnotes and their marks, a watermark, a chart's labels, a turned shape's text. Text a clip hides, such as a cell's text past the cell, is not in it.

PageTextLine

Text a page draws along one baseline (Lines): its spans, in the order they are drawn, and a space between two spans drawn apart, which no span covers.

PageTextSpan

A stretch of a line drawn in one size at one baseline (Spans), with where each of its characters starts.

Presentation

A PowerPoint deck (.pptx).

SaveOptions

How a save is done: the options of Save(SaveOptions) and the SaveAs forms that take them.

Spreadsheet

A workbook: .xlsx, .xlsm, or a .csv or .tsv file read as a workbook of one sheet.

WordDocument

A Word document (.docx).

Enums

DocumentFormat

The file formats ComOffice reads and writes.

DocumentKind

The three kinds of document ComOffice opens.

ErrorKind

What kind of failure a ComOfficeKitException reports.

LicenseError

Why a licence check failed.

LicenseState

Whether a licence is active.

LicenseStorage

Where an activated licence is kept.

PasteSource

Where the cells of a PasteHtml(string, string, string?, string?) came from.