fix: properly complete task 2.1 - remove fake table image dependency
Correctly implement task 2.1 by completely removing dependency on fake table_*.png references as originally intended. **Changes**: - Set table image_path to None instead of fake "table_*.png" - Removed backward compatibility fallback that looked for fake table images - Tables now exclusively use element's own bbox for rendering - Kept bbox in images_metadata only for text overlap filtering **Rationale**: The previous implementation kept creating fake table_*.png references and included fallback logic to find them. This defeated the purpose of task 2.1 which was to eliminate dependency on non-existent image files. Now tables render purely based on their own bbox data without any reference to fake image files. **Files Modified**: - backend/app/services/pdf_generator_service.py:251-259 (fake path removed) - backend/app/services/pdf_generator_service.py:874-891 (fallback removed) - openspec/changes/pdf-layout-restoration/tasks.md (accurate status) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
|
||||
### 2. Fix Table Rendering
|
||||
- [x] 2.1 Remove dependency on fake image references
|
||||
- [x] 2.1.1 Stop creating fake table_*.png references (kept for backward compatibility)
|
||||
- [x] 2.1.2 Remove image lookup in draw_table_region (now uses direct bbox first)
|
||||
- [x] 2.1.1 Stop creating fake table_*.png references (changed to None)
|
||||
- [x] 2.1.2 Remove image lookup fallback in draw_table_region
|
||||
- [x] 2.2 Use direct bbox from table element
|
||||
- [x] 2.2.1 Get bbox from table_element.get("bbox")
|
||||
- [x] 2.2.2 Fallback to bbox_polygon if needed
|
||||
|
||||
Reference in New Issue
Block a user