Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 10-08-2026, 06:10 PM   #31
Kayadelenium
Addict
Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.
 
Kayadelenium's Avatar
 
Posts: 293
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
Three replies here came in while I was working on the release. Here are my answers.

Quote:
Originally Posted by PeterT
Any plans on publishing epublift to cargo.io? My approach to all of you tools is doing a cargo build rather than a download of a precompiled binary
Yes, I will publish it on crates.io, as epubveri and epubsana already are. Until then it installs straight from the repository:

Code:
cargo install --locked --git https://github.com/ePubLift/epublift --tag cli-v3.3.0 epublift --features epub34,metadata,pdf-ocr,markdown,validate
Keep the features: they are what the release binaries are built with. Without validate there is no check command, and without metadata no ISBN lookup.

Quote:
Originally Posted by JSWolf
What would really help to stop the complaints is to make the defaults to keep the existing images and ZIP format for the container
The container part is already the case. Optimize has only ever written an ordinary ZIP. The Zstandard container is an experiment that is not in the released program or on the web page at all. The one place Zstandard is used is Archive, which writes a separate .eparc file for storage, and only when you ask for it.

The images part: you are right, and I am changing it. Keep original will become the default, on the web page and on the command line, and WebP will be something you choose. It will come together with the conversion fixes.

Quote:
Originally Posted by KevinH
So just because the Epub spec supports a format, do not expect the publishing community to start throwing away gif, jpeg and png any time soon.
I don't expect them to. epublift is not aimed at publishers; it works on books readers already have. That is also why EPUB 3.4 output, with AVIF or JPEG XL images, is only there if you ask for it (--target 3.4), and once the new default is in, WebP will be opt-in too. On JPEG XL in Chrome, that changed this week: Chrome 155 ships JPEG XL decoding, using jxl-rs, a decoder written in pure Rust. Readers built on Chromium will only get it as they update, though, and e-ink devices take longer still, so your point about how slowly publishing moves stands.
Kayadelenium is online now   Reply With Quote
Old 10-09-2026, 05:07 PM   #32
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 85,761
Karma: 154365285
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Oh and can you build in options to convert from Webp, AVIF, and JXL into JPG or PNG? If ePub start being in the wild with these new image formats, a lot of people won't be happy. But that will be happy if they can convert the images to a format that can be used.
JSWolf is offline   Reply With Quote
Old 10-10-2026, 09:26 AM   #33
Kayadelenium
Addict
Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.
 
Kayadelenium's Avatar
 
Posts: 293
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
Yes, I have an idea for a tool that converts between EPUB3 and EPUB2 and allows you to select image formats during the process. Since I haven't finished the core tasks yet, I can't attend to the other work.

- Fixing epubveri errors
- Writing plugins for epubsana
- Developing kepubverto and then writing its plugins
- ....

Phew Captain... there is so much work to do.
Kayadelenium is online now   Reply With Quote
Old 10-10-2026, 11:34 AM   #34
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 85,761
Karma: 154365285
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Kayadelenium View Post
Yes, I have an idea for a tool that converts between EPUB3 and EPUB2 and allows you to select image formats during the process. Since I haven't finished the core tasks yet, I can't attend to the other work.

- Fixing epubveri errors
- Writing plugins for epubsana
- Developing kepubverto and then writing its plugins
- ....

Phew Captain... there is so much work to do.
That's all wrong. The idea is to convert the images regardless of the ePub version. Most programs that handle ePub3, won't handle those formats. So allow conversion regardless of the ePub version. I don't want an ePub3 don't work because the image format(s) are not supported.

Just allow image conversion without converting the ePub in any other way.

And if you want the ePub to remain as ePub3 but be backwards compatible, these image formats, need to be converted in place and the OPF updated.

The thing is, these new (new to ePub) image formats should never have been sanctioned. The W3C are becoming really stupid (IMHO).
JSWolf is offline   Reply With Quote
Old 10-22-2026, 08:55 AM   #35
Kayadelenium
Addict
Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.
 
Kayadelenium's Avatar
 
Posts: 293
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
epublift 4.3.0 (command line) and 1.28.1 (web page) are out, and https://epublift.itpax.net is already running them. This is my first post here since 3.3.0, so it covers everything since then. As before, nothing touches the book you start from: Optimize, Repair and the metadata editor all write a new file, and Validate and Repair run in your browser without uploading the book.

