API Reference
EpubDocument
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, EpubReadOptions? readOptions = null, CancellationToken cancellationToken = default) #OfficeContentSafetyReportInspects concealed machine-readable HTML across bounded EPUB content documents.
Parameters
- packageBytes System.Byte[]
- options OfficeIMO.ContentSafety.OfficeContentSafetyOptions? = null
- readOptions OfficeIMO.Epub.EpubReadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
public static OfficeContentSafetyReport InspectContentSafety(String filePath, OfficeContentSafetyOptions? options = null, EpubReadOptions? readOptions = null, CancellationToken cancellationToken = default) #OfficeContentSafetyReportInspects concealed machine-readable HTML across a bounded EPUB file.
Parameters
- filePath System.String
- options OfficeIMO.ContentSafety.OfficeContentSafetyOptions? = null
- readOptions OfficeIMO.Epub.EpubReadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
public static OfficeProvenanceReport InspectProvenance(String filePath, OfficeProvenanceOptions? options = null) #OfficeProvenanceReportInspects C2PA and IPTC provenance in an EPUB package and its supported embedded images.
Parameters
- filePath System.String
- options OfficeIMO.Provenance.OfficeProvenanceOptions? = null
public static EpubDocument Load(String path, EpubReadOptions? options = null) #EpubDocumentLoads an EPUB document from a file.
Parameters
- path System.String
- options OfficeIMO.Epub.EpubReadOptions? = null
public static EpubDocument Load(Stream stream, EpubReadOptions? options = null) #EpubDocumentLoads an EPUB document from a caller-owned stream.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Epub.EpubReadOptions? = null
public static EpubDocument Load(String path, EpubReadOptions? options, CancellationToken cancellationToken) #EpubDocumentLoads a file with cancellation during package reading and parsing.
Parameters
- path System.String
- options OfficeIMO.Epub.EpubReadOptions?
- cancellationToken System.Threading.CancellationToken
public static EpubDocument Load(Stream stream, EpubReadOptions? options, CancellationToken cancellationToken) #EpubDocumentLoads a caller-owned stream with cancellation during reading and parsing.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Epub.EpubReadOptions?
- cancellationToken System.Threading.CancellationToken
public static async Task<EpubDocument> LoadAsync(String path, EpubReadOptions? options = null, CancellationToken cancellationToken = default) #Task<EpubDocument>Asynchronously loads an EPUB document from a file.
Parameters
- path System.String
- options OfficeIMO.Epub.EpubReadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
public static async Task<EpubDocument> LoadAsync(Stream stream, EpubReadOptions? options = null, CancellationToken cancellationToken = default) #Task<EpubDocument>Asynchronously loads an EPUB document from a caller-owned stream.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Epub.EpubReadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
public static OfficeProvenanceRemovalResult RemoveProvenance(String inputPath, String outputPath, OfficeProvenanceRemovalOptions? options = null) #OfficeProvenanceRemovalResultRemoves selected provenance and atomically writes an EPUB package.
Parameters
- inputPath System.String
- outputPath System.String
- options OfficeIMO.Provenance.OfficeProvenanceRemovalOptions? = null
public static OfficeProvenanceRemovalResult RemoveProvenance(Byte[] packageBytes, String fileName = "publication.epub", OfficeProvenanceRemovalOptions? options = null) #OfficeProvenanceRemovalResultRemoves selected provenance from encoded EPUB package bytes.
Parameters
- packageBytes System.Byte[]
- fileName System.String = "publication.epub"
- options OfficeIMO.Provenance.OfficeProvenanceRemovalOptions? = null
public static OfficeContentCleanupResult RemoveSelectedContent(Byte[] packageBytes, OfficeContentCleanupSelection selection, OfficeContentCleanupOptions? options = null, EpubReadOptions? readOptions = null, CancellationToken cancellationToken = default) #OfficeContentCleanupResultRemoves exact selected concealed HTML findings, preserves other EPUB entries, and reopens the result.
Parameters
- packageBytes System.Byte[]
- selection OfficeIMO.ContentSafety.OfficeContentCleanupSelection
- options OfficeIMO.ContentSafety.OfficeContentCleanupOptions? = null
- readOptions OfficeIMO.Epub.EpubReadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
public static OfficeContentCleanupResult RemoveSelectedContent(String inputPath, String outputPath, OfficeContentCleanupSelection selection, OfficeContentCleanupOptions? options = null, EpubReadOptions? readOptions = null, CancellationToken cancellationToken = default) #OfficeContentCleanupResultAtomically writes an explicitly cleaned EPUB artifact.
Parameters
- inputPath System.String
- outputPath System.String
- selection OfficeIMO.ContentSafety.OfficeContentCleanupSelection
- options OfficeIMO.ContentSafety.OfficeContentCleanupOptions? = null
- readOptions OfficeIMO.Epub.EpubReadOptions? = null
- cancellationToken System.Threading.CancellationToken = default
public static OfficeXmlPackageSigningResult SignPackage(String filePath, IOfficeSecurityProvider securityProvider, X509Certificate2 signingCertificate, OfficeXmlPackageSignatureOptions? options = null) #OfficeXmlPackageSigningResultCreates, validates, and atomically commits an EPUB XML package signature.
Parameters
- filePath System.String
- securityProvider OfficeIMO.Security.IOfficeSecurityProvider
- signingCertificate System.Security.Cryptography.X509Certificates.X509Certificate2
- options OfficeIMO.Security.OfficeXmlPackageSignatureOptions? = null
public static OfficeXmlPackageSigningResult TrySignPackage(String filePath, IOfficeSecurityProvider securityProvider, X509Certificate2 signingCertificate, OfficeXmlPackageSignatureOptions? options = null) #OfficeXmlPackageSigningResultAttempts atomic EPUB XML signature creation and returns structured failure evidence.
Parameters
- filePath System.String
- securityProvider OfficeIMO.Security.IOfficeSecurityProvider
- signingCertificate System.Security.Cryptography.X509Certificates.X509Certificate2
- options OfficeIMO.Security.OfficeXmlPackageSignatureOptions? = null
public static OfficeXmlPackageSignatureValidationReport ValidatePackageSignatures(String filePath, IOfficeSecurityProvider securityProvider, OfficeXmlPackageSignatureOptions? options = null) #OfficeXmlPackageSignatureValidationReportValidates META-INF/signatures.xml and signed EPUB entry digests through an explicit provider.
Parameters
- filePath System.String
- securityProvider OfficeIMO.Security.IOfficeSecurityProvider
- options OfficeIMO.Security.OfficeXmlPackageSignatureOptions? = null
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
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 Boolean 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 Boolean HasEncryptedResources { get; } #Whether the container declares any encrypted or obfuscated resources.
public Boolean 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 Boolean 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.