## MODIFIED Requirements ### Requirement: Enhanced PDF Export with Layout Preservation The PDF export SHALL accurately preserve document layout from both OCR and direct extraction tracks with correct coordinate transformation and multi-page support. For Direct Track, a background image rendering approach SHALL be used for visual fidelity. #### Scenario: OCR Track reflow PDF uses raw OCR regions - **WHEN** generating reflow PDF for an OCR Track document - **THEN** the system SHALL load text content from `raw_ocr_regions.json` files - **AND** text blocks SHALL be sorted by Y coordinate for reading order - **AND** all text content SHALL match the Layout PDF output - **AND** images and charts SHALL be embedded from element `saved_path` #### Scenario: Direct Track reflow PDF uses structured content - **WHEN** generating reflow PDF for a Direct Track document - **THEN** the system SHALL use `content.cells` for table rendering - **AND** text elements SHALL use `content` string directly - **AND** images and charts SHALL be embedded from element `saved_path` #### Scenario: Reflow PDF content consistency - **WHEN** comparing Layout PDF and Reflow PDF for the same document - **THEN** both PDFs SHALL contain the same text content - **AND** only the presentation format SHALL differ (positioned vs flowing)