AEM PDF merge limitations for file size and attachment count
This article explains the practical limitations on file size and attachment count when merging PDFs and JPEGs using Adobe Experience Manager’s PDF merge feature, and provides guidance for optimal system planning.
Description description
Environment
Adobe Experience Manager (AEM), all versions
Symptoms
When generating a PDF using AEM and merging it with multiple PDF and JPEG attachments (each up to 10 MB), questions arise regarding:
- Limits on the number of PDFs or JPEGs that can be merged
- Limits on the total size of the final merged PDF
- Performance concerns or limitations when handling repeated PDF generation and merge requests
No specific error messages or stack traces are reported. This is a design-time consideration for system planning.
Cause
AEM’s PDF merge functionality is constrained by available system resources and JVM configuration, rather than explicit product-imposed limits.
Resolution resolution
Follow the steps below to resolve the issue:
- Review AEM merge capabilities: There are no hard-coded limits on the number of PDFs or JPEGs that can be merged in a single operation, but practical limits are set by available system memory, JVM heap size, and timeout settings.
- Consider file size constraints: While there’s no explicit maximum total file size for the merged PDF set by AEM, large merges (hundreds of MBs or more) may cause out-of-memory errors or process timeouts, depending on server configuration. Monitor the size of individual attachments and the cumulative size of all files being merged.
- Monitor performance for repeated or concurrent requests: Repeated or concurrent PDF generation and merge requests can impact server performance. Monitor JVM heap usage and adjust, as needed. Implement request throttling or queuing to prevent resource exhaustion. Test the merge process under expected load conditions to identify bottlenecks.
- Follow best practices: Limit the number and size of attachments where possible. Ensure the AEM instance has sufficient resources (CPU, memory) for large merge operations. Set appropriate timeout values for long-running workflows.
- After making adjustments, test the merge process to verify that it completes successfully under expected usage conditions.
recommendation-more-help
experience-cloud-kcs-help-kbarticles