QuickEPUB 0.9.0
See the version list below for details.
dotnet add package QuickEPUB --version 0.9.0
NuGet\Install-Package QuickEPUB -Version 0.9.0
<PackageReference Include="QuickEPUB" Version="0.9.0" />
paket add QuickEPUB --version 0.9.0
#r "nuget: QuickEPUB, 0.9.0"
// Install QuickEPUB as a Cake Addin #addin nuget:?package=QuickEPUB&version=0.9.0 // Install QuickEPUB as a Cake Tool #tool nuget:?package=QuickEPUB&version=0.9.0
QuickEPUB
QuickEPUB is an open-source .NET library for generating simple eBooks in the EPUB format.
EPUB is a very powerful and flexible format for publishing eBooks. Most open-source libraries for creating EPUBs are just as powerful and flexible, but often require you to really understand how EPUBs work in order to use them effectively.
QuickEPUB is for developers that want a quick and easy way to take HTML content and export simple EPUB files from their apps.
Usage
- Create an
Epub
instance, specifying the title and author of the book - (Optional) Specify a language and/or unique identifier (ISBN, URL, whatever)
- Add sections of HTML content, each of which will get an entry in the table of contents
- (Optional) Add any CSS/image resources that are referenced in the HTML
- Export the instance to a file
Sample Code
// Create an Epub instance
Epub doc = new Epub("Book Title", "Author Name");
// Adding sections of HTML content
doc.AddSection("Chapter 1", "<p>Lorem ipsum dolor sit amet...</p>");
// Adding sections of HTML content (that reference image files)
doc.AddSection("Chapter 2", "<p><img src=\"image.jpg\" alt=\"Image\"/></p>");
// Adding images that are referenced in any of the sections
doc.AddResource("image.jpg", EpubResourceType.JPEG, new FileStream("image.jpg", FileMode.Open));
// Adding sections of HTML content (that use a custom CSS stylesheet)
doc.AddSection("Chapter 3", "<p class="body-text">Lorem ipsum dolor sit amet...</p>", "custom.css");
// Add any resources referenced in the HTML content
doc.AddResource("custom.css", EpubResourceType.CSS, new FileStream("custom.css", FileMode.Open));
// Export the result
using (FileStream fs = new FileStream("sample.epub", FileMode.Create))
{
doc.Export(fs);
}
The end result will be an EPUB named "sample.epub" with three sections in its table of contents:
- Chapter 1
- Chapter 2
- Chapter 3
The EPUB will also contain the two specified resources: "image.jpg"" and "custom.css".
Build
Building this project requires a PC with the .NET 6 SDK installed.
Then you should be able to run the following command to build QuickEPUB from its source folder:
dotnet build ./src/QuickEPUB.sln
Errata
QuickEPUB is open-source under the MIT license.
Copyright (c) 2016-2022 Jon Thysell.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.