1.4 KiB
1.4 KiB
1. Backend Implementation
- 1.1 Create
generate_reflow_pdf()method in pdf_generator_service.py - 1.2 Implement
_get_elements_in_reading_order()for both tracks - 1.3 Implement reflow text rendering with consistent font sizes
- 1.4 Implement table rendering in reflow mode (Platypus Table)
- 1.5 Implement inline image embedding
- 1.6 Add
format=reflowquery parameter to tasks download endpoint - 1.7 Update
generate_translated_pdf()to use reflow mode
2. Frontend Implementation
- 2.1 Add "Download Reflow PDF" button for original documents
- 2.2 Update download logic to support format parameter
- 2.3 Remove MADLAD-400 badge (line 545)
- 2.4 Update translation description text to reflect Dify cloud service (line 652)
3. Testing
- 3.1 Test OCR track reflow PDF (with reading_order) - Basic smoke test passed
- 3.2 Test Direct track reflow PDF (implicit order) - No test data available
- 3.3 Test translated PDF (reflow mode) - Basic smoke test passed
- 3.4 Test documents with tables - SUCCESS (62294 bytes, 2 tables)
- 3.5 Test documents with images - SUCCESS (embedded img_in_table)
- 3.6 Test multi-page documents - SUCCESS (11451 bytes, 3 pages)
- 3.7 Verify layout PDF still works correctly - SUCCESS (104543 bytes)
4. Documentation
- 4.1 Update spec with reflow layout requirements