Applies max_memory_mb setting to PDF generation