API Reference
EpubDocument
Represents extracted EPUB content.
Inheritance
- Object
- EpubDocument
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 EpubDocument.Load
- Method EpubDocument.Load
- Method EpubDocument.LoadAsync
- Method EpubDocument.LoadAsync
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
- arg1 System.Byte[]
- arg2 OfficeIMO.ContentSafety.OfficeContentSafetyOptions = null
- arg3 OfficeIMO.Epub.EpubReadOptions = null
- arg4 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
- arg1 System.String
- arg2 OfficeIMO.ContentSafety.OfficeContentSafetyOptions = null
- arg3 OfficeIMO.Epub.EpubReadOptions = null
- arg4 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 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
- arg1 System.String
- arg2 System.String
- arg3 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
- arg1 System.Byte[]
- arg2 System.String = "publication.epub"
- arg3 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 override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public String Title { get; set; } #Best-effort document title.
public String Identifier { get; set; } #Package identifier from OPF metadata when available.
public String Language { get; set; } #Primary language from OPF metadata when available.
public String Creator { get; set; } #Creator/author from OPF metadata when available.
public String OpfPath { get; set; } #Internal path to the OPF package document when discovered.
public String PackageVersion { get; set; } #Version declared by the OPF package element.
public String UniqueIdentifierId { get; set; } #ID of the dc:identifier selected by the package unique-identifier attribute.
public Nullable<EpubRenditionLayout> RenditionLayout { get; 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; set; } #Ordered rootfile declarations from META-INF/container.xml.
public IReadOnlyList<EpubMetadataEntry> Metadata { get; set; } #Ordered OPF metadata declarations, including EPUB 3 refinements and EPUB 2 metadata.
public IReadOnlyList<EpubNavigationItem> TableOfContents { get; set; } #Hierarchical EPUB table of contents.
public IReadOnlyList<EpubNavigationItem> PageList { get; set; } #EPUB page-list navigation items.
public IReadOnlyList<EpubNavigationItem> Landmarks { get; set; } #EPUB landmarks or EPUB 2 guide references.
public IReadOnlyList<EpubChapter> Chapters { get; set; } #Extracted chapters.
public IReadOnlyList<EpubResource> Resources { get; set; } #OPF manifest resources in deterministic package order.
public IReadOnlyList<EpubEncryptionInfo> Encryption { get; 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; 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; set; } #Structured non-fatal diagnostics encountered during extraction.
public IReadOnlyList<String> Warnings { get; set; } #Non-fatal warnings encountered during extraction.