Flatten an AcroForm so its values become page content.
Use describe("pdf.transform.form-flatten") when your code needs the complete live JSON Schemas.
At a glance
| Property | Value |
|---|---|
| Package | @runstamp/forms |
| Domain / verb | pdf / transform |
| Customer jobs | transform |
| Deterministic | Yes |
| Side effects | none |
Availability
| Local | SDK | CLI | MCP | Managed API |
|---|---|---|---|---|
| public ga | public ga | public ga | public ga | public ga |
Managed API route: POST /api/v2/operations/pdf/transform/form-flatten. Managed execution requires a free-trial workspace or an active Platform or Enterprise workspace, and an environment-bound API key.
Input and result
| Schema | Required fields | Optional fields |
|---|---|---|
| Input | artifactId, bytesBase64, sha256, tenantId, version | none |
| Options | none | operation, deterministic, deterministicSeed, timeoutMs, limits, locale, lossPolicy |
| Result value | output, artifacts | none |
Every success also carries losses, diagnostics, and a hash-bound receipt.
Defaults, limits, and format constraints
Defaults
| Path | Default |
|---|---|
$.deterministic | default=true |
$.lossPolicy | default="collect" |
Formats and profiles
| Path | Constraint |
|---|---|
$.version | minLength=1maxLength=16384 |
Other limits
| Path | Constraint |
|---|---|
$.artifactId | pattern="^[a-f0-9]{64}$" |
$.bytesBase64 | minLength=4maxLength=89478492pattern="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" |
$.sha256 | pattern="^[a-f0-9]{64}$" |
$.tenantId | minLength=1maxLength=16384 |
$.deterministicSeed | minLength=1maxLength=1024 |
$.timeoutMs | minimum=1 |
$.limits.maxInputBytes | minimum=1 |
$.limits.maxOutputBytes | minimum=1 |
$.limits.maxPages | minimum=1 |
$.limits.maxElements | minimum=1 |
$.limits.maxArchiveEntries | minimum=1 |
$.limits.maxExpansionRatio | minimum=1 |
$.limits.maxDurationMs | exclusiveMinimum=0maximum=2147483647 |
$.locale | minLength=1maxLength=128 |
Invoke
const input = await fetch("https://runstamp.com/demo-evidence/operation-evidence/forms/pdf.transform.form-flatten/input.json").then((response) => response.json());
const result = await runstamp.run("pdf.transform.form-flatten", input);
if (!result.ok) throw new Error(`${result.error.code}: ${result.error.remediation}`);
console.log(result.value, result.losses, result.diagnostics, result.receipt);curl -fsS https://runstamp.com/demo-evidence/operation-evidence/forms/pdf.transform.form-flatten/input.json -o input.json
npx -p @runstamp/sdk runstamp ops invoke pdf.transform.form-flatten --input input.json{
"tool": "runstamp_invoke_operation",
"arguments": {
"operation": "pdf.transform.form-flatten",
"input": "<JSON from https://runstamp.com/demo-evidence/operation-evidence/forms/pdf.transform.form-flatten/input.json>",
"execution_mode": "local"
}
}Errors and losses
Declared errors (27)
pdf/A03_BINDING_MISMATCHpdf/ABORTEDpdf/ACTIVE_ACTIONpdf/BINDING_MISMATCHpdf/DUPLICATE_FIELD_NAMEpdf/FIELD_UNKNOWNpdf/FIELD_UNSUPPORTEDpdf/FLATTEN_FAILEDpdf/FORM_INVALIDpdf/INVALID_INPUTpdf/INVALID_VALUEpdf/MALFORMED_APPEARANCEpdf/MALFORMED_WIDGETpdf/OUTPUT_HASH_MISMATCHpdf/POST_MUTATION_CHECK_FAILEDpdf/PROTECTED_FORMpdf/RESOURCE_LIMITpdf/SIGNED_INPUTpdf/SIGNING_PROVIDER_REQUIREDpdf/TIMEOUTpdf/WIDGET_COUNT_MISMATCHpdf/SCHEMA_REJECTEDcommon/SCHEMA_REJECTEDcommon/OPERATION_CANCELLEDcommon/OPERATION_TIMEOUTcommon/CONTRACT_VIOLATIONpdf/LOSS_POLICY_VIOLATED
Declared losses (2)
pdf/FORM_INTERACTIVITY_REMOVEDpdf/FORM_APPEARANCE_DEFERRED
SDK AbortSignal, CLI exit 130, and MCP cancellation return the typed common/OPERATION_CANCELLED failure envelope.
Verified example and exact contract
- Fixture:
icp-workflow(Completed Employee onboarding EMP-2027-00418). - Example input — SHA-256
8b8aea5980a0d4d0b24a3a5b8a5c77c4b05d062c4c6600360ceede542ec5c795. - Example result — SHA-256
36e5ed04e6a538c0dca9c0863025c798284ec1eea23793fad6737b2879496452. - Verified result SHA-256:
ee199243bfae25dafa727427572346a1b35d76580cbe3d5d43e3b8a5fc53988e. - Qualification lane:
12-approval-forms-review.
Contract fingerprints
- Descriptor:
7c8656eecc6fd3dd9fc9ad43796c01d93c8258bd6224e73cc20ee7422f573e3c. - Input schema:
668d2f979605386f2ffd1fdc2f2e688b4833f9dcf1cb4d154fa7b2a4803804b3. - Options schema:
865474087ecd66b4bce52fd0d28518730bc82769197b40c67c420722a65e27d1. - Result value schema:
d969ddb7f9b537eb420d24b5307265da69011b581b5e5fe5cc0498118287b061.
The machine-readable operation reference publishes the complete schemas, qualification results, and evidence bindings for every operation.