[Source](https://sheaf.us/document-splitting.html)
# A 104-page packet. Every edge found.
How splitting works→
01 / INPUT
## Bring the mess.
Do not prep. Do not sort. Do not clean up. Just point Sheaf at the raw intake and let the engine handle the reality of operational documents.
Scans
Phone Photos
Merged Packets
Application Dumps
Wrong-order Pages
Junk Pages
Dense Tables
Signatures
02 / PROCESS
## Finding the edges.
One file arrives holding thirty documents and no table of contents. Sheaf decides where each one starts and ends, and covers every page while doing it.
Read
### Every page, first.
The whole packet goes through text and layout analysis before anything is cut, so scans and photographs count the same as clean digital pages.
Signal
### Find the seams.
Looks for the marks a new document leaves behind: a fresh header, a restarted footer, a "page 1 of 6" counter, a change of form entirely.
Cut
### Commit the boundary.
Places every cut so the runs tile the packet end to end. No page is left sitting between two documents, and none is claimed by both.
Name
### Label the run.
Each separated document is typed from its own content, so a run named *scan_0042.pdf* still comes out as a title commitment.
Technical detail
How splitting works, and what it costs to lose a page
Read the spec →
03 / OUTPUT
## Structured payload.
The file doesn't need to arrive perfect, but the data leaves that way. Ready for your existing infrastructure.
One packet in, a list of real documents out — each with the page range it occupies and the type it was recognized as.
The ranges tile the original file end to end, so nothing you were sent goes missing on the way through.
```
{ "packet_id": "pkt_8849-2A", "pages_in": 104, "documents": [ { "type": "loan_application", "pages": "1-4" }, { "type": "pay_stub", "pages": "5-6" } ], "documents_out": 32, "pages_orphaned": 0 }
```