Skip to content

Batch standards check over Connect

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.

Terminal window
composer require nextpdf/server

Confirm that the Enterprise batch tool is present with a tools/list call. See /connect/tool-catalog/.

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.

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.

{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "batch_compliance_check",
"arguments": {
"sources": ["/data/q1.pdf", "/data/q2.pdf"],
"policies": ["pdfa-4"]
}
}
}
Terminal window
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.

  • Empty sources or policies returns 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/premium the Enterprise batch tool is not registered; the call fails with an unknown-tool error.

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.

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.

ClaimClausereference_id
Standard states requirements; a checker evaluates each documentPDF/A-4 §6.2.3
Conformance determined against requirements, not asserted by the producerPDF/A-4 §6.7.3
B-LT/B-LTA add validation material; distinct, Enterprise-only levelsETSI 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.

The batch compliance tool is Enterprise-tier, and registers only when nextpdf/premium is installed alongside the server.

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.

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.

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/.

  • /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.