What is the OPF package document?
Updated:
The OPF (Open Packaging Format) file, or package document, is the XML file that describes an EPUB: its metadata, the manifest of every file and the spine that sets the reading order. Reading apps find it through META-INF/container.xml.
Why it matters when you convert a PDF to EPUB
When a PDF becomes an EPUB, everything the converter recovers ends up declared here: the title and language taken from the PDF, each chapter file in reading order, the images and fonts, the cover and the navigation document. A mistake in the OPF affects the whole book, which is why OPF messages are the largest group in EPUBCheck.
How EpubCC handles it: the package document it writes declares version 3.0, a dc:identifier derived from the book's content (the same PDF gives the same identifier, so a reconversion does not show up as a new book), the title, the detected language, the author when the PDF metadata has one, and dcterms:modified set to the time of the conversion. The spine lists the chapters in reading order.
Related terms
EPUBCheck messages about this
OPF-003Item "…" exists in the EPUB, but is not declared in the OPF manifest.OPF-030The unique-identifier "…" was not found.PKG-020OPF file "…" could not be found.RSC-002Required META-INF/container.xml resource could not be found.RSC-003No rootfile tag with media type "application/oebps-package+xml" was found in the container.RSC-005Error while parsing file: …RSC-019EPUBs with Multiple Renditions should contain a META-INF/metadata.xml file.OPF-001There was an error when parsing the EPUB version: ….OPF-002The OPF file "…" was not found in the EPUB.OPF-004Invalid prefix declaration: leading or trailing whitespace is not allowed.
Convert a PDF to EPUB
Convert up to 5 pages free, no account needed.