OP-IS-PDF: Validate is-PDF¶
Reports whether the submitted bytes carry a valid PDF file signature.
| Field | Value |
|---|---|
| Operation ID | OP-IS-PDF |
| Trigger | Client submits POST v1/info/validate with arbitrary bytes |
| Entry endpoint | POST v1/info/validate |
| Owning component | InfoController.IsPdf(byte[]) → PdfClientService.IsPdf(byte[]) |
| Inputs | Request body: byte[] |
| Outputs | Bare bool |
| Failure response | Always returns 200; no failure path is triggered by a non-PDF payload |
Steps¶
PdfClientService.IsPdfchecks the%PDF-file signature and returnstrue/falserather than throwing on a non-PDF payload (BR-PDFAPI-005).
This check is implemented in PdfAPI.Core (PdfClientService.IsPdf), documented in full at Test whether bytes are a PDF (OP-03); its behavior is summarized here only as observed on this request path.
Origin: The file-signature check described in this step is implemented in
PdfAPI.Core, not inPdfAPI. See the linked operation page for the full delegated logic. 2. The bareboolis returned — HTTP200.
Process flow¶
The following diagram shows the file-signature check sequence.
flowchart TD
A["POST v1/info/validate"] --> B["IsPdf: check file signature"]
B --> C["Return true/false, 200"]
Transaction and side effects¶
| Aspect | Finding |
|---|---|
| Unit of work | None |
| Commit point | Not applicable — no database access |
| Records written | None |
| Downstream calls | None |
| Repeat-call behavior | Read-only; safe to repeat |
Logging¶
| Surface | Written content |
|---|---|
| — | No dedicated logging observed on this path |
Error handling¶
- No error status codes are identified on this path — a non-PDF payload returns
falserather than failing (BR-PDFAPI-005).
Related documentation¶
- API index
- Overview
- Architecture
- Endpoints
- Authentication and authorization
- Dependencies
- Configuration
- Operations and processes
- Business rules
- Data model
- Operational runbook
- Tech debt
Sources¶
- PdfAPI\Controllers\v1\InfoController.cs
- PdfAPI.Core\Services\PdfClientService.cs