Requirements: Phase 2 — Multi-Template Printing
REQ-P2-001: Multi-template grouping
Section titled “REQ-P2-001: Multi-template grouping”When a bulk print request contains items with different template sizes, the system shall group items by their resolved template and produce one PDF per group. A failure in one group shall not prevent other groups from completing.
Traces to: SAC::PRINT::FR-0001, SAC::PRINT::FR-0004, #575
REQ-P2-002: Parallel rendering with concurrency limit
Section titled “REQ-P2-002: Parallel rendering with concurrency limit”Template groups within a single bulk print request shall be rendered in parallel, up to a configurable maximum concurrency limit (maxParallelRenders). This limit is a system configuration value.
Traces to: SAC::PRINT::FR-0002
REQ-P2-003: Composite response shape
Section titled “REQ-P2-003: Composite response shape”The bulk print response shall contain:
job: UUID identifying the print requestasOF: Bitemporal timestampresults: Array with one entry per template group, each containing:templateId: The Documint template IDdescription: Template description (e.g., “3 x 5”)url: PDF URL on success, null on failureerror: Error description on failure, null on successitemCount: Number of items in the group
When a request resolves to a single template group (the common case), the response still uses the composite shape.
Traces to: SAC::PRINT::FR-0003, goal.md § Desired Changes
REQ-P2-004: Per-call batch splitting
Section titled “REQ-P2-004: Per-call batch splitting”When a template group contains more items than the per-call limit (maxItemsPerCall), the system shall split it into sequential sub-batches. Each sub-batch produces a separate PDF and a separate entry in the results array.
Traces to: SAC::PRINT::FR-0007, SAC::PRINT::FR-0008, #519
REQ-P2-005: Per-request limit
Section titled “REQ-P2-005: Per-request limit”The system shall enforce a maximum total items per user print request (maxItemsPerRequest). Requests exceeding this limit shall be rejected before any Documint calls with a descriptive error indicating the limit and the number of items requested.
Traces to: SAC::PRINT::FR-0009, SAC::PRINT::FR-0010, #519
REQ-P2-006: Configurable limits
Section titled “REQ-P2-006: Configurable limits”The following configuration values shall be added to the item and kanban module configurations:
| Key | Type | Default | Description |
|---|---|---|---|
printing.maxItemsPerDocumintRequest | Int | 40 | Maximum items in a single Documint API call |
printing.maxItemsPerRequest | Int | 200 | Maximum total items in a single user print request |
printing.maxParallelRenders | Int | 3 | Maximum concurrent Documint calls per request |
These are system configuration values, not user-configurable.
Traces to: SAC::PRINT::FR-0002, SAC::PRINT::FR-0007, SAC::PRINT::FR-0010
REQ-P2-007: Frontend handles composite response
Section titled “REQ-P2-007: Frontend handles composite response”The frontend shall handle the new composite response shape:
- Open one new browser tab per successfully returned PDF URL
- Display an error toast notification for each template group that failed, identifying the template description and error message
- Maintain backward compatibility: if the response contains a single
urlfield (legacy shape from other callers), handle it as before
Traces to: SAC::PRINT::FR-0005, SAC::PRINT::FR-0006
REQ-P2-008: Card print status updates for multi-template batches
Section titled “REQ-P2-008: Card print status updates for multi-template batches”When a bulk card print request produces multiple template groups, the system shall update print status (PRINTED) only for cards in groups that rendered successfully. Cards in failed groups shall retain their previous print status.
Traces to: SAC::PRINT::FR-0011, SAC::PRINT::FR-0004
REQ-P2-009: Backward compatibility
Section titled “REQ-P2-009: Backward compatibility”The same-size bulk print path (all items resolve to one template) shall continue to work. The composite response is used for all bulk requests regardless of whether grouping occurs.
REQ-P2-010: Design documentation updates
Section titled “REQ-P2-010: Design documentation updates”The following design documents shall be updated to reflect the multi-template architecture:
- Item Module — printing sequence diagrams, service interface
- PDF Render Module — composite response type if applicable
Copyright: (c) Arda Systems 2025-2026, All rights reserved
Copyright: © Arda Systems 2025-2026, All rights reserved