I want to get the HTML content of an epub file by page. I tried epubx package but it's not working correctly. Has anyone managed to get HTML of an epub by page?
Asked
Active
Viewed 593 times
-1
-
https://pub.dev/packages/epub_view try this – Kaushik Chandru Jun 04 '22 at 20:58
-
What I need is not to show the epub directly. I need to get the HTML of epub – batuhankrbb Jun 04 '22 at 21:56
1 Answers
0
Try this package epub_parser
You can fetch html like the following
// Enumerating chapters
epubBook.Chapters.forEach((EpubChapter chapter) {
// HTML content of current chapter
String chapterHtmlContent = chapter.HtmlContent;
});

Kaushik Chandru
- 15,510
- 2
- 12
- 30
-
I've tried epub_parser and also epubx but those are probably the same package and unfortunately it has tons of bugs like not converting all pages. – batuhankrbb Jun 05 '22 at 07:23
-
That is partially dependant on the epub file also. Some are images converted to a page which cannot be converted to html if it has text. To test this package convert a normal word document to epub and try using that epub file. It should be able to convert to html completely. – Kaushik Chandru Jun 05 '22 at 07:27