Images are kept as they are by default

I said in my last reply that this would come with the conversion fixes, and it has. Optimize now upgrades the structure and leaves JPEG and PNG untouched, on the web page and on the command line. WebP is something you ask for: the Keep original choice is preselected on the web page, and on the command line it is --webp. If you have a script that relied on WebP output, add that flag.

JSWolf, on your last post: converting WebP, AVIF or JPEG XL images that a book already has into JPEG or PNG is not there yet. You are right that it should not depend on the EPUB version. It should convert the images, update the OPF in place, and leave everything else in the book as it is. It is on my list, but I can't give a date. The one thing I still have to decide is the output. PNG keeps the picture exactly but usually makes the file larger, and JPEG keeps it small but loses a little again, so the choice should probably be yours.

Optimize no longer makes valid books invalid

These are the conversion problems I mentioned last time. Until 4.0, most valid EPUB 2 books came out of Optimize with validation errors that the upgrade itself had added. They came from the upgrade carrying EPUB 2 markup that EPUB 3 does not allow. The upgrade now does this:
  • It translates the EPUB 2 metadata (opf:role, opf:file-as, opf:scheme) to the EPUB 3 form, instead of leaving attributes EPUB 3 forbids.
  • It writes out the named characters (the non-breaking space and the rest) that the old DOCTYPE declared and the new one does not.
  • It builds the navigation document from toc.ncx with its labels escaped and its links encoded.
  • It writes the layout attributes HTML dropped (an image's width="40%", a table's cellspacing, cellpadding and border, a cell's valign, a line break's clear) as the CSS the HTML Standard maps them to. That CSS goes in one small stylesheet, epublift-presentational.css. It also renames the obsolete font, big, center and strike elements to their HTML counterparts.
  • It finishes with a pass of epubsana, the family's repairer, for what EPUB 3 requires and EPUB 2 did not (an empty title, an empty unique identifier, an id that is no longer valid).

Where I could not be sure, I left things alone. If the book's own CSS already sets the property an attribute would set, or one of its selectors reads the attribute, the attribute stays as written. The book then stays invalid over it, and the command line's report says how many were left and why. font color and size="7" are left too.

Repair first, then Optimize

Optimize fixes what the upgrade itself would break. Defects the book already had are Repair's job, and Repair asks before any change that needs a decision. The web page's tabs are now in that order: Validate, Repair, Metadata, Optimize. For the cleanest result, repair the book, then optimize the repaired copy.

Repair (epubsana 0.34.0) also learned new fixes since 3.3.0. Two of them come from books in my own library. One is a list placed directly inside another list instead of inside its item, which is common in tables of contents. The other is an image declared as one standard type but holding another, such as a PNG declared as JPEG.

Smaller changes
  • --kepub now uses kepubverto, the converter from the Kobo forum thread. It adds its Kobo markup without rewriting the rest of the document, and it adds no validation errors of its own.
  • The report file goes next to the output, not next to the input. Without -o nothing changes.
  • Three meta options were renamed so that each name means the same in every tool of the family: enrich --lang is now --assume-language, enrich --cover is --include-cover, and show --json is show --format metadata. The old spellings still work in 4.x, with a warning.
  • Validate runs epubveri 0.31.0 and Repair runs epubsana 0.34.0, the same versions as in their own threads.
  • The HTTPS library used for metadata lookups was updated for two published security advisories.

PeterT, crates.io is still on my list. One dependency is only available from its git repository, and crates.io refuses that. Until it has a release, the install command is the same as before with the new tag:

Code:
cargo install --locked --git https://github.com/ePubLift/epublift --tag cli-v4.3.0 epublift --features epub34,metadata,pdf-ocr,markdown,validate
Full release notes: cli-v4.3.0, web-v1.28.0 and web-v1.28.1. If a book comes out of Optimize with more errors than it went in with, please tell me here. Validate, epubcheck or your own editor will show the difference, and your original is untouched.
Kayadelenium is online now   Reply With Quote
Old 11-04-2026, 05:08 PM   #36
Kayadelenium
Addict
Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.
 
Kayadelenium's Avatar
 
