Sửa được text nằm trong Form XObject (file Canva/Illustrator) + CI chạy test
Build Windows portable / build (push) Canceled after 0s
Build Windows portable / build (push) Canceled after 0s
File Canva gói toàn bộ nội dung trang vào 1 Form XObject nên chế độ sửa không thấy gì để sửa. Engine giờ liệt kê PHẲNG đệ quy vào form (FPDFFormObj_CountObjects/GetObject qua pdfium-render), mỗi mục có path [i,j,...] + tích ma trận form để quy toạ độ/cỡ chữ về trang; index của ObjectInfo/EditOp = vị trí trong danh sách phẳng (trang không form thì trùng index trang — tương thích ngược, UI không đổi cách gửi op). - SetText in-place/substitute + ReflowText + Delete hoạt động với run trong form; xoá trong form = set_text chuỗi rỗng (FPDFFormObj_RemoveObject chưa mở ở wrapper cho pdfium_7543), object mới vẽ ở cấp trang với matrix đã compose. - Đã xác minh trước: PDFium regenerate stream form khi con bị sửa (ProcessForm / HasDirtyStreams) — canary test round-trip kèm theo. - ObjectInfo thêm nested/expanded; UI bỏ khung form phủ trang + chặn kéo run trong form (Transform chưa hỗ trợ). - 4 test integration mới với fixture Form XObject tự dựng bằng lopdf (dev-dependency mới); CI thêm bước cargo test -p ff-engine trước build (máy dev không có Rust — CI là nơi duy nhất chạy test), cache thêm target/. Chi tiết: docs/12-phase4-summary.md (Iteration 4). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -663,6 +663,10 @@ struct ObjectInfoDto {
|
||||
index: u16,
|
||||
kind: String,
|
||||
rect: RectDto,
|
||||
/// Object nằm trong Form XObject (sửa text OK, kéo/resize chưa hỗ trợ).
|
||||
nested: bool,
|
||||
/// Form đã liệt kê con riêng — UI bỏ khung của form này.
|
||||
expanded: bool,
|
||||
text: Option<String>,
|
||||
font_name: Option<String>,
|
||||
font_family: Option<String>,
|
||||
@@ -685,6 +689,8 @@ fn edit_list_objects(path: String, page: u16, password: Option<String>) -> Resul
|
||||
index: o.index,
|
||||
kind: o.kind.as_str().to_string(),
|
||||
rect: RectDto { left: o.rect.left, bottom: o.rect.bottom, right: o.rect.right, top: o.rect.top },
|
||||
nested: o.nested,
|
||||
expanded: o.expanded,
|
||||
text: o.text,
|
||||
font_name: o.font_name,
|
||||
font_family: o.font_family,
|
||||
|
||||
Reference in New Issue
Block a user