finishing forms
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
package stirling.software.SPDF.model.api.security;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import stirling.software.SPDF.model.api.PDFFile;
|
||||
|
||||
@Data
|
||||
public class AddPasswordRequest extends PDFFile {
|
||||
|
||||
@Schema(description = "The owner password to be added to the PDF file (Restricts what can be done with the document once it is opened)", defaultValue = "")
|
||||
private String ownerPassword;
|
||||
|
||||
@Schema(description = "The password to be added to the PDF file (Restricts the opening of the document itself.)", defaultValue = "")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "The length of the encryption key", allowableValues = {"40", "128", "256"}, defaultValue = "256")
|
||||
private int keyLength;
|
||||
|
||||
@Schema(description = "Whether the document assembly is allowed", example = "false")
|
||||
private boolean canAssembleDocument;
|
||||
|
||||
@Schema(description = "Whether content extraction for accessibility is allowed", example = "false")
|
||||
private boolean canExtractContent;
|
||||
|
||||
@Schema(description = "Whether content extraction for accessibility is allowed", example = "false")
|
||||
private boolean canExtractForAccessibility;
|
||||
|
||||
@Schema(description = "Whether form filling is allowed", example = "false")
|
||||
private boolean canFillInForm;
|
||||
|
||||
@Schema(description = "Whether the document modification is allowed", example = "false")
|
||||
private boolean canModify;
|
||||
|
||||
@Schema(description = "Whether modification of annotations is allowed", example = "false")
|
||||
private boolean canModifyAnnotations;
|
||||
|
||||
@Schema(description = "Whether printing of the document is allowed", example = "false")
|
||||
private boolean canPrint;
|
||||
|
||||
@Schema(description = "Whether faithful printing is allowed", example = "false")
|
||||
private boolean canPrintFaithful;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package stirling.software.SPDF.model.api.security;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import stirling.software.SPDF.model.api.PDFFile;
|
||||
|
||||
@Data
|
||||
public class AddWatermarkRequest extends PDFFile {
|
||||
|
||||
@Schema(description = "The watermark type (text or image)", required = true)
|
||||
private String watermarkType;
|
||||
|
||||
@Schema(description = "The watermark text")
|
||||
private String watermarkText;
|
||||
|
||||
@Schema(description = "The watermark image")
|
||||
private MultipartFile watermarkImage;
|
||||
|
||||
@Schema(description = "The selected alphabet",
|
||||
allowableValues = {"roman", "arabic", "japanese", "korean", "chinese"},
|
||||
defaultValue = "roman")
|
||||
private String alphabet;
|
||||
|
||||
@Schema(description = "The font size of the watermark text", example = "30")
|
||||
private float fontSize;
|
||||
|
||||
@Schema(description = "The rotation of the watermark in degrees", example = "0")
|
||||
private float rotation;
|
||||
|
||||
@Schema(description = "The opacity of the watermark (0.0 - 1.0)", example = "0.5")
|
||||
private float opacity;
|
||||
|
||||
@Schema(description = "The width spacer between watermark elements", example = "50")
|
||||
private int widthSpacer;
|
||||
|
||||
@Schema(description = "The height spacer between watermark elements", example = "50")
|
||||
private int heightSpacer;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package stirling.software.SPDF.model.api.security;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import stirling.software.SPDF.model.api.PDFFile;
|
||||
|
||||
@Data
|
||||
public class PDFPasswordRequest extends PDFFile {
|
||||
|
||||
@Schema(description = "The password of the PDF file", required = true)
|
||||
private String password;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package stirling.software.SPDF.model.api.security;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import stirling.software.SPDF.model.api.PDFFile;
|
||||
|
||||
@Data
|
||||
public class RedactPdfRequest extends PDFFile {
|
||||
|
||||
@Schema(description = "List of text to redact from the PDF", type = "string", required = true)
|
||||
private String listOfText;
|
||||
|
||||
@Schema(description = "Whether to use regex for the listOfText", defaultValue = "false")
|
||||
private boolean useRegex;
|
||||
|
||||
@Schema(description = "Whether to use whole word search", defaultValue = "false")
|
||||
private boolean wholeWordSearch;
|
||||
|
||||
@Schema(description = "The color for redaction", defaultValue = "#000000")
|
||||
private String redactColor;
|
||||
|
||||
@Schema(description = "Custom padding for redaction", type = "number")
|
||||
private float customPadding;
|
||||
|
||||
@Schema(description = "Convert the redacted PDF to an image", defaultValue = "false")
|
||||
private boolean convertPDFToImage;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package stirling.software.SPDF.model.api.security;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import stirling.software.SPDF.model.api.PDFFile;
|
||||
|
||||
@Data
|
||||
public class SanitizePdfRequest extends PDFFile {
|
||||
|
||||
@Schema(description = "Remove JavaScript actions from the PDF", defaultValue = "false")
|
||||
private Boolean removeJavaScript;
|
||||
|
||||
@Schema(description = "Remove embedded files from the PDF", defaultValue = "false")
|
||||
private Boolean removeEmbeddedFiles;
|
||||
|
||||
@Schema(description = "Remove metadata from the PDF", defaultValue = "false")
|
||||
private Boolean removeMetadata;
|
||||
|
||||
@Schema(description = "Remove links from the PDF", defaultValue = "false")
|
||||
private Boolean removeLinks;
|
||||
|
||||
@Schema(description = "Remove fonts from the PDF", defaultValue = "false")
|
||||
private Boolean removeFonts;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package stirling.software.SPDF.model.api.security;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import stirling.software.SPDF.model.api.PDFFile;
|
||||
|
||||
@Data
|
||||
public class SignPDFWithCertRequest extends PDFFile {
|
||||
|
||||
@Schema(description = "The type of the digital certificate", allowableValues = { "PKCS12", "PEM" })
|
||||
private String certType;
|
||||
|
||||
@Schema(description = "The private key for the digital certificate (required for PEM type certificates)")
|
||||
private MultipartFile privateKeyFile;
|
||||
|
||||
@Schema(description = "The digital certificate (required for PEM type certificates)")
|
||||
private MultipartFile certFile;
|
||||
|
||||
@Schema(description = "The PKCS12 keystore file (required for PKCS12 type certificates)")
|
||||
private MultipartFile p12File;
|
||||
|
||||
@Schema(description = "The password for the keystore or the private key")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "Whether to visually show the signature in the PDF file")
|
||||
private Boolean showSignature;
|
||||
|
||||
@Schema(description = "The reason for signing the PDF")
|
||||
private String reason;
|
||||
|
||||
@Schema(description = "The location where the PDF is signed")
|
||||
private String location;
|
||||
|
||||
@Schema(description = "The name of the signer")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "The page number where the signature should be visible. This is required if showSignature is set to true")
|
||||
private Integer pageNumber;
|
||||
}
|
||||
Reference in New Issue
Block a user