other changes

This commit is contained in:
Anthony Stirling 2024-02-10 00:08:54 +00:00
parent 96e399a617
commit 5a52e3d6dd
2 changed files with 6 additions and 6 deletions

View file

@ -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("[.][^.]+$", "")

View file

@ -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<String> command = new ArrayList<>();
if (!htmlFormatsInstalled) {
if (!installBookAndHtmlFormats) {
command.add("weasyprint");
} else {
command.add("wkhtmltopdf");