OP-HAS-FORM-FIELDS: Has form fields¶
Reports whether a submitted PDF contains form fields, using the caller-selected inspection client.
| Field | Value |
|---|---|
| Operation ID | OP-HAS-FORM-FIELDS |
| Trigger | Client submits POST v1/info/fields/exist with PDF bytes |
| Entry endpoint | POST v1/info/fields/exist |
| Owning component | InfoController.HasFormFields(byte[], bool) → PdfClientService.HasFormFields | PdfHelper (Syncfusion) |
| Inputs | Request body: byte[] PDF; query: useClient (default true) |
| Outputs | Bare bool |
| Failure response | No try/catch on this action — any exception produces framework exception detail (IncludeErrorDetailPolicy.Always) before ApiResponseHandler runs; the final client-visible envelope is unknown** (see Endpoints: Error response shape) |
Steps¶
useClient(defaulttrue) selects the inspection implementation (BR-PDFAPI-021):true(default):PdfClientService.HasFormFields(iTextSharp) is invoked, which first validates the%PDF-signature (BR-PDFAPI-005).false:PdfHelper.HasFormFields(Syncfusion) is invoked instead.
PdfClientService.HasFormFields is implemented in PdfAPI.Core, documented in full at Detect form fields (OP-06). PdfHelper.HasFormFields is implemented in PdfApi.SyncFusionCore, documented in full at Inspect and flatten PDF form fields (OP-SFC-013). Both behaviors are summarized here only as observed on this request path.
Origin: The
useClient = truedetection behavior in this step is implemented inPdfAPI.Core; theuseClient = falsedetection behavior is implemented inPdfApi.SyncFusionCore. See the linked operation pages for the full delegated logic. 2. On theuseClient = truepath, a non-PDF payload raisesPdfException, which escapes uncaught to the framework, producing exception detail beforeApiResponseHandlerruns; the final client-visible envelope is unknown**. 3. The bareboolresult is returned — HTTP200.
Process flow¶
The following diagram shows the client-selection and validation sequence for the form-fields existence check.
flowchart TD
A["POST v1/info/fields/exist"] --> B{"useClient?"}
B -->|true default| C["PdfClientService.HasFormFields: iTextSharp"]
B -->|false| D["PdfHelper.HasFormFields: Syncfusion"]
C --> E{"Valid PDF?"}
E -->|No| F["PdfException escapes to framework: 500"]
E -->|Yes| G["Return bool, 200"]
D --> G
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 beyond framework-level exception logging on an uncaught failure |
Error handling¶
- Non-PDF payload on the
useClient = truepath:PdfExceptionescapes uncaught, producing framework exception detail beforeApiResponseHandlerruns; the final client-visible envelope is unknown** (BR-PDFAPI-005; see Endpoints: Error response shape).
Related documentation¶
- API index
- Overview
- Architecture
- Endpoints
- Authentication and authorization
- Dependencies
- Configuration
- Operations and processes
- Business rules
- Data model
- Operational runbook
- Tech debt
Note: Statements marked with
**could not be confirmed; treat as unknown until verified.
Sources¶
- PdfAPI\Controllers\v1\InfoController.cs
- PdfAPI.Core\Services\PdfClientService.cs
- PdfApi.SyncFusionCore\PdfHelper.cs