Number of fixes and making pipline LIVE ! (#907)

Closes #889 and #332
#710
#901
#885
This commit is contained in:
Anthony Stirling
2024-03-13 19:15:10 +00:00
committed by GitHub
parent ac620082ec
commit ae73595335
19 changed files with 359 additions and 220 deletions

View File

@@ -136,6 +136,7 @@ public class GeneralUtils {
int offset = oneBased ? 1 : 0;
for (String page : pages) {
if ("all".equalsIgnoreCase(page)) {
for (int i = 0; i < totalPages; i++) {
result.add(i + offset);
}

View File

@@ -214,6 +214,7 @@ public class PdfUtils {
throws IOException, Exception {
try (PDDocument document = Loader.loadPDF(inputStream)) {
PDFRenderer pdfRenderer = new PDFRenderer(document);
pdfRenderer.setSubsamplingAllowed(true);
int pageCount = document.getNumberOfPages();
// Create a ByteArrayOutputStream to save the image(s) to

View File

@@ -189,7 +189,11 @@ public class ProcessExecutor {
}
}
} else if (exitCode != 0) {
throw new IOException("Command process failed with exit code " + exitCode);
throw new IOException(
"Command process failed with exit code "
+ exitCode
+ "\nLogs: "
+ messages);
}
} finally {
semaphore.release();