Posts: 293
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
epublift 5.0.0 (command line) and 1.31.0 (web page) are out, and https://epublift.itpax.net is already running them. This covers everything since my post on 4.3.0. The book you start from stays as it is: Optimize, Repair and the metadata editor write a new file, and Validate and Repair run in your browser without uploading the book.

If you call the command line from a script, 5.0 will break it

What 4.x accepted with a warning is now an error, so that every tool in the family takes the same options. The web page is not affected.
  • A book needs -i, as in epublift check -i book.epub. archive and restore take one -i per run, a file or a folder.
  • An existing output or report file is refused unless you add -f. 4.x replaced it.
  • -q and -r are gone. Use --quality and --report.
  • The old meta spellings I mentioned last time are gone: enrich --lang, enrich --cover and show --json.
  • Exit code 2 now means the run could not be done, where it used to be 1.
  • The upgrade, import and a re-targeting restore exit 1 when the book they wrote still has errors, where they used to exit 0. The file is still written, and the message says how many errors remain.

The full table is in Moving from 4.x to 5.0.

If you converted images to WebP before 4.5.2, convert again from your original

This only concerns books you asked to have converted to WebP. Images kept as they are, the default since 4.0, were not touched. There were two bugs, both fixed since 4.5.2 and web 1.29.4:
  • Grayscale images came out with stretched contrast, which clipped shadows and highlights.
  • The source JPEG's quality was read too low, usually by 1 to 7 points, so re-encoded images lost more than intended. With the correct reading those WebP files are larger, and more JPEGs now stay as they are because the re-encode is no longer smaller.

What Optimize does differently
  • It writes align as CSS on tables, paragraphs, headings and images. img align="middle" stays, because no standard CSS gives exactly that result, and so does align on div and table cells, which also moves block content.
  • It deletes direction: ltr from a style sheet, which EPUB 3 forbids. It leaves it alone on any sign of right-to-left text in the book.
  • A book labelled older than EPUB 2 (version="1.0") gets what Repair does without asking, then the upgrade.
  • A correction to my last post: I said an attribute stays when the book's own CSS sets the same property. Where the CSS certainly overrides it, the attribute has no effect, so it is now removed and no rule is written. Where a rule only may set it, or sets part of it, it still stays.

Compared with 4.6.0 on my own test shelf, repairing first and then upgrading, no book gained errors and the text and image counts did not change.

Three bugs that could damage or worsen a book are fixed:
  • A book with both images/ and Images/ lost a folder on a file system that ignores case, such as the macOS default, and its manifest no longer matched. Both spellings now survive. A book with two files that differ only in case is refused on such a system, where one used to replace the other silently.
  • An image listed in the book's guide became a landmark, which added an error. It no longer does.
  • A malformed font face could make the new stylesheet invalid. Such a font element is now left as written.

Your original, and -o

Last time I wrote that nothing touches the book you start from. There was one exception that I should have named: until 4.5.0, an -o naming the input replaced it on the default command, meta set, meta enrich and import. That is now refused.

Smaller changes
  • You can choose a book's unique identifier: meta set --unique-identifier takes one the book already has, and --new-unique-identifier makes a UUID, derived from the ISBN when there is one. The web page's Metadata form has the same choice. A book with obfuscated fonts is refused, because the fonts depend on that identifier.
  • Every imported book now gets its own identifier. Before, two imports with the same number of chapters had the same one, so a library could take them for one book. --new-unique-identifier fixes a book you already imported.
  • OCR works again on a fresh install. The ocrs project stopped serving the model files I was downloading, so epublift now fetches the ones it serves today and checks their SHA-256.
  • PDF import now reads through paginaverto, the family's PDF reader. Text that some fonts mapped to invalid characters no longer breaks a chapter.
  • Repair offers to delete direction: ltr and to turn a link like http://name%40domain into mailto:, and asks first. The upgrade applies the first and not the second, because the second changes where a link goes.
  • The zip library, which opens every book, was updated for three published security advisories, in 4.5.1 and web 1.29.3. If you open books from other people, update.
  • Validate runs epubveri 0.37.1 and Repair runs epubsana 0.39.0.

JSWolf, converting WebP, AVIF or JPEG XL images into JPEG or PNG is still not there. I want to build it on imagoverto, the family's new image converter, rather than keep a second copy of that code, and I still can't give a date.

