Show / Hide Table of Contents

Class NavigationReaderOptions

Various options to configure the behavior of the EPUB navigation reader.

Inheritance
object
NavigationReaderOptions
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 NavigationReaderOptions

Constructors

View Source

NavigationReaderOptions(EpubReaderOptionsPreset?)

Initializes a new instance of the NavigationReaderOptions class.

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

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

Properties

View Source

AllowEpub2NavigationItemsWithEmptyTitles

Gets or sets a value indicating whether the EPUB navigation reader should ignore the error when a EPUB 2 navigation point has no navigation labels.

If it's set to false and NavigationLabels collection is empty, then the "Incorrect EPUB 2 NCX: navigation point ... should contain at least one navigation label." exception will be thrown. This exception can be suppressed by setting this property to true, in which case the reader will ignore this error and will set the Title property to an empty string.

This property has no effect on EPUB 3 navigation item validation as the EPUB 3 specification doesn't require the navigation items to have titles.

Default value is false.

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

SkipNavigationItemsReferencingMissingContent

Gets or sets a value indicating whether the EPUB navigation reader should skip navigation items referencing local content which is missing in the EPUB manifest.

If it's set to false and a navigation item is pointing to a URL inside the EPUB book which is not present in the EPUB manifest, then the "Incorrect EPUB 2 NCX: content source ... not found in EPUB manifest." exception (for EPUB 2 NCX documents) or the "Incorrect EPUB 3 navigation document: target for anchor href ... not found in EPUB manifest." exception (for EPUB 3 navigation documents) will be thrown. This exception can be suppressed by setting this property to true, in which case those navigation items will be skipped.

Default value is false.

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

SkipRemoteNavigationItems

Gets or sets a value indicating whether the EPUB navigation reader should skip navigation items that are referencing remote resources.

If it's set to false and a navigation item is pointing to an external URL outside of the EPUB book, then the "Incorrect EPUB 2 NCX: content source ... cannot be a remote resource." exception (for EPUB 2 NCX documents) or the "Incorrect EPUB 3 navigation document: anchor href ... cannot be a remote resource." exception (for EPUB 3 navigation documents) will be thrown. This exception can be suppressed by setting this property to true, in which case those navigation items will be skipped.

Default value is false.

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