Batch standards check over Connect
Batch standards check over Connect
Section titled “Batch standards check over Connect”At a glance
Section titled “At a glance”Use this recipe to check many PDFs against one or more named policies in a
single call. It calls the batch compliance tool over the Connect
transports. The tool is Enterprise-tier: a class_exists() probe
discovers it, and it registers only when nextpdf/premium is installed
alongside the server. The tool checks each document against every policy in
the request, then returns a consolidated per-document, per-policy report.
As with the single-document check, a per-policy “pass” means only that the tool checked the rules it implements. It is not an independent conformance certification. A validator makes the conformance determination.
Install
Section titled “Install”composer require nextpdf/serverConfirm that the Enterprise batch tool is present with a tools/list call.
See /connect/tool-catalog/.
Conceptual overview
Section titled “Conceptual overview”A standard sets requirements for each document, and a checker evaluates each document against those requirements (PDF/A-4 §6.2.3). Conformance is determined against the requirements, not asserted by the producer (PDF/A-4 §6.7.3). For signature-related policies, the PDF Advanced Electronic Signatures (PAdES) baseline levels are distinct, and the B-LT/B-LTA levels (validation material, archive time-stamp) are an Enterprise-only capability (ETSI EN 319 142-2 §5.5). The batch result applies the same narrow “no implemented rule failed” meaning across the document set.
API surface
Section titled “API surface”Verify tool names against the running registry with tools/list. The
catalog of record is /connect/tool-catalog/. This recipe does not restate a
tool count.
Code sample — Quick start
Section titled “Code sample — Quick start”{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "batch_compliance_check", "arguments": { "sources": ["/data/q1.pdf", "/data/q2.pdf"], "policies": ["pdfa-4"] } }}Code sample — Production
Section titled “Code sample — Production”curl -sS -X POST https://connect.example.com/v1/tools/batch_compliance_check \ -H 'Authorization: Bearer '"$NEXTPDF_CONNECT_TOKEN" \ -H 'Content-Type: application/json' \ -d '{"sources":["/data/q1.pdf","/data/q2.pdf"],"policies":["pdfa-4"]}' \ -o /tmp/batch.json -w '%{http_code}' > /tmp/batch-status || { echo "transport failure invoking batch_compliance_check" >&2; exit 1; }The response includes a batch id, aggregate pass/fail counts, and a
per-document checks array with per-policy results and failure reasons.
Filter the failures, remediate them, and resubmit only the affected
documents.
Edge cases & gotchas
Section titled “Edge cases & gotchas”- Empty
sourcesorpoliciesreturns an invalid-parameters error. - A missing file appears as a per-result error rather than failing the whole batch. Check each result for an error field.
- Batch size limit exceeded returns an explicit error. Split the work into smaller batches.
- Unknown policy id is an unknown-standard error naming the recognised identifiers. Signature policies that reference B-LT/B-LTA are only meaningful on an Enterprise deployment that can produce that material.
- Tool absent. Without
nextpdf/premiumthe Enterprise batch tool is not registered; the call fails with an unknown-tool error.
Performance
Section titled “Performance”The front-matter budget is a documentation cap. The tool processes documents server-side, and each document can use meaningful working memory. Size the batch for the host’s memory rather than raising a global timeout.
Security notes
Section titled “Security notes”Do not log source paths or the full report at an externally shipped log level. Log only the batch id and the aggregate pass/fail counts. A per-policy “pass” describes the implemented rule set, not a security or legal warranty.
Conformance
Section titled “Conformance”| Claim | Clause | reference_id |
|---|---|---|
| Standard states requirements; a checker evaluates each document | PDF/A-4 §6.2.3 | |
| Conformance determined against requirements, not asserted by the producer | PDF/A-4 §6.7.3 | |
| B-LT/B-LTA add validation material; distinct, Enterprise-only levels | ETSI EN 319 142-2 §5.5 |
Support for a batch standards check is not a conformance certification. An independent validator makes the conformance determination per document.
Commercial context
Section titled “Commercial context”The batch compliance tool is Enterprise-tier, and registers only when
nextpdf/premium is installed alongside the server.
Connect specifics
Section titled “Connect specifics”Transport availability (MCP / REST / gRPC)
Section titled “Transport availability (MCP / REST / gRPC)”Invoke the tool the same way over Model Context Protocol (MCP)
tools/call, the REST tool endpoint, and the gRPC service through the
shared tool executor.
HITL risk tier
Section titled “HITL risk tier”The batch check is read-only and is not approval_required by default. An
operator override may only raise its risk level. See
/connect/hitl-risk-tiers/ for details.
Confirmation gate JSON envelope
Section titled “Confirmation gate JSON envelope”The tool does not trigger the gate unless an operator override raises it to
approval_required. The envelope and single-use token contract is in
/connect/hitl-risk-tiers/.
See also
Section titled “See also”- /cookbook/connect/compliance-check/ — single-document standards check.
- /cookbook/connect/ai-ready-certification/ — broader AI-readiness check.
- /connect/tool-catalog/ — per-tier tool set computation.
- /connect/hitl-risk-tiers/ — risk model and gate behavior.