-1

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?

batuhankrbb
  • 598
  • 7
  • 10

1 Answers1

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