This project is read-only.
Project Description
Generates ePub packages (i.e. eBooks).

Enables the generation of ePub packages in both .NET 4.5 & Windows Store App. API is fully async and relies only on System.IO.Compression.ZipArchive (i.e. no other NuGet packages).

You can find the NuGet package here:

Code sample:

        private static async Task TestEPub()
            var ePubStream = File.Create("Test.epub");

            using (var writer = await EPubWriter.CreateWriterAsync(
                "My Title",
                "Me, The Author",
                "My Unique Identifier"))
                //  Optional parameter
                writer.Publisher = "Demo App";

                //  Add a chapter with string content as x-html
                await writer.AddChapterAsync(
                    "First Chapter Title",

                //  Streaming mode
                var chapterStream = writer.GetChapterStream(
                    "Second Chapter - Streaming");

                //  Fill the chapter-stream
                //  await chapterStream.WriteAsync(...)

                //  Add an image from the disk
                await writer.AddResourceAsync("MyLogo.png", "image/png", File.ReadAllBytes("MyLogo.png"));

                //  Streaming mode for images
                var imageStream = writer.GetResourceStream("MyBackground.jpg", "image/jpeg");

                //  Fill the image-stream
                //  await imageStream.WriteAsync(...)

                //  Must be called async at the end to write down the TOC of the ePub
                await writer.WriteEndOfPackageAsync();

Last edited Nov 7, 2013 at 2:30 AM by vincent_lauzon, version 4