EpubDocument
OfficeIMO.Epub
Represents extracted EPUB content.
Inheritance
- object
- EpubDocument
Usage
Explore 3 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 3
- Method EpubDocument.Load
- Method EpubDocument.LoadAsync
- Method EpubPublication.Read
Constructors
public EpubDocument() #Methods
public static OfficeContentSafetyReport InspectContentSafety(byte[] packageBytes, OfficeContentSafetyOptions? options = null, EpubLoadOptions? readOptions = null, CancellationToken cancellationToken = default) #Inspects concealed machine-readable HTML across bounded EPUB content documents.
Parameters
- packageBytes byte[]
- options OfficeIMO.ContentSafety.OfficeContentSafetyOptions? = null
- readOptions OfficeIMO.Epub.EpubLoadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
OfficeContentSafetyReportpublic static OfficeContentSafetyReport InspectContentSafety(string filePath, OfficeContentSafetyOptions? options = null, EpubLoadOptions? readOptions = null, CancellationToken cancellationToken = default) #Inspects concealed machine-readable HTML across a bounded EPUB file.
Parameters
- filePath string
- options OfficeIMO.ContentSafety.OfficeContentSafetyOptions? = null
- readOptions OfficeIMO.Epub.EpubLoadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
OfficeContentSafetyReportpublic static EpubDocument Load(string path, EpubLoadOptions? options = null) #Loads an EPUB document from a file.
Parameters
- path string
- options OfficeIMO.Epub.EpubLoadOptions? = null
Returns
EpubDocumentpublic static EpubDocument Load(Stream stream, EpubLoadOptions? options = null) #Loads an EPUB document from a caller-owned stream.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Epub.EpubLoadOptions? = null
Returns
EpubDocumentpublic static EpubDocument Load(string path, EpubLoadOptions? options, CancellationToken cancellationToken) #Loads a file with cancellation during package reading and parsing.
Parameters
- path string
- options OfficeIMO.Epub.EpubLoadOptions?
- cancellationToken System.Threading.CancellationToken
Returns
EpubDocumentpublic static EpubDocument Load(Stream stream, EpubLoadOptions? options, CancellationToken cancellationToken) #Loads a caller-owned stream with cancellation during reading and parsing.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Epub.EpubLoadOptions?
- cancellationToken System.Threading.CancellationToken
Returns
EpubDocumentpublic static async Task<EpubDocument> LoadAsync(string path, EpubLoadOptions? options = null, CancellationToken cancellationToken = default) #Asynchronously loads an EPUB document from a file.
Parameters
- path string
- options OfficeIMO.Epub.EpubLoadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<EpubDocument>public static async Task<EpubDocument> LoadAsync(Stream stream, EpubLoadOptions? options = null, CancellationToken cancellationToken = default) #Asynchronously loads an EPUB document from a caller-owned stream.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Epub.EpubLoadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<EpubDocument>public static OfficeProvenanceRemovalResult RemoveProvenance(string inputPath, string outputPath, OfficeProvenanceRemovalOptions? options = null) #Removes selected provenance and atomically writes an EPUB package.
Parameters
- inputPath string
- outputPath string
- options OfficeIMO.Provenance.OfficeProvenanceRemovalOptions? = null
Returns
OfficeProvenanceRemovalResultpublic static OfficeProvenanceRemovalResult RemoveProvenance(byte[] packageBytes, string fileName = "publication.epub", OfficeProvenanceRemovalOptions? options = null) #Removes selected provenance from encoded EPUB package bytes.
Parameters
- packageBytes byte[]
- fileName string = "publication.epub"
- options OfficeIMO.Provenance.OfficeProvenanceRemovalOptions? = null
Returns
OfficeProvenanceRemovalResultpublic static OfficeContentCleanupResult RemoveSelectedContent(byte[] packageBytes, OfficeContentCleanupSelection selection, OfficeContentCleanupOptions? options = null, EpubLoadOptions? readOptions = null, CancellationToken cancellationToken = default) #Removes exact selected concealed HTML findings, preserves other EPUB entries, and reopens the result.
Parameters
- packageBytes byte[]
- selection OfficeIMO.ContentSafety.OfficeContentCleanupSelection
- options OfficeIMO.ContentSafety.OfficeContentCleanupOptions? = null
- readOptions OfficeIMO.Epub.EpubLoadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
OfficeContentCleanupResultpublic static OfficeContentCleanupResult RemoveSelectedContent(string inputPath, string outputPath, OfficeContentCleanupSelection selection, OfficeContentCleanupOptions? options = null, EpubLoadOptions? readOptions = null, CancellationToken cancellationToken = default) #Atomically writes an explicitly cleaned EPUB artifact.
Parameters
- inputPath string
- outputPath string
- selection OfficeIMO.ContentSafety.OfficeContentCleanupSelection
- options OfficeIMO.ContentSafety.OfficeContentCleanupOptions? = null
- readOptions OfficeIMO.Epub.EpubLoadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
OfficeContentCleanupResultpublic static OfficeXmlPackageSigningResult SignPackage(string filePath, IOfficeSecurityProvider securityProvider, X509Certificate2 signingCertificate, OfficeXmlPackageSignatureOptions? options = null) #Creates, validates, and atomically commits an EPUB XML package signature.
Parameters
- filePath string
- securityProvider OfficeIMO.Security.IOfficeSecurityProvider
- signingCertificate System.Security.Cryptography.X509Certificates.X509Certificate2
- options OfficeIMO.Security.OfficeXmlPackageSignatureOptions? = null
Returns
OfficeXmlPackageSigningResultpublic static OfficeXmlPackageSigningResult TrySignPackage(string filePath, IOfficeSecurityProvider securityProvider, X509Certificate2 signingCertificate, OfficeXmlPackageSignatureOptions? options = null) #Attempts atomic EPUB XML signature creation and returns structured failure evidence.
Parameters
- filePath string
- securityProvider OfficeIMO.Security.IOfficeSecurityProvider
- signingCertificate System.Security.Cryptography.X509Certificates.X509Certificate2
- options OfficeIMO.Security.OfficeXmlPackageSignatureOptions? = null
Returns
OfficeXmlPackageSigningResultpublic static OfficeXmlPackageSignatureValidationReport ValidateSignatures(string filePath, IOfficeSecurityProvider securityProvider, OfficeXmlPackageSignatureOptions? options = null) #Validates META-INF/signatures.xml and signed EPUB entry digests through an explicit provider.
Parameters
- filePath string
- securityProvider OfficeIMO.Security.IOfficeSecurityProvider
- options OfficeIMO.Security.OfficeXmlPackageSignatureOptions? = null
Returns
OfficeXmlPackageSignatureValidationReportInherited Methods
Properties
public string? Identifier { get; internal set; } #Package identifier from OPF metadata when available.
public string? Language { get; internal set; } #Primary language from OPF metadata when available.
public string? Creator { get; internal set; } #Creator/author from OPF metadata when available.
public string? OpfPath { get; internal set; } #Internal path to the OPF package document when discovered.
public string? PackageVersion { get; internal set; } #Version declared by the OPF package element.
public string? UniqueIdentifierId { get; internal set; } #ID of the dc:identifier selected by the package unique-identifier attribute.
public EpubRenditionLayout? RenditionLayout { get; internal set; } #Globally declared rendition layout, or null when the package uses the default.
public bool IsFixedLayout { get; } #Whether the package globally declares a pre-paginated fixed layout.
public IReadOnlyList<EpubRootfile> Rootfiles { get; internal set; } #Ordered rootfile declarations from META-INF/container.xml.
public IReadOnlyList<EpubMetadataEntry> Metadata { get; internal set; } #Ordered OPF metadata declarations, including EPUB 3 refinements and EPUB 2 metadata.
public IReadOnlyList<EpubNavigationItem> TableOfContents { get; internal set; } #Hierarchical EPUB table of contents.
public IReadOnlyList<EpubNavigationItem> PageList { get; internal set; } #EPUB page-list navigation items.
public IReadOnlyList<EpubNavigationItem> Landmarks { get; internal set; } #EPUB landmarks or EPUB 2 guide references.
public IReadOnlyList<EpubChapter> Chapters { get; internal set; } #Extracted chapters.
public EpubReadSummary ReadSummary { get; internal set; } #Chapter extraction counts and completeness under the selected reading policy.
public IReadOnlyList<EpubResource> Resources { get; internal set; } #OPF manifest resources in deterministic package order.
public IReadOnlyList<EpubEncryptionInfo> Encryption { get; internal set; } #Encrypted or obfuscated resources declared by META-INF/encryption.xml.
public bool HasEncryptedResources { get; } #Whether the container declares any encrypted or obfuscated resources.
public bool RequiresDecryption { get; } #Whether one or more resources require unsupported decryption.
public EpubSignatureInfo Signatures { get; internal set; } #Structural information about META-INF/signatures.xml, when present.
public bool HasSignatures { get; } #Whether the EPUB container carries a signatures.xml document.
public IReadOnlyList<EpubDiagnostic> Diagnostics { get; internal set; } #Structured non-fatal diagnostics encountered during extraction.
public IReadOnlyList<string> Warnings { get; internal set; } #Non-fatal warnings encountered during extraction.