Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ public static class Operations {
private String calibre;
private String ocrmypdf;
private String soffice;
private String embedpdfFrontend;
}
}

Expand Down Expand Up @@ -725,6 +726,7 @@ public static class SessionLimit {
private int tesseractSessionLimit;
private int ghostscriptSessionLimit;
private int ocrMyPdfSessionLimit;
private int pdfiumRedactorSessionLimit;
private int ffmpegSessionLimit;

public int getQpdfSessionLimit() {
Expand Down Expand Up @@ -771,6 +773,10 @@ public int getOcrMyPdfSessionLimit() {
return ocrMyPdfSessionLimit > 0 ? ocrMyPdfSessionLimit : 2;
}

public int getPdfiumRedactorSessionLimit() {
return pdfiumRedactorSessionLimit > 0 ? pdfiumRedactorSessionLimit : 1;
}

public int getFfmpegSessionLimit() {
return ffmpegSessionLimit > 0 ? ffmpegSessionLimit : 2;
}
Expand Down Expand Up @@ -802,7 +808,9 @@ public static class TimeoutMinutes {
private long qpdfTimeoutMinutes;
private long ghostscriptTimeoutMinutes;
private long ocrMyPdfTimeoutMinutes;
private long pdfiumRedactorTimeoutMinutes;
private long ffmpegTimeoutMinutes;
private PdfEditor pdfEditor = new PdfEditor();

public long getTesseractTimeoutMinutes() {
return tesseractTimeoutMinutes > 0 ? tesseractTimeoutMinutes : 30;
Expand Down Expand Up @@ -848,6 +856,10 @@ public long getOcrMyPdfTimeoutMinutes() {
return ocrMyPdfTimeoutMinutes > 0 ? ocrMyPdfTimeoutMinutes : 30;
}

public long getPdfiumRedactorTimeoutMinutes() {
return pdfiumRedactorTimeoutMinutes > 0 ? pdfiumRedactorTimeoutMinutes : 30;
}

public long getFfmpegTimeoutMinutes() {
return ffmpegTimeoutMinutes > 0 ? ffmpegTimeoutMinutes : 30;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ public static ProcessExecutor getInstance(Processes processType, boolean liveUpd
.getSessionLimit()
.getOcrMyPdfSessionLimit();
case CFF_CONVERTER -> 1;
case PDFIUM_REDACTOR ->
applicationProperties
.getProcessExecutor()
.getSessionLimit()
.getPdfiumRedactorSessionLimit();
case FFMPEG ->
applicationProperties
.getProcessExecutor()
Expand Down Expand Up @@ -166,6 +171,11 @@ public static ProcessExecutor getInstance(Processes processType, boolean liveUpd
.getProcessExecutor()
.getTimeoutMinutes()
.getOcrMyPdfTimeoutMinutes();
case PDFIUM_REDACTOR ->
applicationProperties
.getProcessExecutor()
.getTimeoutMinutes()
.getPdfiumRedactorTimeoutMinutes();
case CFF_CONVERTER -> 5L;
case FFMPEG ->
applicationProperties
Expand Down Expand Up @@ -326,6 +336,7 @@ public enum Processes {
QPDF,
GHOSTSCRIPT,
OCR_MY_PDF,
PDFIUM_REDACTOR,
CFF_CONVERTER,
FFMPEG
}
Expand Down
Loading
Loading