API Reference
BookProject
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.
Returned or exposed by
- Method BookProject.Create
- Method BookProject.FromEpub
- Method BookProject.FromImport
- Method BookProject.LoadProject
Methods
public Void AcknowledgeImportLoss() #VoidRecords author acceptance of import approximations and omissions. Failed imports require source repair and re-import.
public String AddChapter(String title, CancellationToken cancellationToken = default) #StringAppends a chapter, retaining the first XHTML chapter's head and resolving its resource references from the new location.
Parameters
- title System.String
- cancellationToken System.Threading.CancellationToken = default
public Void ApplyEdits(BookProjectEdits edits, CancellationToken cancellationToken = default) #VoidApplies a complete editor draft in one transaction; failure retains the previous publication.
Parameters
- edits OfficeIMO.Workflows.BookProjectEdits
- cancellationToken System.Threading.CancellationToken = default
public static BookProject Create(String title, String language = "en") #BookProjectCreates a reflowable EPUB project with an editable first chapter.
Parameters
- title System.String
- language System.String = "en"
public EpubWriteResult Export(CancellationToken cancellationToken = default) #EpubWriteResultExports a complete EPUB after import review and canonical writer validation.
Parameters
- cancellationToken System.Threading.CancellationToken = default
public static BookProject FromEpub(Byte[] bytes, CancellationToken cancellationToken = default) #BookProjectOpens an existing EPUB for package-preserving editing without claiming that its content was converted.
Parameters
- bytes System.Byte[]
- cancellationToken System.Threading.CancellationToken = default
public static BookProject FromImport(EpubManuscriptResult result) #BookProjectStarts a project from the shared manuscript import result.
Parameters
- result OfficeIMO.Epub.EpubManuscriptResult
public static BookProject LoadProject(Byte[] bytes, CancellationToken cancellationToken = default) #BookProjectLoads an .oibook project after physical ZIP, byte, schema and entry validation. No files are extracted.
Parameters
- bytes System.Byte[]
- cancellationToken System.Threading.CancellationToken = default
public Void MoveChapter(Int32 fromIndex, Int32 toIndex, CancellationToken cancellationToken = default) #VoidMoves a chapter and its top-level navigation entry atomically, retaining nested navigation.
Parameters
- fromIndex System.Int32
- toIndex System.Int32
- cancellationToken System.Threading.CancellationToken = default
public IReadOnlyList<OfficeImageExportResult> PreviewChapter(Int32 index, Double width = 816, CancellationToken cancellationToken = default) #IReadOnlyList<OfficeImageExportResult>Renders one current chapter through the existing EPUB image owner, using retained package resources only.
Parameters
- index System.Int32
- width System.Double = 816
- cancellationToken System.Threading.CancellationToken = default
public Void Redo(CancellationToken cancellationToken = default) #VoidRestores the publication that was replaced by the last undo.
Parameters
- cancellationToken System.Threading.CancellationToken = default
public Void RemoveChapter(Int32 index, CancellationToken cancellationToken = default) #VoidRemoves a chapter and its navigation entries. Remaining content links must still resolve; otherwise the removal is rolled back.
Parameters
- index System.Int32
- cancellationToken System.Threading.CancellationToken = default
public Void RenameChapter(Int32 index, String title, CancellationToken cancellationToken = default) #VoidRenames a chapter's document title, first matching heading and matching primary navigation label atomically.
Parameters
- index System.Int32
- title System.String
- cancellationToken System.Threading.CancellationToken = default
public Void SetChapterBody(Int32 index, String bodyXml, CancellationToken cancellationToken = default) #VoidReplaces a chapter's XHTML body while retaining its document head and package declarations.
Parameters
- index System.Int32
- bodyXml System.String
- cancellationToken System.Threading.CancellationToken = default
public Void SetCoverImage(Byte[] bytes, String mediaType, CancellationToken cancellationToken = default) #VoidSelects newly supplied image bytes as the package cover, retaining earlier resources and content references.
Parameters
- bytes System.Byte[]
- mediaType System.String
- cancellationToken System.Threading.CancellationToken = default
public Void SetMetadata(String title, String language, String creator, CancellationToken cancellationToken = default) #VoidUpdates primary package metadata atomically, retaining other values and refinements. A blank creator retains the current value.
Parameters
- title System.String
- language System.String
- creator System.String
- cancellationToken System.Threading.CancellationToken = default
public Void SetStylesheet(String css, CancellationToken cancellationToken = default) #VoidChanges the project typography stylesheet without replacing imported source CSS.
Parameters
- css System.String
- cancellationToken System.Threading.CancellationToken = default
public Byte[] ToProjectBytes(CancellationToken cancellationToken = default) #Byte[]Serializes an editable .oibook project. Publication bytes and review acceptance are retained together.
Parameters
- cancellationToken System.Threading.CancellationToken = default
public Void Undo(CancellationToken cancellationToken = default) #VoidRestores the previous validated publication while retaining import review state.
Parameters
- cancellationToken System.Threading.CancellationToken = default
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
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.
136314880