Show / Hide Table of Contents

Class ContainerFileReaderOptions

Various options to configure the behavior of the EPUB OCF container file reader.

Inheritance
object
ContainerFileReaderOptions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VersOne.Epub.Options
Assembly: VersOne.Epub.dll
Syntax
public class ContainerFileReaderOptions

Constructors

View Source

ContainerFileReaderOptions(EpubReaderOptionsPreset?)

Initializes a new instance of the ContainerFileReaderOptions class.

Declaration
public ContainerFileReaderOptions(EpubReaderOptionsPreset? preset = null)
Parameters
Type Name Description
EpubReaderOptionsPreset? preset

An optional preset to initialize the ContainerFileReaderOptions class with a predefined set of options.

Properties

View Source

IgnoreContainerFileIsNotValidXmlError

Gets or sets a value indicating whether the container reader should ignore the error when the EPUB OCF container file is not a valid XML file.

If it's set to false and an XML parsing error has occurred while trying to open the OCF container file, then the "EPUB parsing error: EPUB OCF container file is not a valid XML file." exception will be thrown with the original XmlException available through the InnerException property. This exception can be suppressed by setting this property to true. However, since the OCF container is the main file describing the location of the OPF package file, the EpubReader class methods will return null in this case.

Default value is false.

Declaration
public bool IgnoreContainerFileIsNotValidXmlError { get; set; }
Property type: bool
View Source

IgnoreMissingContainerFile

Gets or sets a value indicating whether the container file reader should ignore the missing EPUB OCF container file error.

The EPUB OCF container is the 'META-INF/container.xml' file inside the EPUB archive. If this property is set to false and the container file is not present, then the "EPUB parsing error: "META-INF/container.xml" file not found in the EPUB file." exception will be thrown. This exception can be suppressed by setting this property to true. However, since the OCF container is the main file describing the location of the OPF package file, the EpubReader class methods will return null in this case.

Default value is false.

Declaration
public bool IgnoreMissingContainerFile { get; set; }
Property type: bool
View Source

IgnoreMissingPackageFilePathError

Gets or sets a value indicating whether the container reader should ignore the error when the OPF package file path is missing in the OCF container document.

The path to the OPF package file is determined by the 'full-path' attribute of the 'urn:oasis:names:tc:opendocument:xmlns:container:container/rootfiles/rootfile' XML element. If it's set to false and the OPF package file is not found at the specified attribute, then the "EPUB parsing error: OPF package file path not found in the EPUB container." exception will be thrown. This exception can be suppressed by setting this property to true. However, since the OPF package is the main file describing the EPUB book, the EpubReader class methods will return null in this case.

Default value is false.

Declaration
public bool IgnoreMissingPackageFilePathError { get; set; }
Property type: bool
  • View Source
In this article
Back to top Generated by DocFX