mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-01-23 00:06:08 +01:00
Revert weasy
This commit is contained in:
parent
f10b3ffe3c
commit
a9679da719
@ -28,10 +28,6 @@ import stirling.software.SPDF.utils.WebResponseUtils;
|
|||||||
@RequestMapping("/api/v1/convert")
|
@RequestMapping("/api/v1/convert")
|
||||||
public class ConvertWebsiteToPDF {
|
public class ConvertWebsiteToPDF {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
@Qualifier("bookAndHtmlFormatsInstalled")
|
|
||||||
private boolean bookAndHtmlFormatsInstalled;
|
|
||||||
|
|
||||||
@PostMapping(consumes = "multipart/form-data", value = "/url/pdf")
|
@PostMapping(consumes = "multipart/form-data", value = "/url/pdf")
|
||||||
@Operation(
|
@Operation(
|
||||||
summary = "Convert a URL to a PDF",
|
summary = "Convert a URL to a PDF",
|
||||||
@ -53,11 +49,7 @@ public class ConvertWebsiteToPDF {
|
|||||||
|
|
||||||
// Prepare the OCRmyPDF command
|
// Prepare the OCRmyPDF command
|
||||||
List<String> command = new ArrayList<>();
|
List<String> command = new ArrayList<>();
|
||||||
if (!bookAndHtmlFormatsInstalled) {
|
|
||||||
command.add("weasyprint");
|
command.add("weasyprint");
|
||||||
} else {
|
|
||||||
command.add("wkhtmltopdf");
|
|
||||||
}
|
|
||||||
command.add(URL);
|
command.add(URL);
|
||||||
command.add(tempOutputFile.toString());
|
command.add(tempOutputFile.toString());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user