1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- using System.Collections.Generic;
- using System.Drawing;
- using System.IO;
- using System.Linq;
- using VersOne.Epub;
- namespace GxPress.Common.Epub
- {
-
-
-
- public static class Analysis
- {
-
-
-
-
- public static void ProcessMake()
- {
-
-
-
-
-
-
-
-
-
- EpubBook epubBook = EpubReader.ReadBook("wwwroot/cache/20200529/e875998ea9e3407888d93f9060a4154a.epub");
-
- string title = epubBook.Title;
-
- string author = epubBook.Author;
-
- List<string> authors = epubBook.AuthorList;
-
-
-
-
-
-
-
-
-
-
-
- foreach (EpubNavigationItem chapter in epubBook.Navigation)
- {
-
- string chapterTitle = chapter.Title;
-
- List<EpubNavigationItem> subChapters = chapter.NestedItems;
- }
-
-
- foreach (EpubTextContentFile textContentFile in epubBook.ReadingOrder)
- {
-
- string htmlContent = textContentFile.Content;
- }
-
-
- EpubContent bookContent = epubBook.Content;
-
-
- Dictionary<string, EpubByteContentFile> images = bookContent.Images;
- EpubByteContentFile firstImage = images.Values.First();
-
- EpubContentType contentType = firstImage.ContentType;
-
- string mimeType = firstImage.ContentMimeType;
-
- using (MemoryStream imageStream = new MemoryStream(firstImage.Content))
- {
- Image image = Image.FromStream(imageStream);
- }
- }
- }
- }
|