Handle partially downloaded PDF results

31 August 2026

Hands type on a laptop on a wooden table, with a phone nearby.
Illustrative photograph: working at a laptop with a phone nearby. Cropped and resized. Photo: “Working on a laptop outdoors (Unsplash).jpg” — Alejandro Escamilla alejandroescamilla / Wikimedia Commons. · CC0 1.0

Keep the partial PDF away from the normal working copy. In the example below the portal expects a 16 MB result and the device receives 9 MB. If the two sizes use the same units, 7 MB is missing, or 43.75 per cent of the expected file.

First determine what actually finished

Check the result ID, revision and exact expected byte length. User interfaces may round file sizes or use different units, so compare byte counts from the same representation where possible. If a portal merely says the job was accepted, check for a completed result and its manifest before blaming the download. HTTP 202 indicates acceptance for processing, not successful completion of the work. HTTP semantics for 202 Accepted

Seeing a first page in a PDF reader is insufficient. Some content may be usable even when the rest is missing. Keep the partial file under a temporary name outside normal indexing, previews and automatic handoffs. Preserve the last verified copy under its existing name.

Retry the transfer, then promote the result

CheckpointDecision
Before retryConfirm the server still offers the same result revision and the caller still has access.
During transferWrite into a fresh temporary location. Resume a partial transfer only if the service supports it and the representation is unchanged.
At completionCompare the exact byte length. If the source supplies a trusted content digest, compute and compare that too.
Before replacing a usable copyPromote only the verified candidate. Keep an unresolved mismatch in the retry or review queue.

A matching length rules out this shortfall but does not prove the bytes are identical. Record the expected and received lengths, any available digest result, the result revision and the final disposition. Give a repeated mismatch to the portal operator with a harmless transfer reference rather than a credential-bearing URL.

Part of the Plan an offline PDF workflow for an internet outage guide.

Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).