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
+4 -1
View File
@@ -150,7 +150,10 @@ This document tracks security vulnerabilities found in DocuElevate and their rem
**Fix:** Implemented configurable file upload size limits with the following features:
- `MAX_UPLOAD_SIZE`: Maximum file upload size in bytes (default: 1GB)
- `MAX_SINGLE_FILE_SIZE`: Optional maximum size for a single file chunk
- Automatic file splitting for large PDFs when max_single_file_size is configured
- **Automatic page-based PDF splitting** for large PDFs when max_single_file_size is configured
- Splits PDFs at **page boundaries** using PyPDF2, NOT by byte position
- Each output file is a structurally valid, complete PDF
- No risk of corrupted or broken PDF files
- Split files are processed sequentially to prevent overwhelming the system
- Clear error messages referencing SECURITY_AUDIT.md for configuration details