mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-08-26 22:29:24 +00:00
MAX_SAFE_DPI
This commit is contained in:
parent
3d3387e62d
commit
a6fee5e90f
@ -145,7 +145,7 @@ public class PdfUtils {
|
|||||||
throws IOException, Exception {
|
throws IOException, Exception {
|
||||||
|
|
||||||
// Validate and limit DPI to prevent excessive memory usage
|
// Validate and limit DPI to prevent excessive memory usage
|
||||||
final int MAX_SAFE_DPI = 300; // Maximum safe DPI to prevent memory issues
|
final int MAX_SAFE_DPI = 500; // Maximum safe DPI to prevent memory issues
|
||||||
if (DPI > MAX_SAFE_DPI) {
|
if (DPI > MAX_SAFE_DPI) {
|
||||||
throw ExceptionUtils.createIllegalArgumentException(
|
throw ExceptionUtils.createIllegalArgumentException(
|
||||||
"error.dpiExceedsLimit",
|
"error.dpiExceedsLimit",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user