page_guard_hwpx
Verify that a newly built HWPX file matches the reference page structure by comparing paragraph/table counts, dimensions, breaks, and text length. Use for same-structure edits to catch unintended layout drift.
Instructions
Check that output HWPX has not drifted in page count vs a reference.
Best for SAME-STRUCTURE edits (filling values into a form, replacing text in-place without adding/removing paragraphs or tables). When sections are added, removed, or restructured, expected differences will be reported as failures — in that case use validate_hwpx for integrity checks instead.
Compares paragraph count, table count, table dimensions, explicit page/column breaks, and overall text length between reference and output.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output_hwpx | Yes | Absolute path to the newly built .hwpx file. | |
| max_text_delta | No | Allowed total text-length change (0.15 = 15%). | |
| reference_hwpx | Yes | Absolute path to the original reference .hwpx file. | |
| max_paragraph_delta | No | Allowed text-length change per paragraph (0.25 = 25%). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |