![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Apr 2023
Device: Kindle Paperwhite 11th gen
|
![]()
I noticed a lack of an ePub generation library for .NET and decided to make one. I thought that I was creating the final file properly, and Calibre was able to open and display it without any issues, but my Kindle won't read it, and the online ePub validators I tried just mostly hang without showing any useful errors.
I hope that perhaps someone more knowledgable about the format would be able to dissect what I generated and point me toward's what's wrong. The generated ebook is attached to the post, and in case you don't trust random files downloaded from the internet, you can find the source code of the generator here and run the Demo project (requires .NET 8 SDK) to generate the exact same file I attached here. |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,276
Karma: 6700678
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
The epub is incomplete.
you have a single style in the css file being p But the text in the html files have no p tags surrounding it. It is just raw text with no tags. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,545
Karma: 74358018
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Did you not see https://github.com/jonthysell/QuickEPUB ?
Additionally there is ePubCheck https://github.com/w3c/epubcheck?tab=readme-ov-file |
![]() |
![]() |
![]() |
#4 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38,782
Karma: 153006036
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
For what it is worth, I ran the epub through epubcheck and it came up with a list of 12 errors.
Some of them are trivial such as no <p></p> tags for text and the space before the first line in the ncx file. Spoiler:
Please note that calibre's viewer is very forgiving. Most dedicated renderers are not forgiving. If your ePub fails epubcheck, most publishers will bounce it back to you to be fixed. Last edited by DNSB; 07-23-2024 at 08:32 PM. |
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Apr 2023
Device: Kindle Paperwhite 11th gen
|
Thanks for the answers! I did manage to fix my code, so it generates proper epubs now (at least according to EpubCheck)
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
the rook, bossing Never.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,230
Karma: 89531599
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
And no Kindle reads epub. Either Amazon KDP (publish), Amazon Send To Kindle (Personal) or a local conversion is needed (e.g, Calibre, Sigil).
What does your .net use as a source? Calibre runs on Mac, Windows and Linux and can convert many formats to epub2 very reliably (CLI or GUI). With most the epub quality will depend on quality of input, as GIGO applies. |
![]() |
![]() |
![]() |
Tags |
epub, generator, help needed, programming |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PW3 5.12.3 Serial Jailbreak - generated root password is wrong | texaspete | Kindle Developer's Corner | 2 | 07-27-2020 11:00 AM |
Odd behavior with Pages generated ePub | 1611mac | Sigil | 3 | 11-28-2011 02:53 PM |
.Epub to .Mobi--duplicate chapters generated? | JDawg | Calibre | 0 | 07-15-2011 08:50 PM |
Covers in ePub files generated by Calibre | daviddem | Calibre | 14 | 06-30-2011 09:18 PM |
Calibre's generated css for epub | brewt | Calibre | 7 | 12-29-2008 09:59 AM |