PeterT, crates.io is still blocked by the same dependency. Until it has a release, there are ready binaries for Linux, macOS and Windows on the release page, and the install command is the same with the new tag:

Code:
cargo install --locked --git https://github.com/ePubLift/epublift --tag cli-v5.0.0 epublift --features epub34,metadata,pdf-ocr,markdown,validate
Full release notes: cli-v5.0.0 and web-v1.31.0; the versions in between are on the releases page. If a book comes out of Optimize with more errors than it went in with, please tell me here. Validate, epubcheck or your own editor will show the difference, and your original is untouched.
Kayadelenium is online now   Reply With Quote
Old 11-11-2026, 07:48 PM   #37
Kayadelenium
Addict
Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.Kayadelenium ought to be getting tired of karma fortunes by now.
 
Kayadelenium's Avatar
 
Posts: 293
Karma: 364036
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
epublift 5.3.0 (command line) and 1.34.0 (web page) are out, and https://epublift.itpax.net is running them. This covers 5.1 to 5.3, everything since my post on 5.0. As before, the book you start from stays as it is, and Validate and Repair run in your browser without uploading it.

Validate is stricter: some books that passed will now fail

Validate and epublift check now run epubveri 0.40. Where the EPUB specification and epubcheck disagree, it follows the specification; before, it followed epubcheck. So a book can now pass epubcheck and fail here, or the other way round. Nothing in your book changed, only the verdict.

The case you are most likely to meet is an image with no alt in an EPUB 3 book. EPUB 2 does not require alt, so an EPUB 2 book upgraded by Optimize can now be reported invalid for that alone. Optimize does not write alt="" for you: that marks an image as decorative, which is wrong for a picture that carries content. Describing the image is an editor's job.

On my own test shelf of 562 books, 2 originals and 24 upgraded books that passed before now fail. Apart from that, what Repair, Optimize and kepub write is the same as in 5.2, with one fix: an image alone in a figure with a caption needs no alt, and kepub no longer wraps it in a span that made it an error. If a retailer asks for epubcheck by name, run epubcheck as well.

PDF import
  • OCR reads Turkish and the other Latin-script languages, including letters with a cedilla, a breve or a dotless i. The first scan downloads 8 MB more model data. A scan in a script the model cannot read, such as Cyrillic, Greek or Arabic, gets a warning that its text will be wrong or missing.
  • Scans in JBIG2 and JPEG 2000 are read instead of refused.
  • Chapters follow the PDF's own outline, or its printed contents page, and italics stay italic.
  • When page 1 is a cover picture, it becomes the book's cover.
  • Images are at most 1,920 pixels on the longest side, and 2,560 for the cover. Nothing is enlarged, and a JPEG keeps its own quality.
  • Words broken by a soft hyphen at a line end are joined again.
  • Pages that could not be read are named in a warning, and the rest of the book is written.
  • The title comes from the PDF when it has a real one. Otherwise the title and author come from the file name, without the site names a download adds to it.
  • There is no made-up "Section 1" heading any more, and every imported book has a style sheet.

The web page's Import PDF now reads scans by OCR as well, up to 50 pages. A longer scan needs the command line.

PeterT, crates.io is still blocked by the same dependency. The install command takes the new tag:

Code:
cargo install --locked --git https://github.com/ePubLift/epublift --tag cli-v5.3.0 epublift --features epub34,metadata,pdf-ocr,markdown,validate
Full release notes: cli-v5.3.0 and web-v1.34.0; 5.1 and 5.2 are on the releases page. If a book comes out of Optimize with more errors than it went in with, please tell me here. Validate, epubcheck or your own editor will show the difference, and your original is untouched.
Kayadelenium is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
iLoveEPUB.com — free in-browser EPUB toolbox: compress / merge / split / convert / fi openminimax Self-Promotions by Authors and Publishers 0 09-19-2026 12:35 AM
Creating epub/kepub books (docx→epub/kepub via MS Word→Calibre) SJC-Caron ePub 18 04-21-2016 12:10 PM
How to shrink ePub file size karenbryant ePub 33 03-12-2016 02:21 PM
KePub Toolbox Thasaidon Kobo Reader 1 08-08-2012 08:49 AM
Validate epub carlol Workshop 4 08-10-2011 08:52 PM


All times are GMT -4. The time now is 02:34 PM.


MobileRead.com is a privately owned, operated and funded community.