Table of Contents

Class EpubWriter

Namespace
DocWright.Formats.Epub
Assembly
DocWright.Formats.Epub.dll

Writes the DocWright document model as an EPUB 3 publication.

public sealed class EpubWriter : IDocumentWriter
Inheritance
EpubWriter
Implements
Inherited Members

Remarks

This is a packager, not a second markup writer. EPUB content documents are XHTML, and DocWright.Formats.Html already emits it — its HtmlWriteOptions.XhtmlSyntax switch exists for exactly this caller. Everything here is what surrounds those documents: the OCF container, the OPF package document, the navigation document, and the decision about where one chapter ends and the next begins. A second DOM-to-markup mapper would drift from the first one construct at a time.

Export only. An EPUB is a spine of separate XHTML documents; reassembling one into a single word-processing document is a different problem from writing one, not its inverse.

Output is deterministic — byte-identical across runs for the same input and settings. The ZIP entry times are pinned to the MS-DOS epoch, dcterms:modified defaults to a fixed value rather than the clock, and the publication identifier is derived from the content rather than generated. Each of those would otherwise be a fresh value on every write.

Instances are stateless and safe for concurrent use.

Constructors

EpubWriter()

Initializes a writer with default settings — one content document per top-level heading.

EpubWriter(EpubWriteSettings)

Initializes a writer with format-specific settings.

Properties

Format

Gets the format this writer produces.

Methods

Write(IDocWrightDocument, Stream, DocumentWriteOptions, IConversionDiagnostics)

Writes the document to the stream.