fixes
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package stirling.software.SPDF.model.api;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper=true)
|
||||
public class PDFWithPageSize extends PDFFile {
|
||||
|
||||
@Schema(description = "The scale of pages in the output PDF. Acceptable values are A0-A6, LETTER, LEGAL.",
|
||||
allowableValues = {
|
||||
"A0", "A1", "A2", "A3", "A4", "A5", "A6", "LETTER", "LEGAL"
|
||||
})
|
||||
private String pageSize;
|
||||
}
|
||||
@@ -4,17 +4,11 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import stirling.software.SPDF.model.api.PDFFile;
|
||||
import stirling.software.SPDF.model.api.PDFWithPageSize;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper=true)
|
||||
public class ScalePagesRequest extends PDFFile {
|
||||
|
||||
@Schema(description = "The scale of pages in the output PDF. Acceptable values are A0-A10, B0-B9, LETTER, TABLOID, LEDGER, LEGAL, EXECUTIVE.",
|
||||
allowableValues = {
|
||||
"A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9", "A10", "B0", "B1", "B2", "B3", "B4",
|
||||
"B5", "B6", "B7", "B8", "B9", "LETTER", "TABLOID", "LEDGER", "LEGAL", "EXECUTIVE"
|
||||
})
|
||||
private String targetPDRectangle;
|
||||
public class ScalePagesRequest extends PDFWithPageSize {
|
||||
|
||||
@Schema(description = "The scale of the content on the pages of the output PDF. Acceptable values are floats.")
|
||||
private float scaleFactor;
|
||||
|
||||
@@ -10,5 +10,5 @@ import stirling.software.SPDF.model.api.PDFFile;
|
||||
public class ExtractHeaderRequest extends PDFFile {
|
||||
|
||||
@Schema(description = "Flag indicating whether to use the first text as a fallback if no suitable title is found. Defaults to false.", required = false, defaultValue = "false")
|
||||
private Boolean useFirstTextAsFallback;
|
||||
private boolean useFirstTextAsFallback;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import stirling.software.SPDF.model.api.PDFFile;
|
||||
public class MetadataRequest extends PDFFile {
|
||||
|
||||
@Schema(description = "Delete all metadata if set to true")
|
||||
private Boolean deleteAll;
|
||||
private boolean deleteAll;
|
||||
|
||||
@Schema(description = "The author of the document")
|
||||
private String author;
|
||||
|
||||
@@ -14,5 +14,5 @@ public class OptimizePdfRequest extends PDFFile {
|
||||
private Integer optimizeLevel;
|
||||
|
||||
@Schema(description = "The expected output size, e.g. '100MB', '25KB', etc.")
|
||||
private String expectedOutputSizeString;
|
||||
private String expectedOutputSize;
|
||||
}
|
||||
|
||||
@@ -12,19 +12,19 @@ import stirling.software.SPDF.model.api.PDFFile;
|
||||
public class ProcessPdfWithOcrRequest extends PDFFile {
|
||||
|
||||
@Schema(description = "List of languages to use in OCR processing")
|
||||
private List<String> selectedLanguages;
|
||||
private List<String> languages;
|
||||
|
||||
@Schema(description = "Include OCR text in a sidecar text file if set to true")
|
||||
private Boolean sidecar;
|
||||
private boolean sidecar;
|
||||
|
||||
@Schema(description = "Deskew the input file if set to true")
|
||||
private Boolean deskew;
|
||||
private boolean deskew;
|
||||
|
||||
@Schema(description = "Clean the input file if set to true")
|
||||
private Boolean clean;
|
||||
private boolean clean;
|
||||
|
||||
@Schema(description = "Clean the final output if set to true")
|
||||
private Boolean cleanFinal;
|
||||
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;
|
||||
@@ -33,5 +33,5 @@ public class ProcessPdfWithOcrRequest extends PDFFile {
|
||||
private String ocrRenderType = "hocr";
|
||||
|
||||
@Schema(description = "Remove images from the output PDF if set to true")
|
||||
private Boolean removeImagesAfter;
|
||||
private boolean removeImagesAfter;
|
||||
}
|
||||
|
||||
@@ -10,17 +10,17 @@ import stirling.software.SPDF.model.api.PDFFile;
|
||||
public class SanitizePdfRequest extends PDFFile {
|
||||
|
||||
@Schema(description = "Remove JavaScript actions from the PDF", defaultValue = "false")
|
||||
private Boolean removeJavaScript;
|
||||
private boolean removeJavaScript;
|
||||
|
||||
@Schema(description = "Remove embedded files from the PDF", defaultValue = "false")
|
||||
private Boolean removeEmbeddedFiles;
|
||||
private boolean removeEmbeddedFiles;
|
||||
|
||||
@Schema(description = "Remove metadata from the PDF", defaultValue = "false")
|
||||
private Boolean removeMetadata;
|
||||
private boolean removeMetadata;
|
||||
|
||||
@Schema(description = "Remove links from the PDF", defaultValue = "false")
|
||||
private Boolean removeLinks;
|
||||
private boolean removeLinks;
|
||||
|
||||
@Schema(description = "Remove fonts from the PDF", defaultValue = "false")
|
||||
private Boolean removeFonts;
|
||||
private boolean removeFonts;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class SignPDFWithCertRequest extends PDFFile {
|
||||
private String password;
|
||||
|
||||
@Schema(description = "Whether to visually show the signature in the PDF file")
|
||||
private Boolean showSignature;
|
||||
private boolean showSignature;
|
||||
|
||||
@Schema(description = "The reason for signing the PDF")
|
||||
private String reason;
|
||||
|
||||
Reference in New Issue
Block a user