mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 11:23:10 +02:00
finishing forms
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package stirling.software.SPDF.model.api.misc;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import stirling.software.SPDF.model.api.PDFWithPageNums;
|
||||
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@Data
|
||||
public class AddPageNumbersRequest extends PDFWithPageNums {
|
||||
|
||||
@Schema(description = "Custom margin: small/medium/large", allowableValues = {"small", "medium", "large"})
|
||||
private String customMargin;
|
||||
|
||||
@Schema(description = "Position: 1 of 9 positions", minimum = "1", maximum = "9")
|
||||
private int position;
|
||||
|
||||
@Schema(description = "Starting number", minimum = "1")
|
||||
private int startingNumber;
|
||||
|
||||
@Schema(description = "Which pages to number, default all")
|
||||
private String pagesToNumber;
|
||||
|
||||
@Schema(description = "Custom text: defaults to just number but can have things like \"Page {n} of {p}\"")
|
||||
private String customText;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package stirling.software.SPDF.model.api.misc;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import stirling.software.SPDF.model.api.PDFFile;
|
||||
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@Data
|
||||
public class OverlayImageRequest extends PDFFile {
|
||||
|
||||
@Schema(description = "The image file to be overlaid onto the PDF.")
|
||||
private MultipartFile imageFile;
|
||||
|
||||
@Schema(description = "The x-coordinate at which to place the top-left corner of the image.", example = "0")
|
||||
private float x;
|
||||
|
||||
@Schema(description = "The y-coordinate at which to place the top-left corner of the image.", example = "0")
|
||||
private float y;
|
||||
|
||||
@Schema(description = "Whether to overlay the image onto every page of the PDF.", example = "false")
|
||||
private boolean everyPage;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package stirling.software.SPDF.model.api.misc;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import stirling.software.SPDF.model.api.PDFFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ProcessPdfWithOcrRequest extends PDFFile {
|
||||
|
||||
@Schema(description = "List of languages to use in OCR processing")
|
||||
private List<String> selectedLanguages;
|
||||
|
||||
@Schema(description = "Include OCR text in a sidecar text file if set to true")
|
||||
private Boolean sidecar;
|
||||
|
||||
@Schema(description = "Deskew the input file if set to true")
|
||||
private Boolean deskew;
|
||||
|
||||
@Schema(description = "Clean the input file if set to true")
|
||||
private Boolean clean;
|
||||
|
||||
@Schema(description = "Clean the final output if set to true")
|
||||
private Boolean cleanFinal;
|
||||
|
||||
@Schema(description = "Specify the OCR type, e.g., 'skip-text', 'force-ocr', or 'Normal'", allowableValues = {"skip-text", "force-ocr", "Normal"})
|
||||
private String ocrType;
|
||||
|
||||
@Schema(description = "Specify the OCR render type, either 'hocr' or 'sandwich'", allowableValues = {"hocr", "sandwich"}, defaultValue = "hocr")
|
||||
private String ocrRenderType;
|
||||
|
||||
@Schema(description = "Remove images from the output PDF if set to true")
|
||||
private Boolean removeImagesAfter;
|
||||
}
|
||||
Reference in New Issue
Block a user