Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

BookProject

Namespace OfficeIMO.Workflows
Assembly OfficeIMO.Workflows
Modifiers sealed

An editable publication and its retained manuscript review state. Instances are mutable and not thread-safe.

Inheritance

  • Object
  • BookProject

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Methods

public Void AcknowledgeImportLoss() #
Returns: Void

Records author acceptance of import approximations and omissions. Failed imports require source repair and re-import.

public String AddChapter(String title, CancellationToken cancellationToken = default) #
Returns: String

Appends a chapter, retaining the first XHTML chapter's head and resolving its resource references from the new location.

Parameters

title System.String requiredposition: 0
cancellationToken System.Threading.CancellationToken = default optionalposition: 1
public Void ApplyEdits(BookProjectEdits edits, CancellationToken cancellationToken = default) #
Returns: Void

Applies a complete editor draft in one transaction; failure retains the previous publication.

Parameters

edits OfficeIMO.Workflows.BookProjectEdits requiredposition: 0
cancellationToken System.Threading.CancellationToken = default optionalposition: 1
public static BookProject Create(String title, String language = "en") #
Returns: BookProject

Creates a reflowable EPUB project with an editable first chapter.

Parameters

title System.String requiredposition: 0
language System.String = "en" optionalposition: 1
public EpubWriteResult Export(CancellationToken cancellationToken = default) #
Returns: EpubWriteResult

Exports a complete EPUB after import review and canonical writer validation.

Parameters

cancellationToken System.Threading.CancellationToken = default optionalposition: 0
public static BookProject FromEpub(Byte[] bytes, CancellationToken cancellationToken = default) #
Returns: BookProject

Opens an existing EPUB for package-preserving editing without claiming that its content was converted.

Parameters

bytes System.Byte[] requiredposition: 0
cancellationToken System.Threading.CancellationToken = default optionalposition: 1
public static BookProject FromImport(EpubManuscriptResult result) #
Returns: BookProject

Starts a project from the shared manuscript import result.

Parameters

result OfficeIMO.Epub.EpubManuscriptResult requiredposition: 0
public static BookProject LoadProject(Byte[] bytes, CancellationToken cancellationToken = default) #
Returns: BookProject

Loads an .oibook project after physical ZIP, byte, schema and entry validation. No files are extracted.

Parameters

bytes System.Byte[] requiredposition: 0
cancellationToken System.Threading.CancellationToken = default optionalposition: 1
public Void MoveChapter(Int32 fromIndex, Int32 toIndex, CancellationToken cancellationToken = default) #
Returns: Void

Moves a chapter and its top-level navigation entry atomically, retaining nested navigation.

Parameters

fromIndex System.Int32 requiredposition: 0
toIndex System.Int32 requiredposition: 1
cancellationToken System.Threading.CancellationToken = default optionalposition: 2
public IReadOnlyList<OfficeImageExportResult> PreviewChapter(Int32 index, Double width = 816, CancellationToken cancellationToken = default) #
Returns: IReadOnlyList<OfficeImageExportResult>

Renders one current chapter through the existing EPUB image owner, using retained package resources only.

Parameters

index System.Int32 requiredposition: 0
width System.Double = 816 optionalposition: 1
cancellationToken System.Threading.CancellationToken = default optionalposition: 2
public Void Redo(CancellationToken cancellationToken = default) #
Returns: Void

Restores the publication that was replaced by the last undo.

Parameters

cancellationToken System.Threading.CancellationToken = default optionalposition: 0
public Void RemoveChapter(Int32 index, CancellationToken cancellationToken = default) #
Returns: Void

Removes a chapter and its navigation entries. Remaining content links must still resolve; otherwise the removal is rolled back.

Parameters

index System.Int32 requiredposition: 0
cancellationToken System.Threading.CancellationToken = default optionalposition: 1
public Void RenameChapter(Int32 index, String title, CancellationToken cancellationToken = default) #
Returns: Void

Renames a chapter's document title, first matching heading and matching primary navigation label atomically.

Parameters

index System.Int32 requiredposition: 0
title System.String requiredposition: 1
cancellationToken System.Threading.CancellationToken = default optionalposition: 2
public Void SetChapterBody(Int32 index, String bodyXml, CancellationToken cancellationToken = default) #
Returns: Void

Replaces a chapter's XHTML body while retaining its document head and package declarations.

Parameters

index System.Int32 requiredposition: 0
bodyXml System.String requiredposition: 1
cancellationToken System.Threading.CancellationToken = default optionalposition: 2
public Void SetCoverImage(Byte[] bytes, String mediaType, CancellationToken cancellationToken = default) #
Returns: Void

Selects newly supplied image bytes as the package cover, retaining earlier resources and content references.

Parameters

bytes System.Byte[] requiredposition: 0
mediaType System.String requiredposition: 1
cancellationToken System.Threading.CancellationToken = default optionalposition: 2
public Void SetMetadata(String title, String language, String creator, CancellationToken cancellationToken = default) #
Returns: Void

Updates primary package metadata atomically, retaining other values and refinements. A blank creator retains the current value.

Parameters

title System.String requiredposition: 0
language System.String requiredposition: 1
creator System.String requiredposition: 2
cancellationToken System.Threading.CancellationToken = default optionalposition: 3
public Void SetStylesheet(String css, CancellationToken cancellationToken = default) #
Returns: Void

Changes the project typography stylesheet without replacing imported source CSS.

Parameters

css System.String requiredposition: 0
cancellationToken System.Threading.CancellationToken = default optionalposition: 1
public Byte[] ToProjectBytes(CancellationToken cancellationToken = default) #
Returns: Byte[]

Serializes an editable .oibook project. Publication bytes and review acceptance are retained together.

Parameters

cancellationToken System.Threading.CancellationToken = default optionalposition: 0
public Void Undo(CancellationToken cancellationToken = default) #
Returns: Void

Restores the previous validated publication while retaining import review state.

Parameters

cancellationToken System.Threading.CancellationToken = default optionalposition: 0

Properties

public EpubPublication Publication { get; } #

Canonical EPUB authoring model backing this project.

public Boolean CanUndo { get; } #

Whether one validated package edit can be undone. History is session-only and bounded to 128 MiB per snapshot.

public Boolean CanRedo { get; } #

Whether the last package undo can be redone.

public IReadOnlyList<OfficeConversionFidelityDiagnostic> ImportDiagnostics { get; } #

Retained category-preserving manuscript import diagnostics.

public Boolean ImportLossAcknowledged { get; set; } #

Whether the author has reviewed and accepted non-fatal import losses.

public Boolean CanExport { get; } #

Whether import review permits export. Native writer validation still runs for every export.

Fields

public const Int64 MaximumProjectBytes #

Maximum stored project size, including its bounded EPUB and review record.

Value: 136314880