feat(printkit): 增强 IPP 打印与表格排版,发布 0.1.2

This commit is contained in:
2026-11-27 17:18:31 +08:00
parent d54e4f7676
commit 24aee84953
8 changed files with 222 additions and 30 deletions
+7
View File
@@ -71,6 +71,13 @@ p.supports("sides-supported", "two-sided-long-edge")
`ipp-attribute-fidelity=true`,设备也只回 `successful-ok` 然后静默按单面打。
所以 SDK 在客户端侧做能力预检并降级(`Printer._adjust`),并打日志。
4. **一张连续表跨页**,不是每人一单:行不跨页拆断,表头每页重复,续页页脚带「(续)」。
5. **设备一次只吃一份作业**。上一份还没出完纸就提交下一份,回 `0x0507
server-error-busy`(日志「Print-Job 失败: 0x0507 server-error-busy」)。所以
`Printer.print()` 逐页等出纸再提交下一页、`print_job()` 对忙状态先
`wait_idle()` 再退避重试(`busy_retries` / `busy_wait` / `page_wait` 可调);
参数错、格式不支持这类硬错误立即抛,不重试。
6. **多页中途失败不要去整份重打**:异常的 `printed_pages` / `total_pages` 属性
说明已经出了几页,重打整份会重复出纸。
## 依赖