Skip to content
Glossary

What is scripted content in EPUB?

Updated:

A scripted content document is an EPUB content document that contains JavaScript or an HTML form. EPUB 3.3 allows scripting, but the manifest item must carry the scripted property and reading systems are free to run the scripts in a restricted way or not at all.

Why it matters when you convert a PDF to EPUB

Nothing in a PDF needs scripting to be read as a book, and many e-ink readers ignore scripts entirely, so a converted PDF should not depend on them. Scripts also widen what a file can do on a reader's device, which is why the specification surrounds them with security rules.

EPUBCheck checks that documents with scripts declare the scripted property (OPF-014) and that script files use a JavaScript media type (RSC-034).

How EpubCC handles it: the engine writes no scripts and no forms. Its EPUBs are static XHTML and CSS, which every reading system can display without running any code.

Related terms

EPUBCheck messages about this

  • OPF-014 The property "…" should be declared in the OPF file.
  • RSC-034 Scripts must have a JavaScript media type.

Convert a PDF to EPUB
Convert up to 5 pages free, no account needed.

Sources

FAQ

What is scripted content in EPUB?

A scripted content document is an EPUB content document that contains JavaScript or an HTML form. EPUB 3.3 allows scripting, but the manifest item must carry the scripted property and reading systems are free to run the scripts in a restricted way or not at all.