Skip to content
EPUBCheck · Package and ZIP container

EPUBCheck PKG-026: non-font file obfuscated

Updated:

EPUBCheck PKG-026 is an error message: “Obfuscated resource must be a Font Core Media Type (was declared as "…" in "…").” A file that is not a font is listed as obfuscated in META-INF/encryption.xml. Font obfuscation, the scrambling EPUB defines to discourage copying embedded fonts, only applies to font files.

The official message

Obfuscated resource must be a Font Core Media Type (was declared as "%1$s" in "%2$s").

Default severity
Error. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.
EPUBCheck version
5.4.0

%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.

Typical causes

  • An encryption.xml copied from another book that lists files this book does not use as fonts.
  • A tool that obfuscated every resource instead of only the fonts.

How to fix it

  1. Find the entry named in the message in META-INF/encryption.xml.
  2. Remove the entry for the non-font file and store that file unobfuscated (restore it from the source).
  3. Rebuild and validate again.

When it's not this

If the file is encrypted with DRM rather than obfuscated, EPUBCheck reports the informative RSC-004.

Terms used here

Other PKG messages

  • PKG-025 Publication resource must not be located in the META-INF directory
  • PKG-027 Could not extract EPUB ZIP content, probably due to file names not encoded in UTF-8.
  • PKG-023 Validating the EPUB against version 2.0, default validation profile will be used.
  • PKG-022 Wrong file extension for image. The image is a "…" file but has the file extension "…".
  • PKG-021 Corrupted image file encountered.
  • PKG-020 OPF file "…" could not be found.

Sources

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.

FAQ

What does EPUBCheck PKG-026 mean?

EPUBCheck PKG-026 is an error message: “Obfuscated resource must be a Font Core Media Type (was declared as "…" in "…").” A file that is not a font is listed as obfuscated in META-INF/encryption.xml. Font obfuscation, the scrambling EPUB defines to discourage copying embedded fonts, only applies to font files.

Is PKG-026 an error?

PKG-026 is reported as error by default. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.

PDF to EPUB tools

Every tool uses the same engine and starts with a free 5-page sample.