Set safe file-size limits for PDF processing

3 November 2026

A black Ethernet connector and cable on a pale surface.
Illustrative photograph. Cropped and resized. Photo: “CAT8 Ethernet Cable-0323.jpg” — Raimond Spekking / Wikimedia Commons. · CC BY-SA 4.0

Set the file-size threshold in bytes and write down whether the exact limit is allowed. Then test a valid PDF one byte below, one exactly at, and one byte above that limit. Watch what happens to a separate ordinary job while the service decides whether to admit each file. A size limit is a control to verify in your own environment, not a universal safe file size.

Get the unit and the comparison right

For a fictional boundary, suppose the buyer permits a PDF of up to and including 10,000,000 bytes. That is 10 decimal MB. A policy specifying 10 MiB instead would mean 10,485,760 bytes. Copying a rounded number from a file-manager display could therefore put a test on the wrong side of the configured threshold.

ControlExact file bytes in this exampleExpected result for this size check
Immediately below9,999,999Within the limit
Exactly at10,000,000Within the inclusive limit
Immediately above10,000,001Too large

Other checks, such as permissions and PDF validity, still apply. Prepare harmless valid test files, record their digests and byte counts, and ask the service owner to confirm the measured object. A limit on the complete HTTP request may count multipart overhead; a limit on the document payload need not. Record the affected route rather than assuming they measure the same thing.

The upload worksheet proposes tests below and above a configured limit. Both result columns are empty. The exact-boundary test adds the distinction between an inclusive and an exclusive rule. Benign upload tests

Record which component made the decision

For each submission, retain the request identity, configured rule, client response and first component that declined or admitted it. Check whether a processing job or temporary record was created. An observed rejection at an upstream proxy differs from a rejection by a downstream worker. Neither the response code nor its timing can be supplied by a planning template.

Run a small pre-agreed control job alongside the test if concurrent processing matters. Record its queue and completion times and compare them with a measured baseline. A single run can reveal a symptom but cannot establish its cause or promise zero impact.

If the exact-limit result disagrees between the documented policy, the interface and the API, ask the service owner to reconcile the unit and comparison operator at each point. Repeat on the affected routes and retain the results before approving the boundary.

Part of the Assess security controls for PDF uploads guide.

Preserve SharePoint file identity during PDF processing

This section answers a narrower question than the rest of this page, and it does not mint a new URL. The original contribution preserved here is a synthetic library-to-processing-to-library sequence with reconciliation logs.

The file that comes back must be the file you sent, or a named successor. Count identities, not only successes.

PointIdentity you recordedIdentity you read backSame file?
Before processingLibrary id and version——
After processingThe id you expected to returnThe id that returnedNot run

Labelled synthetic case. Send one sample and expect one return. A second file, or a return with a new id you did not record, is a reconciliation exception.

The rest of this page remains the parent decision. Use the table for the question in the heading, and leave a cell blank rather than filling it from memory.

Set per-job limits for document processing

This section answers a narrower question than the rest of this page, and it does not mint a new URL. The original contribution preserved here is an API contract, synthetic batch and partial-failure reconciliation log.

A limit is part of the contract. Write the limit you will enforce per job, and what a partial failure leaves behind.

CaseLimitWhat you sentWhat remainsReconciled?
Inside the limitThe number you setA small batchThe outputs you expectedNot run
Past the limitThe sameOne item overMust be explicit, not silentNot run
A failure halfwayThe sameA batchNamed items done and not doneNot run

Labelled synthetic case. Run a batch of harmless files and stop one on purpose. The log should say which items finished. A single “failed” for the whole batch is not reconciliation.

The rest of this page remains the parent decision. Use the table for the question in the heading, and leave a cell blank rather than filling it from memory.

Identify memory limits in large PDF operations

This section answers a narrower question than the rest of this page, and it does not mint a new URL. The original contribution preserved here is a documented load profile, raw results and capacity interpretation.

A limit is a number you measured or a number the supplier stated. This article contains neither.

QuestionFigureSourceWhat it does not mean
The limit in the headingBlank until you measure it or read a dated statementYour test or the supplierA catalogue label is not a capacity

Record the file size, the concurrency and the build you used. Do not copy a figure from memory.

The rest of this page remains the parent decision. Use the table for the question in the heading, and leave a cell blank rather than filling it from memory.

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