ERR_PDF_TOO_LARGE β PDF Too Large
HTTP Status: 400 Retryable: No Automatic retry: None. The file must be reduced in size before uploading.
What the User Sees
This PDF exceeds the maximum file size limit. (ERR_PDF_TOO_LARGE)
What Causes This Error
The uploaded file exceeds the MAX_FILE_SIZE limit (10 MB). This check is performed both client-side in useUpload.ts (to provide immediate feedback) and server-side in routes/files.ts (to enforce the limit regardless of client behavior).
Large PDFs typically contain high-resolution embedded images, embedded fonts, or multimedia content. A 10-page document with high-resolution photos can easily exceed 10 MB, while a 100-page text-only document may only be 1-2 MB.
When this error occurs, an oversized file alert email is automatically sent to the admin for monitoring purposes. This helps track whether the size limit is appropriate for the user base.
Resolution Steps
For Users
- Compress the PDF using Adobe Acrobatβs βReduce File Sizeβ or βOptimize PDFβ feature.
- Use free online PDF compressors (SmallPDF, iLovePDF, PDF24) to reduce the file size.
- If the document has high-resolution images, reduce image quality or resolution before creating the PDF.
- Split the document into smaller files and convert each one separately.
- Remove unnecessary pages before uploading β use page ranges if you only need specific sections converted.
- If the PDF was scanned at high DPI, re-scan at a lower resolution (150-300 DPI is sufficient for text).
For Administrators
- The 10 MB limit is defined in
packages/shared/src/constants.tsasMAX_FILE_SIZE. - Increasing the limit requires a code change and redeployment to both the frontend and API.
- Before increasing, consider the impact on:
- R2 storage costs (larger files consume more storage)
- Conversion time (larger files take longer, risking timeouts)
- Cloudflare Worker memory limits (the PDF must fit in Worker memory for processing)
- Monitor the oversized file alert emails to understand how often users hit this limit and by how much.
- If increasing the limit, also update the client-side validation in
useUpload.tsto match.
Related Errors
- ERR_PDF_CORRUPT β PDF structure is invalid