BookProject
OfficeIMO.Workflows
An editable publication and its retained manuscript review state. Instances are mutable and not thread-safe.
Inheritance
- object
- BookProject
Usage
Explore 4 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 4
- Method BookProject.Create
- Method BookProject.FromEpub
- Method BookProject.FromImport
- Method BookProject.LoadProject
Methods
public void AcknowledgeImportLoss() #Records author acceptance of import approximations and omissions. Failed imports require source repair and re-import.
public string AddChapter(string title, CancellationToken cancellationToken = default) #Appends a chapter, retaining the first XHTML chapter's head and resolving its resource references from the new location.
Parameters
- title string
- cancellationToken System.Threading.CancellationToken = default
Returns
stringpublic void ApplyContentEdits(IEnumerable<EpubContentEdit> edits, CancellationToken cancellationToken = default) #Applies stale-checked scoped content edits in one undoable transaction.
Parameters
- edits System.Collections.Generic.IEnumerable<OfficeIMO.Epub.EpubContentEdit>
- cancellationToken System.Threading.CancellationToken = default
public void ApplyEdits(BookProjectEdits edits, CancellationToken cancellationToken = default) #Applies a complete editor draft in one transaction; failure retains the previous publication.
Parameters
- edits OfficeIMO.Workflows.BookProjectEdits
- cancellationToken System.Threading.CancellationToken = default
public EpubEditionComparison CompareRevision(string revisionId, CancellationToken cancellationToken = default) #Compares a retained revision with the current publication through the EPUB owner.
Parameters
- revisionId string
- cancellationToken System.Threading.CancellationToken = default
Returns
EpubEditionComparisonpublic static BookProject Create(string title, string language = "en") #Creates a reflowable EPUB project with an editable first chapter.
Parameters
- title string
- language string = "en"
Returns
BookProjectpublic BookProjectRevision CreateRevision(string name, CancellationToken cancellationToken = default) #Captures the current validated publication. Exhausted bounds reject capture without evicting earlier revisions.
Parameters
- name string
- cancellationToken System.Threading.CancellationToken = default
Returns
BookProjectRevisionpublic EpubWriteResult Export(CancellationToken cancellationToken = default) #Exports a complete EPUB after import review and canonical writer validation.
Parameters
- cancellationToken System.Threading.CancellationToken = default
Returns
EpubWriteResultpublic EpubWriteResult Export(EpubSaveOptions options, CancellationToken cancellationToken = default) #Exports a reviewed publication with explicit EPUB writer limits and signature policy.
Parameters
- options OfficeIMO.Epub.EpubSaveOptions
- cancellationToken System.Threading.CancellationToken = default
Returns
EpubWriteResultpublic BookOnixExportResult ExportOnix(BookOnixExportOptions options, XmlSchemaSet schemas, EpubSaveOptions? epubOptions = null, CancellationToken cancellationToken = default) #Exports a single-product digital-download ONIX bibliographic record, validated against a caller-supplied compiled schema set. The schema must declare ONIXMessage in the ONIX 3.1 reference namespace. Callers own schema provenance and must not mutate the schema set during export. The result retains the exact validated EPUB from which the title and selected ISBN were obtained. This is a complete-record notification, not a block update; commercial fields require explicit caller assertions.
Parameters
- options OfficeIMO.Workflows.BookOnixExportOptions
- schemas System.Xml.Schema.XmlSchemaSet
- epubOptions OfficeIMO.Epub.EpubSaveOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
BookOnixExportResultpublic static BookProject FromEpub(byte[] bytes, CancellationToken cancellationToken = default) #Opens an existing EPUB for package-preserving editing without claiming that its content was converted.
Parameters
- bytes byte[]
- cancellationToken System.Threading.CancellationToken = default
Returns
BookProjectpublic static BookProject FromImport(EpubManuscriptResult result) #Starts a project from the shared manuscript import result.
Parameters
- result OfficeIMO.Epub.EpubManuscriptResult
Returns
BookProjectpublic static BookProject LoadProject(byte[] bytes, CancellationToken cancellationToken = default) #Loads an .oibook project after physical ZIP, byte, schema and entry validation. No files are extracted.
Parameters
- bytes byte[]
- cancellationToken System.Threading.CancellationToken = default
Returns
BookProjectpublic void MergeChapters(string firstManifestId, string secondManifestId, string boundaryId, CancellationToken cancellationToken = default) #Merges consecutive compatible chapters, repairing references in one undoable transaction.
Parameters
- firstManifestId string
- secondManifestId string
- boundaryId string
- cancellationToken System.Threading.CancellationToken = default
public void MergeChapters(string firstManifestId, string secondManifestId, string boundaryId, EpubChapterMergeOptions options, CancellationToken cancellationToken = default) #Merges chapters using explicit EPUB reconciliation options in one undoable transaction.
Parameters
- firstManifestId string
- secondManifestId string
- boundaryId string
- options OfficeIMO.Epub.EpubChapterMergeOptions
- cancellationToken System.Threading.CancellationToken = default
public void MoveChapter(int fromIndex, int toIndex, CancellationToken cancellationToken = default) #Moves a chapter and its top-level navigation entry atomically, retaining nested navigation.
Parameters
- fromIndex int
- toIndex int
- cancellationToken System.Threading.CancellationToken = default
public IReadOnlyList<OfficeImageExportResult> PreviewChapter(int index, double width = 816, CancellationToken cancellationToken = default) #Renders one current chapter through the existing EPUB image owner, using retained package resources only.
Parameters
- index int
- width double = 816
- cancellationToken System.Threading.CancellationToken = default
Returns
IReadOnlyList<OfficeImageExportResult>public void Redo(CancellationToken cancellationToken = default) #Restores the publication that was replaced by the last undo.
Parameters
- cancellationToken System.Threading.CancellationToken = default
public void RemoveChapter(int index, CancellationToken cancellationToken = default) #Removes a chapter and its navigation entries. Remaining content links must still resolve; otherwise the removal is rolled back.
Parameters
- index int
- cancellationToken System.Threading.CancellationToken = default
public void RemoveRevision(string revisionId) #Explicitly removes a named snapshot without changing the current publication or session undo.
Parameters
- revisionId string
public void RenameChapter(int index, string title, CancellationToken cancellationToken = default) #Renames a chapter's document title, first matching heading and matching primary navigation label atomically.
Parameters
- index int
- title string
- cancellationToken System.Threading.CancellationToken = default
public void RenameResource(string manifestId, string containerPath, CancellationToken cancellationToken = default) #Moves a publication resource and repairs its references in an undoable project edit.
Parameters
- manifestId string
- containerPath string
- cancellationToken System.Threading.CancellationToken = default
public void RestoreRevision(string revisionId, CancellationToken cancellationToken = default) #Restores a named publication snapshot as an undoable edit, retaining all revisions and import review state.
Parameters
- revisionId string
- cancellationToken System.Threading.CancellationToken = default
public void SetChapterBody(int index, string bodyXml, CancellationToken cancellationToken = default) #Replaces a chapter's XHTML body while retaining its document head and package declarations.
Parameters
- index int
- bodyXml string
- cancellationToken System.Threading.CancellationToken = default
public void SetCoverImage(byte[] bytes, string mediaType, CancellationToken cancellationToken = default) #Selects newly supplied image bytes as the package cover, retaining earlier resources and content references.
Parameters
- bytes byte[]
- mediaType string
- cancellationToken System.Threading.CancellationToken = default
public void SetMetadata(string title, string language, string creator, CancellationToken cancellationToken = default) #Updates primary package metadata atomically, retaining other values and refinements. A blank creator retains the current value.
Parameters
- title string
- language string
- creator string
- cancellationToken System.Threading.CancellationToken = default
public void SetStylesheet(string css, CancellationToken cancellationToken = default) #Changes the project typography stylesheet without replacing imported source CSS.
Parameters
- css string
- cancellationToken System.Threading.CancellationToken = default
public void SplitChapter(string manifestId, string boundaryId, string newManifestId, string newContainerPath, string title, CancellationToken cancellationToken = default) #Splits a chapter before a block identifier, with reference repair and one undoable transaction.
Parameters
- manifestId string
- boundaryId string
- newManifestId string
- newContainerPath string
- title string
- cancellationToken System.Threading.CancellationToken = default
public byte[] ToDeliveryBytes(EpubSaveOptions? options = null, long maximumOutputBytes = 140509184, CancellationToken cancellationToken = default) #Exports a reviewed EPUB, its exact selected OPF payload and a versioned checksum manifest in a ZIP. This local handoff format does not perform ONIX conversion, external validation or retailer submission. Publication, OPF and manifest limits are 128 MiB, 4 MiB and 1 MiB respectively. No files are written and project history is not included.
Parameters
- options OfficeIMO.Epub.EpubSaveOptions? = null
- maximumOutputBytes long = 140509184
- cancellationToken System.Threading.CancellationToken = default
Returns
byte[]public byte[] ToKdpDeliveryBytes(byte[] listingCover, EpubSaveOptions? options = null, long maximumOutputBytes = 192937984, CancellationToken cancellationToken = default) #Prepares an offline KDP handoff containing publication.epub, package.opf, a separate listing cover and a versioned manifest. The ZIP is an OfficeIMO handoff, not an upload format.
Parameters
- listingCover byte[]
- options OfficeIMO.Epub.EpubSaveOptions? = null
- maximumOutputBytes long = 192937984
- cancellationToken System.Threading.CancellationToken = default
Returns
byte[]public byte[] ToProjectBytes(CancellationToken cancellationToken = default) #Serializes an editable .oibook project. Publication bytes and review acceptance are retained together.
Parameters
- cancellationToken System.Threading.CancellationToken = default
Returns
byte[]public void Undo(CancellationToken cancellationToken = default) #Restores the previous validated publication while retaining import review state.
Parameters
- cancellationToken System.Threading.CancellationToken = default
Inherited Methods
Properties
public EpubPublication Publication { get; } #Canonical EPUB authoring model backing this project.
public bool CanUndo { get; } #Whether one validated package edit can be undone. History is session-only and bounded to 128 MiB per snapshot.
public IReadOnlyList<OfficeDiagnostic> ImportDiagnostics { get; } #Retained category-preserving manuscript import diagnostics.
public bool ImportLossAcknowledged { get; private set; } #Whether the author has reviewed and accepted non-fatal import losses.
public bool CanExport { get; } #Whether import review permits export. Native writer validation still runs for every export.
public IReadOnlyList<BookProjectRevision> Revisions { get; } #Named revisions in creation order. Import review state is project-wide, not reverted with content.
Fields
public const long MaximumDeliveryBytes #Maximum delivery ZIP size: a bounded EPUB, package metadata, manifest and ZIP overhead.
140509184public const long MaximumKdpDeliveryBytes #Local KDP handoff ZIP ceiling, including the publication and separate cover.
192937984public const int MaximumKdpCoverBytes #Conservative local cover byte cap: strictly below 50 decimal MB.
49999999public const long MaximumKdpCoverPixels #Local cover decoding limit, independent of the retailer's dimension rules.
16000000public const string OnixNamespace #Namespace of the supported ONIX 3.1 reference-tag export profile.
http://ns.editeur.org/onix/3.1/referencepublic const long MaximumProjectBytes #Maximum stored project size, including its bounded EPUB and review record.
272629760public const long MaximumRevisionBytes #Maximum combined stored EPUB bytes in named revisions.
134217728public const long MaximumRevisionExpandedBytes #Maximum combined expanded EPUB bytes in named revisions.
268435456