Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -410,6 +410,7 @@ public static class Pipeline {
public static class Operations {
private String weasyprint;
private String unoconvert;
private String embedpdfFrontend;
}
}

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

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

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

@Data
Expand All @@ -712,6 +718,7 @@ public static class TimeoutMinutes {
private long qpdfTimeoutMinutes;
private long ghostscriptTimeoutMinutes;
private long ocrMyPdfTimeoutMinutes;
private long pdfiumRedactorTimeoutMinutes;

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

public long getPdfiumRedactorTimeoutMinutes() {
return pdfiumRedactorTimeoutMinutes > 0 ? pdfiumRedactorTimeoutMinutes : 30;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ public static ProcessExecutor getInstance(Processes processType, boolean liveUpd
.getSessionLimit()
.getOcrMyPdfSessionLimit();
case CFF_CONVERTER -> 1;
case PDFIUM_REDACTOR ->
applicationProperties
.getProcessExecutor()
.getSessionLimit()
.getPdfiumRedactorSessionLimit();
};

long timeoutMinutes =
Expand Down Expand Up @@ -151,6 +156,11 @@ public static ProcessExecutor getInstance(Processes processType, boolean liveUpd
.getProcessExecutor()
.getTimeoutMinutes()
.getOcrMyPdfTimeoutMinutes();
case PDFIUM_REDACTOR ->
applicationProperties
.getProcessExecutor()
.getTimeoutMinutes()
.getPdfiumRedactorTimeoutMinutes();
case CFF_CONVERTER -> 5L;
};
return new ProcessExecutor(semaphoreLimit, liveUpdates, timeoutMinutes);
Expand Down Expand Up @@ -305,6 +315,7 @@ public enum Processes {
QPDF,
GHOSTSCRIPT,
OCR_MY_PDF,
PDFIUM_REDACTOR,
CFF_CONVERTER
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public void initSecretKey() throws IOException {
applicationProperties.getAutomaticallyGenerated().setKey(secretKey);
}
}

public void initLegalUrls() throws IOException {
// Initialize Terms and Conditions
String termsUrl = applicationProperties.getLegal().getTermsAndConditions();
Expand Down
Loading