Return an output manifest for a PDF batch
3 November 2026
When a bulk PDF processing service reports job completion without itemising individual file results, downstream automation cannot determine which documents succeeded, failed, or remain unprocessed. To establish operational certainty and auditability, a PDF batch processing engine must return a structured output manifest containing four mandatory components for every submitted item: a stable input identifier, an explicit execution status, verifiable output identity metadata, and an exception trace for any encountered failure.
The operational risk of aggregate batch success
In bulk document processing, an API endpoint often returns a top-level success signal upon accepting or completing a batch request. However, evaluating a batch job solely by its aggregate response creates severe operational vulnerabilities. If an eight-item batch encounters a mixture of unreadable input files, injected transient errors, or cancelled processing queues, an overall job completion signal masks individual file failures. Downstream systems that rely on binary job completion risk triggering automated workflows against missing or corrupt document outputs. Batch results
To illustrate how an output manifest reconciles these state ambiguities, consider a proposed missing-manifest exercise alongside the local eight-item control. In this scenario, a batch processing contract contains a combination of valid documents, transient errors, malformed files, cancelled requests, and queued items. Without per-item manifest tracking, an enterprise application cannot distinguish between a completed document and one that stalled in the execution queue. Batch contract · Batch results
Essential components of a minimum output manifest
A resilient output manifest must provide a complete accounting of every item declared in the initial job contract. For this proposed reconciliation, a minimum manifest schema requires four core fields: Batch contract
- Stable input identifier (
item_id): An immutable key assigned to each input element upon job submission (for example,SYN-I01throughSYN-I08). This allows downstream consumers to map results back to their originating source requests without relying on transient array positions. - Explicit lifecycle status (
states): A deterministic state classification covering the lifecycle of each item. Standard classifications includeSUCCEEDED,FAILED_RETRYABLE,FAILED_PERMANENT,CANCELLED, andQUEUED. - Output identity. Identify what the operation produced, not just the bytes it received. The local page-count model records a
page_count, input digest (source_sha256) and operation. It generates no transformed PDF. For an operation that writes a new file, also request a stable output ID or version, its own digest or other integrity evidence, and an authorised retrieval route. An input hash cannot identify different output bytes. - Verifiable exception trace (
log): A diagnostic log recording attempt counts, event types (such asPARSE_FAILURE), and specific exception classifications (such asPdfReadError) for failed items.
Batch contract · Batch results
First-party execution records in batch-results.json establish that synthetic testing was performed in a local Python 3.12.14 environment using pypdf 6.10.0 with zero network calls. Operational parameters including HTTP API integration, authentication mechanisms, and durability across system restarts were NOT_TESTED or NOT_IMPLEMENTED. Furthermore, the local benchmark evaluated page-count extraction only, and must not be extrapolated to document conversion, optical character recognition (OCR), or system throughput. Batch contract · Batch results
Worked batch decision ledger
The following decision ledger models the reconciliation of an eight-item batch using the sample input contract (batch-contract.json) and execution record (batch-results.json). The batch initialised with 4 succeeded items, 1 retryable failure, 1 permanent failure, 1 cancelled item, and 1 queued item. Following a single retry attempt on the transient fault, the final tally yields 5 succeeded items, 1 permanent failure, 1 cancelled item, and 1 queued item. Batch results · Batch contract
| Item ID | Initial Status | Final Status | Attempts | Manifest Output / Exception Trace | Assigned Action & Closure Condition |
|---|---|---|---|---|---|
SYN-I01 | SUCCEEDED | SUCCEEDED | 1 | page_count: 3, input digest recorded | Local page-count value recorded. |
SYN-I02 | SUCCEEDED | SUCCEEDED | 1 | page_count: 3, input digest recorded | Local page-count value recorded. |
SYN-I03 | FAILED_RETRYABLE | SUCCEEDED | 2 | Attempt 1: INJECTED_TRANSIENT_FAILURE; Attempt 2: PAGE_COUNT_SAVED | Closed. Resolved automatically via transient retry. |
SYN-I04 | FAILED_PERMANENT | FAILED_PERMANENT | 1 | Event: PARSE_FAILURE, Exception: PdfReadError | Open (Requires Intervention). Data supplier must inspect corrupt PDF structure and re-ingest file. |
SYN-I05 | CANCELLED | CANCELLED | 0 | Instruction: cancel_before_start | Pending. Pipeline operator must re-submit request if processing is required. |
SYN-I06 | QUEUED | QUEUED | 0 | Instruction: leave_queued | Pending. Await backend engine dispatch. |
SYN-I07 | SUCCEEDED | SUCCEEDED | 1 | page_count: 3, input digest recorded | Local page-count value recorded. |
SYN-I08 | SUCCEEDED | SUCCEEDED | 1 | page_count: 3, input digest recorded | Local page-count value recorded. |
Batch results · Batch contract
Item SYN-I04 has a different disposition from the retryable item. The local run classified this malformed fixture as permanently failed after a PdfReadError; it did not establish that every real read failure is permanent. The item remains open until the document supplier inspects the malformed input file, corrects the structural defect, and re-submits the item to close the transaction. Batch results · Batch contract
Acceptance checklist for batch manifest integration
When evaluating a PDF API's output manifest capabilities, buyers should verify the following architectural criteria:
- Item-level key stability: Confirm that every batch item maintains a unique, immutable
item_idacross processing attempts and retries. - Granular state enumeration: Ensure the manifest distinguishes between permanent failures, transient errors, cancelled requests, and queued items rather than returning a single binary status.
- Cryptographic payload hashing: Verify that successful outputs record input SHA-256 checksums alongside operation results.
- Structured error logging: Check that failed items include exact exception names (
PdfReadError) and attempt counts to isolate malformed inputs. - Verification boundaries: Recognise that matching a file checksum confirms input identity across pipeline stages, but does not verify recipient ownership, access rights, or factual accuracy.
Batch contract · Batch results
Next step
Conduct a future integration test by submitting a synthetic eight-item batch contract containing valid, malformed, and transiently failing PDF fixtures to confirm that the candidate API returns item-level statuses, SHA-256 hashes, and verifiable exception traces before relying on the service. Also deliberately omit an item from a test manifest: the receiver should flag the absent result and preserve every successful item for reconciliation. An aggregate success response must not silently clear the gap. Batch results
Part of the Reconcile partial failures in a batch PDF job guide.
Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).
