BlazorEpub is a Razor Class Library using the Epub.js library for handle and render epub documents in Razor pages. Tested on Blazor Wasm projects without need to any css resourse and style.This package is currently in Persian, you add other languages.
EPUB files can store words, images, stylesheets, fonts, metadata details, and tables of content. They are considered layout agnostic, meaning that screen size doesn’t affect the formatting—EPUB files can display content on screens as small as 3.5″. This and the fact it’s a freely available standard is why a majority of eReaders support EPUB files.
Install this package in client_side project packages with:
Install-Package BlazorEpubReader -Version x.x
x.x is version of package for use last version see https://www.nuget.org/packages/BlazorEpubReader
add js files in client_side _Host.cshml or index.html
Befor closed body tag:
<script src="_content/BlazorEpub/jszip.min.js"></script>
<script src="_content/BlazorEpub/epub.js"></script>
then use:
<BlazorEpub.Epub FontSize="" FontFace="" EpubFile="" LastPageCfi="" Background="" Highlights="" OnHighlightText="" OnUpdateHighlightText="" OnNavigatingPage="" OnChangeBackground="" OnChangeFontFace="" OnChangeFontSize="" />
in your Components
your default font size.
your default fontfamily, Currently available Shabnam-FD, IRANSans, B NazaninB and Tahoma fonts.
your epub file url link.
your default cfi Range.
your default background color.
List of highlights in the template Highlight Class in Package.
call when user select and highlight part of text.return object as Highlight Class.
call when user edit exist highlight.return object as Highlight Class.
When navigating to the next/previous page or in any way navigat to special page.return cfiRange and page number.
when user change background color.return color hex code.
when user change font face.return a string of font face.
when user change font size.return a integer of font face.