docs: clarify PDF splitting is page-based, not byte-based

- Add prominent documentation that splitting uses page boundaries
- Update docstring with IMPORTANT note about page-level splitting
- Add test to validate split PDFs are valid and readable
- Update ConfigurationGuide.md to emphasize page-based approach
- Update SECURITY_AUDIT.md with implementation details
- Ensures users understand no risk of corrupted PDFs

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-10 13:51:24 +00:00
parent dec7afe712
commit f4b4ab0328
4 changed files with 62 additions and 5 deletions
+5
View File
@@ -57,6 +57,11 @@ MAX_SINGLE_FILE_SIZE=524288000
**File Splitting Behavior:**
- When `MAX_SINGLE_FILE_SIZE` is configured and a PDF exceeds this size, it is automatically split into smaller chunks
- **IMPORTANT:** Splitting is done at **PAGE BOUNDARIES**, not by byte position
- Uses PyPDF2 to properly parse PDF structure
- Each output file is a complete, valid PDF containing whole pages
- No risk of corrupted or broken PDF files
- Pages are distributed across output files to stay under size limit
- Each chunk is processed sequentially as a separate task
- Only works for PDF files (images and office documents are converted to PDF first)
- Original file is removed after successful splitting