fixes and timeouts

This commit is contained in:
Anthony Stirling
2024-01-10 00:33:07 +00:00
parent ef12c2f892
commit e717d83f75
3 changed files with 52 additions and 13 deletions

View File

@@ -35,15 +35,17 @@ public class FileToPdf {
command.add("weasyprint");
} else {
command.add("wkhtmltopdf");
command.add("--enable-local-file-access");
}
command.add(tempInputFile.toString());
command.add(tempOutputFile.toString());
ProcessExecutorResult returnCode;
if (fileName.endsWith(".zip")) {
if (htmlFormatsInstalled) {
command.add("--allow");
command.add(tempOutputFile.getParent().toString());
// command.add(1, "--allow");
// command.add(2, tempInputFile.getParent().toString());
}
returnCode =
ProcessExecutor.getInstance(ProcessExecutor.Processes.WEASYPRINT)