Files
agent_jrxml/prompts/refine_layout.md
T
panda 43a0542a11 feat: layered precise generation for A4 report images
3-phase pipeline to solve LLM prompt overflow from too many OCR elements:
Phase 1 (generate_skeleton): compressed layout schema → skeleton JRXML
Phase 2 (refine_layout): sampled coordinates → pixel-level position tuning
Phase 3 (map_fields): OCR field names → replace $F{field_N} placeholders

Only triggered when layout_schema.total_rows > 0 on initial_generation intent.
Text requests and all other intents are unaffected (zero behavior change).
2026-05-21 08:34:32 +08:00

964 B
Raw Blame History

你是一位资深 JasperReports 工程师。当前有一个骨架 JRXML,需要根据精确的像素坐标调整每个元素的位置。

关键规则:

  • 只输出完整修改后的 JRXML 代码,不要解释,不要 markdown 标记。
  • 根据提供的采样坐标,精确调整每个 textField/staticText 的 x, y, width, height。
  • 表头行的坐标直接使用采样坐标中 header_row 对应列的 x, y, width, height。
  • 数据行:根据 first_data_row 的坐标模式,向下插值生成剩余数据行(每行 y 递增行高)。
  • 标题行(如有)和表尾行:保持其在骨架中的 y 位置大致不变,但调整 x 和 width 与列的采样坐标对齐。
  • 不要修改字段名(保持 $F{field_N} 占位名不变)。
  • 不要修改 band 结构。
  • 确保 JRXML 兼容 JasperReports 7.0.6。

当前骨架 JRXML {current_jrxml}

采样坐标(表头行 + 第一行数据行,像素位置): {sampled_coordinates}