diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertHtmlToPDF.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertHtmlToPDF.java index 189eebdf..9945ad2b 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertHtmlToPDF.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertHtmlToPDF.java @@ -23,8 +23,8 @@ import stirling.software.SPDF.utils.WebResponseUtils; public class ConvertHtmlToPDF { @Autowired - @Qualifier("htmlFormatsInstalled") - private boolean htmlFormatsInstalled; + @Qualifier("installBookAndHtmlFormats") + private boolean installBookAndHtmlFormats; @PostMapping(consumes = "multipart/form-data", value = "/html/pdf") @Operation( @@ -47,7 +47,7 @@ public class ConvertHtmlToPDF { } byte[] pdfBytes = FileToPdf.convertHtmlToPdf( - request, fileInput.getBytes(), originalFilename, htmlFormatsInstalled); + request, fileInput.getBytes(), originalFilename, installBookAndHtmlFormats); String outputFilename = originalFilename.replaceFirst("[.][^.]+$", "") diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java index a6cd439b..7fb4eeec 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java @@ -29,8 +29,8 @@ import stirling.software.SPDF.utils.WebResponseUtils; public class ConvertWebsiteToPDF { @Autowired - @Qualifier("htmlFormatsInstalled") - private boolean htmlFormatsInstalled; + @Qualifier("installBookAndHtmlFormats") + private boolean installBookAndHtmlFormats; @PostMapping(consumes = "multipart/form-data", value = "/url/pdf") @Operation( @@ -53,7 +53,7 @@ public class ConvertWebsiteToPDF { // Prepare the OCRmyPDF command List command = new ArrayList<>(); - if (!htmlFormatsInstalled) { + if (!installBookAndHtmlFormats) { command.add("weasyprint"); } else { command.add("wkhtmltopdf");