Class EngineOptions
- Namespace
- ComOfficeKit
- Assembly
- ComOfficeKit.dll
What a server decides about the engine before its first document, given to Configure(EngineOptions).
public sealed class EngineOptions
- Inheritance
-
EngineOptions
- Inherited Members
Constructors
EngineOptions()
public EngineOptions()
Properties
FontDirectories
Folders searched for fonts, in order, before the system's: at most 64. Not on Windows, where DirectWrite uses the system's fonts: there any folder makes Configure(EngineOptions) throw ComOfficeKitException with Unsupported.
public IReadOnlyList<string> FontDirectories { get; init; }
Property Value
Remarks
On Linux a family is looked for in these folders, then in the two fonts the package carries beside the
engine (Carlito, which has Calibri's widths, and Caladea, which has Cambria's), then in the system's:
~/.local/share/fonts, ~/.fonts, /usr/local/share/fonts and /usr/share/fonts. A
family is taken whole from the first folder that has it. With no font in any of them, laying a document
out throws ComOfficeKitException with Internal, naming the folders
searched.
WorkingDirectory
The folder the engine works in: where a document unpacks while it is read or saved, where a file is staged before it replaces a saved one, and where the engine keeps a document's pictures while the document is open. ComOffice's own temporary files go there too, such as a document opened from a stream. Made when it is not there. Null for the system's temporary folder.
public string? WorkingDirectory { get; init; }
Property Value
Remarks
Give a folder the server owns, on a volume with room, that nothing else empties. With one, a document's pictures are deleted when it is disposed; without one, they stay in a cache that is trimmed over time.
WorkingDirectoryQuota
The most the engine keeps in WorkingDirectory at once, in bytes; null for no limit. Counted before anything is written: a document while it unpacks, being opened or saved, and, with a WorkingDirectory, its pictures while it is open. An open or a save that would pass it throws ComOfficeKitException with LimitExceeded and writes nothing.
public long? WorkingDirectoryQuota { get; init; }
Property Value
- long?
Remarks
A document needs its unpacked size to open: the size of its parts uncompressed. Across 1,891 files measured, that was typically about five times the file for a .docx or an .xlsx (one to ten times for most) and about the file's own size for a .pptx, whose pictures are already compressed; the most was 26 times. A save needs that again, and the size of the file. ComOffice's own temporary files are outside the quota: a document opened from a stream, and a PDF or a save written to a stream, each a file in the folder for a while.