Skip to main content
Participant
April 17, 2024
Question

EPUB (fixed layout) animation error

  • April 17, 2024
  • 3 replies
  • 1081 views

Hello,

I have created an EPUB (fixed layout) file with animations in Indesign, which works without problems on a Thorium reader on PC. When I checked the file on the EPUB checker, it reports errors with the animations, and it reports similar or the same error everywhere with all the animations:

 

»data-idGenAnimationEndState« is not valid custom attribute (it must have at least one character after the hyphen, be XML-compatible, and not contain ASCII uppercase letters).

 

For example, if I try to change the uppercase letters, it no longer reports an error, but the animations don't work anymore. Does anyone have any ideas or advice on how to solve this problem?

3 replies

Participant
May 9, 2025

Hi, Tibor. Have you published your animated ebook on any platform? Can you find such interactive ebooks on Amazon at all?

rayek.elfin
Legend
April 22, 2024

The solution is simple. Crack open the epub, find and replace all »data-idGenAnimationEndState« in ALL files, replace with a label that doesn't throw the epub checker's error.

 

Zip it up again (making sure the mimetype file is not packed and remains uncompressed as a file in the epub).

 

Rename to .epub extension if needed. Test again.

 

Done.

 

PS you can do the search and replace step easily in Visual Studio Code. Open the folder with the unzipped files in VS Code, then search and replace in files. (Edit menu).

James Gifford—NitroPress
Legend
April 22, 2024

Well... leaving out the idea that EPUB surgery is obsolete, are you sure there are no external calls to that function? Maybe not in this case, but it doesn't help to rename something internally if an external library, server or database (for example) uses it.

 

Also that — like all surgery — it has to be repeated, without error, every time the book is re-exported for any reason.

rayek.elfin
Legend
April 22, 2024

I've run into this issue myself before. It works. Those function names are repeated across several files, with up to 9 or so instances or more (depending on the number of pages with animations, of course).

 

But yes, I agree: it's awkward, and this step shouldn't be required. It is kinda embarrasing that the developer(s) behind the epub export didn't check their own epub output with EPUB checker.

 

That said, the entire FLX epub format is an immeasurably bigger embarrassment...

 

James Gifford—NitroPress
Legend
April 17, 2024

which works without problems on a Thorium reader on PC.

 

Then you're done.

 

While most EPUB validators are a waste of time, EPUBchecker is as much the gold standard as is Thorium Reader. If your EPUB works on Thorium, any further checking, testing or attempt at optimization is... probably wasted. Clearly, this XML flaw doesn't keep the document from working on the most highly standardized reader you can get. You can spend a lifetime on this kind of all but phantom flaw and gain nothing.

 

That said, animations in EPUB are out on the flapping ragged edge, and I'd be surprised if any amount of code and doc editing could correct the error and preserve animation functionality.

Participant
April 18, 2024

Thanks for feedback. Actually, the animations work on all the readers I've tried now, but what I'm worried about is the distribution across online platforms, namely that these errors, which don't affect the performance of the EPUB file at all, would result in the file being rejected.

BobLevine
Community Expert
Community Expert
April 18, 2024

If you insist on using fixed layout epub you are likely to be in for a bit of pain. At this point, I wouldn't touch a job with it unless it was for a limited internal distribution that could be tested on specific devices with specific reader applications.