Feature: printtarg -u (Structured JSON Target Manifest) #3

Closed
opened 2026-08-21 09:12:03 +01:00 by gronod · 1 comment
Owner

Description

Add a -u flag to printtarg to output a JSON manifest upon completion, detailing the exact .tif filenames generated, their physical dimensions, and patch counts per page.

Rationale

Currently, printtarg generates multiple pages implicitly (e.g., _01.tif, _02.tif). A host UI requires this structured manifest to reliably load and display the correct number of pages for printing without blindly scanning the directory or guessing filenames based on the basename.

Proposed Output

{
  "event": "manifest",
  "pages": [
    {"filename": "target_01.tif", "patches": 800, "width_mm": 210, "height_mm": 297},
    {"filename": "target_02.tif", "patches": 250, "width_mm": 210, "height_mm": 297}
  ]
}
### Description Add a `-u` flag to `printtarg` to output a JSON manifest upon completion, detailing the exact `.tif` filenames generated, their physical dimensions, and patch counts per page. ### Rationale Currently, `printtarg` generates multiple pages implicitly (e.g., `_01.tif`, `_02.tif`). A host UI requires this structured manifest to reliably load and display the correct number of pages for printing without blindly scanning the directory or guessing filenames based on the basename. ### Proposed Output ```json { "event": "manifest", "pages": [ {"filename": "target_01.tif", "patches": 800, "width_mm": 210, "height_mm": 297}, {"filename": "target_02.tif", "patches": 250, "width_mm": 210, "height_mm": 297} ] } ```
gronod added this to the v3.5.1 - UI Subprocess Integration milestone 2026-08-21 09:12:03 +01:00
gronod added the Kind/Feature
Reviewed
Confirmed
1
Area/UI
labels 2026-08-21 18:31:40 +01:00
Author
Owner

Implemented -u flag in printtarg on branch feature/printtarg-json-manifest (commit 2280192).

Summary:

  • Emits structured JSON manifest upon target completion to stdout.
  • Details all generated page filenames, physical dimensions (width_mm and height_mm), and patch counts per page.
  • Excludes T_PAD padding patches from the patch count.
  • Documented in doc/printtarg.html.
Implemented `-u` flag in `printtarg` on branch `feature/printtarg-json-manifest` (commit `2280192`). ### Summary: - Emits structured JSON manifest upon target completion to `stdout`. - Details all generated page filenames, physical dimensions (`width_mm` and `height_mm`), and patch counts per page. - Excludes `T_PAD` padding patches from the patch count. - Documented in `doc/printtarg.html`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gronod/argyllcms#3