# EPUB splitting and merging examples, version 1.0.0

Three original, small EPUB inputs and three recorded free-tool outputs. Use
them to see the difference between extracting a chapter range, splitting into
individual chapters, and joining books in a chosen order. They are CC0; no
account, payment or attribution link is needed to download or reuse them.

These are worked examples, not a representative ebook benchmark. They contain
original prose, a stylesheet, navigation and a simple SVG route diagram.
The results do not establish typical speed, compression savings, accessibility,
appearance in every reader or acceptance by a bookstore.

## Extract chapters 2 and 3 as one EPUB

1. Open https://epublys.com/split_epub and select `four-chapters.epub`.
2. Set **From chapter** to `2` and **To chapter** to `3`.
3. Leave **Keep original metadata** enabled, then run the splitter.

The input is *The Map Room*: The Door, The Desk, The Window, The Return.
The result is one EPUB containing **2. The Desk** and **3. The Window**, in that
order. Its title remains *The Map Room*. The website names its result after
the selected input; the recorded download here is named `range-2-3-free.epub`.

Chapter numbers refer to the book's ordered chapter documents, not printed
page numbers or headings inside one document. A real book may package several
headings into one document. Check the chapter list after selecting your file.

## Get one EPUB per chapter

Select the same `four-chapters.epub`, leave both range fields empty, and run
the splitter. The result is a ZIP containing four chapter EPUBs. The browser
offers the complete ZIP and individual chapter downloads. `chapters-free.zip`
is the recorded ZIP. Its inner files retain the input name plus chapter number;
their book titles are *The Map Room - Part 1* through *Part 4*.

## Merge two volumes in order

**Known conformance limitation:** EPUBCheck 5.4.0 reports `OPF-096` on the
recorded merged output, in both free and Pro measurements. The generated
navigation document is marked non-linear in the spine but has no content
hyperlink leading to it. The source inputs have no reference-checker
diagnostics. The merge retains the measured source chapter order and assets,
but this output is not an EPUBCheck pass. Check the returned book independently
before publishing; Epublys's structural checker is not full EPUB conformance.
The exact reference diagnostic and its package location are in `manifest.json`.

1. Open https://epublys.com/merge_epub and select `volume-one.epub`, then
   `volume-two.epub`.
2. Keep Volume One above Volume Two. Drag rows or use their move-up/move-down
   buttons to change the order.
3. Enter **Field Notes Collection** as the custom title, leave Author blank,
   and turn **Chapter dividers** off for this example. The normal default is on.
4. Merge and download the result. `merged-free.epub` is the recording.

The source chapter order is Volume One: Arrival, Volume One: The Garden,
Volume Two: The Path, Volume Two: Departure. The combined navigation includes
both volumes. The generated navigation document is separate from these four
source chapters. Leaving Author blank retains the source author names; a custom
author would replace them. This example does not demonstrate removal of DRM.

## Free and Pro differences

The published outputs were generated with the free setting: they include an
Epublys colophon and the publisher `Epublys (epublys.com)`. That publisher replaces
the original on split output even when **Keep original metadata** is enabled.
Pro output has no added colophon or Epublys publisher. The local measurement
also checked both Pro split modes and the Pro merge; those binaries are not
included as public downloads. Read `manifest.json` for the exact options and
observations, including metadata and chapter labels.

Downloads are separate from tool operations. Running the two split exercises
and the merge uses three successful operations under the website's normal free
allowance. Your remaining allowance, file limits and account tier still apply.
No live HTTP quota, account or entitlement check is implied by a local engine
recording. Files submitted to these web tools upload over HTTPS for processing;
see https://epublys.com/privacy for the handling and cookie details.

## Check or reproduce the collection

`SHA256SUMS.txt` covers the other published downloads, including `source.zip`.
Run `sha256sum -c SHA256SUMS.txt` in a directory containing those downloads.
`manifest.json` records input hashes, output hashes, engine source hashes,
options and the actual EPUBCheck 5.4.0 results. The reference checker is separate
from Epublys's structural checks; neither is a guarantee of store acceptance.

The source ZIP contains the original-input builder, package metadata, this
documentation, immutable free-output recordings and their observations. It
does not contain Epublys product engines, EPUBCheck or JSZip. Extract it into
an empty directory and use Node.js 22 or later:

    npm install --ignore-scripts
    node build.mjs --out dist
    node build.mjs --out dist --check

JSZip 3.10.2 is the only dependency. The builder recreates the original inputs
with fixed archive metadata, then packages the recorded outputs unchanged.
It does not rerun the engines or checker. Tool-generated identifiers and
modification times vary on another tool run, so a fresh browser result need not
have the recording's binary hash. Compare chapters, order, navigation and
branding instead. Rebuilding this public kit from its included recordings is
deterministic; generating fresh engine outputs is a separate measurement.

To repeat a reference check, obtain the official EPUBCheck 5.4.0 distribution:
https://github.com/w3c/epubcheck/releases/tag/v5.4.0

    java -jar /path/to/epubcheck.jar range-2-3-free.epub --failonwarnings

Unzip `chapters-free.zip` and check each inner EPUB separately; the outer ZIP
is a download bundle, not an EPUB. The manifest records the verified reference
distribution and JAR hashes. The repository-only measurement command is in
`scripts/workflow-samples/verify.mjs`, outside this public source package.
