Root causes:
1. generate_layout_pdf() didn't properly route UnifiedDocument JSON
to Direct track rendering - added format detection and JSON-to-
UnifiedDocument conversion
2. Chart elements with page-spanning bboxes (e.g., chart_1_44 covering
entire page) caused all text to be filtered by _is_element_inside_regions
- Fix: only IMAGE/FIGURE/LOGO are exclusion regions, not CHART/DIAGRAM
3. Fixed UnifiedDocument constructor call (removed invalid params)
4. Fixed method name typo (generate_pdf_from_unified_document →
generate_from_unified_document)
5. Fixed variable name typo in _draw_image_element_direct logging
Result: edit3.pdf text extraction changed from 0 chars to 773 chars
Note: Chinese chars render as 'I' due to CJK font encoding - separate
issue to be addressed when implementing translation feature.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>