PACKETS

Test document splitting with known page boundaries

Combine generated PDFs in a planned order, add optional blank separators, and record which document owns each page. Use the included CLI evaluator for the separate split-scoring task.

Packet generation tests whether a parser can recover child documents from one physical PDF. Children are assembled in a deterministic order, and the packet truth index remains tied to the pages that were actually published.

Packets are a separate split task. Do not score a packet as ordinary OCR and assume its child boundaries are known. Use the split task and return inclusive page ranges.

PACKET SETUP

Choose the packet size and separators

Add a packet block to a PDF SuiteSpec. The size range controls the number of children per packet, and blank_separators adds physical blank pages with an explicit separator role.

"packets": {
  "size": [2, 5],
  "blank_separators": true
}

Physical order is truth

Children are grouped and assembled in fixed order. Adjacent children may share a document type. packet_truth.json maps each page to its logical child and child-page index with namespaced annotation IDs.

Linked cases stay together

All packet children share one split group. If Bates is requested, marks are applied once to the assembled packet rather than once per child.

SPLIT EVALUATION

Return ranges, then inspect two kinds of accuracy

The split prediction protocol uses one-based, inclusive ranges. Every range names a document_type; separator pages stay separators and do not pretend to be documents.

{
  "case_id": "case_0001",
  "sha256": "<hash from cases.json>",
  "status": "ok",
  "ranges": [
    {"start_page": 1, "end_page": 2, "document_type": "letter"},
    {"start_page": 4, "end_page": 5, "document_type": "invoice"}
  ]
}

Reports score boundary placement and document classes separately, so you can see whether your parser found the right pages and identified the right document types.

To try this, export the bundled starters and generate the complete linked_packet.json packet suite:

Windows PowerShell

& '.\_internal\DocumentGenerator_v2.0_cli.exe' demo --write-examples packet-examples

Linux AppImage

./DocumentGenerator_v2.0.0_Linux-x86_64.AppImage --cli demo --write-examples packet-examples

Linux Flatpak

flatpak run com.docsetgenerator.DocSetGenerator --cli demo --write-examples packet-examples

Windows PowerShell

& '.\_internal\DocumentGenerator_v2.0_cli.exe' generate --suite packet-examples/linked_packet.json --output output/packets --workers 2 --validate

Linux AppImage

./DocumentGenerator_v2.0.0_Linux-x86_64.AppImage --cli generate --suite packet-examples/linked_packet.json --output output/packets --workers 2 --validate

Linux Flatpak

flatpak run com.docsetgenerator.DocSetGenerator --cli generate --suite packet-examples/linked_packet.json --output output/packets --workers 2 --validate

Then create the split-task bundle your parser reads:

Windows PowerShell

& '.\_internal\DocumentGenerator_v2.0_cli.exe' evaluate bundle --dataset output/packets --task split --out handoff/split

Linux AppImage

./DocumentGenerator_v2.0.0_Linux-x86_64.AppImage --cli evaluate bundle --dataset output/packets --task split --out handoff/split

Linux Flatpak

flatpak run com.docsetgenerator.DocSetGenerator --cli evaluate bundle --dataset output/packets --task split --out handoff/split

OUTPUT AND RECOVERY

Work with complete packets

A packet is saved only when all its documents are ready. If generation is interrupted, follow the app’s recovery instructions and keep any recovery folder it reports.

Packets accept supported generated PDF children. Native formats and shared situations are excluded. Packet-page Label Studio review is outside this workflow; supported individual documents can use page review, while packet evaluation supports manual artifact quarantine through the split oracle. Use quarantine --oracle for packet case IDs; the dataset manifest identifies child documents.

Output fileUse
Packet PDFThe physical input to a splitter or review process.
packet_truth.jsonPage ownership, child index, separator role, and namespaced references.
coverage.jsonWhether every planned child and packet completed.
Split reportBoundary and document-class results for the submitted ranges.