Compare commits

...

3 Commits

Author SHA1 Message Date
Anthony Stirling
8e95254957 Update build.gradle 2025-02-04 13:22:21 +00:00
Anthony Stirling
6473748006 Update OCRController.java 2025-02-04 13:21:13 +00:00
Anthony Stirling
e3e8cd7195 Update ConvertHtmlToPDF.java 2025-02-04 13:18:45 +00:00
3 changed files with 6 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ ext {
}
group = "stirling.software"
version = "0.40.1"
version = "0.40.2"
java {
// 17 is lowest but we support and recommend 21

View File

@@ -44,7 +44,7 @@ public class ConvertHtmlToPDF {
@Operation(
summary = "Convert an HTML or ZIP (containing HTML and CSS) to PDF",
description =
"This endpoint takes an HTML or ZIP file input and converts it to a PDF format.")
"This endpoint takes an HTML or ZIP file input and converts it to a PDF format. Input:HTML Output:PDF Type:SISO")
public ResponseEntity<byte[]> HtmlToPdf(@ModelAttribute HTMLToPdfRequest request)
throws Exception {
MultipartFile fileInput = request.getFileInput();

View File

@@ -8,7 +8,7 @@ import java.util.*;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import io.swagger.v3.oas.annotations.Operation;
import javax.imageio.ImageIO;
import org.apache.pdfbox.multipdf.PDFMergerUtility;
@@ -65,6 +65,9 @@ public class OCRController {
}
@PostMapping(consumes = "multipart/form-data", value = "/ocr-pdf")
@Operation(
summary = "Process PDF files with OCR using Tesseract",
description = "Takes a PDF file as input, performs OCR using specified languages and OCR type (skip-text/force-ocr), and returns the processed PDF. Input:PDF Output:PDF Type:SISO")
public ResponseEntity<byte[]> processPdfWithOCR(
@ModelAttribute ProcessPdfWithOcrRequest request)
throws IOException, InterruptedException {