From 2fa68be36b155a73e7a412255030bbece7d84ef2 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:57:41 +0000 Subject: [PATCH 1/5] pipeline fixes --- .../api/SplitPdfBySectionsController.java | 4 +- .../converters/ConvertImgPDFController.java | 2 +- .../api/converters/ConvertMarkdownToPdf.java | 2 +- .../api/misc/OverlayImageController.java | 2 +- .../api/pipeline/ApiDocService.java | 45 ++++++- .../api/pipeline/PipelineProcessor.java | 117 +++++++++++------- .../api/security/CertSignController.java | 2 +- .../software/SPDF/utils/FileToPdf.java | 5 +- .../resources/static/js/languageSelection.js | 17 ++- 9 files changed, 139 insertions(+), 57 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/controller/api/SplitPdfBySectionsController.java b/src/main/java/stirling/software/SPDF/controller/api/SplitPdfBySectionsController.java index de3e5a4b..90418169 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/SplitPdfBySectionsController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/SplitPdfBySectionsController.java @@ -121,8 +121,8 @@ public class SplitPdfBySectionsController { subDoc, subPage, AppendMode.APPEND, true, true)) { // Set clipping area and position float translateX = -subPageWidth * i; - - //float translateY = height - subPageHeight * (verticalDivisions - j); + + // float translateY = height - subPageHeight * (verticalDivisions - j); float translateY = -subPageHeight * (verticalDivisions - 1 - j); contentStream.saveGraphicsState(); diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertImgPDFController.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertImgPDFController.java index a3ea2841..a4f8a98d 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertImgPDFController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertImgPDFController.java @@ -96,7 +96,7 @@ public class ConvertImgPDFController { @Operation( summary = "Convert images to a PDF file", description = - "This endpoint converts one or more images to a PDF file. Users can specify whether to stretch the images to fit the PDF page, and whether to automatically rotate the images. Input:Image Output:PDF Type:SISO?") + "This endpoint converts one or more images to a PDF file. Users can specify whether to stretch the images to fit the PDF page, and whether to automatically rotate the images. Input:Image Output:PDF Type:MISO") public ResponseEntity convertToPdf(@ModelAttribute ConvertToPdfRequest request) throws IOException { MultipartFile[] file = request.getFileInput(); diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertMarkdownToPdf.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertMarkdownToPdf.java index fe590459..1b6efefb 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertMarkdownToPdf.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertMarkdownToPdf.java @@ -39,7 +39,7 @@ public class ConvertMarkdownToPdf { @Operation( summary = "Convert a Markdown file to PDF", description = - "This endpoint takes a Markdown file input, converts it to HTML, and then to PDF format.") + "This endpoint takes a Markdown file input, converts it to HTML, and then to PDF format. Input:MARKDOWN Output:PDF Type:SISO") public ResponseEntity markdownToPdf(@ModelAttribute GeneralFile request) throws Exception { MultipartFile fileInput = request.getFileInput(); diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/OverlayImageController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/OverlayImageController.java index 9fe6249c..caf2efaf 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/OverlayImageController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/OverlayImageController.java @@ -30,7 +30,7 @@ public class OverlayImageController { @Operation( summary = "Overlay image onto a PDF file", description = - "This endpoint overlays an image onto a PDF file at the specified coordinates. The image can be overlaid on every page of the PDF if specified. Input:PDF/IMAGE Output:PDF Type:MF-SISO") + "This endpoint overlays an image onto a PDF file at the specified coordinates. The image can be overlaid on every page of the PDF if specified. Input:PDF/IMAGE Output:PDF Type:SISO") public ResponseEntity overlayImage(@ModelAttribute OverlayImageRequest request) { MultipartFile pdfFile = request.getFileInput(); MultipartFile imageFile = request.getImageFile(); diff --git a/src/main/java/stirling/software/SPDF/controller/api/pipeline/ApiDocService.java b/src/main/java/stirling/software/SPDF/controller/api/pipeline/ApiDocService.java index 6ed5f51d..9df659ac 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/pipeline/ApiDocService.java +++ b/src/main/java/stirling/software/SPDF/controller/api/pipeline/ApiDocService.java @@ -1,5 +1,6 @@ package stirling.software.SPDF.controller.api.pipeline; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.regex.Matcher; @@ -22,7 +23,7 @@ import jakarta.servlet.ServletContext; import stirling.software.SPDF.SPdfApplication; import stirling.software.SPDF.model.ApiEndpoint; import stirling.software.SPDF.model.Role; - +import java.util.List; @Service public class ApiDocService { @@ -38,6 +39,48 @@ public class ApiDocService { return "http://localhost:" + port + contextPath + "/v1/api-docs"; } + Map> outputToFileTypes = new HashMap<>(); + + public List getExtensionTypes(boolean output, String operationName) { + if(outputToFileTypes.size() == 0) { + outputToFileTypes.put("PDF", Arrays.asList("pdf")); + outputToFileTypes.put("IMAGE", Arrays.asList("png", "jpg", "jpeg", "gif", "webp", "bmp", "tif", "tiff", "svg", "psd", "ai", "eps")); + outputToFileTypes.put("ZIP", Arrays.asList("zip", "rar", "7z", "tar", "gz", "bz2", "xz", "lz", "lzma", "z")); + outputToFileTypes.put("WORD", Arrays.asList("doc", "docx", "odt", "rtf")); + outputToFileTypes.put("CSV", Arrays.asList("csv")); + outputToFileTypes.put("JS", Arrays.asList("js", "jsx")); + outputToFileTypes.put("HTML", Arrays.asList("html", "htm", "xhtml")); + outputToFileTypes.put("JSON", Arrays.asList("json")); + outputToFileTypes.put("TXT", Arrays.asList("txt", "text", "md", "markdown")); + outputToFileTypes.put("PPT", Arrays.asList("ppt", "pptx", "odp")); + outputToFileTypes.put("XML", Arrays.asList("xml", "xsd", "xsl")); + outputToFileTypes.put("BOOK", Arrays.asList("epub", "mobi", "azw3", "fb2", "txt", "docx")); // As noted before, "Boolean" isn't a file type but a value type. + } + + if (apiDocsJsonRootNode == null || apiDocumentation.size() == 0) { + loadApiDocumentation(); + } + if (!apiDocumentation.containsKey(operationName)) { + return null; + } + + ApiEndpoint endpoint = apiDocumentation.get(operationName); + String description = endpoint.getDescription(); + Pattern pattern = null; + if(output) { + pattern = Pattern.compile("Output:(\\w+)"); + } else { + pattern = Pattern.compile("Input:(\\w+)"); + } + Matcher matcher = pattern.matcher(description); + while (matcher.find()) { + String type = matcher.group(1).toUpperCase(); + if(outputToFileTypes.containsKey(type)) { + return outputToFileTypes.get(type); + } + } + return null; + } @Autowired(required = false) private UserServiceInterface userService; diff --git a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineProcessor.java b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineProcessor.java index 34dcb613..392bdac8 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineProcessor.java +++ b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineProcessor.java @@ -11,6 +11,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -82,15 +83,13 @@ public class PipelineProcessor { operation, isMultiInputOperation); Map parameters = pipelineOperation.getParameters(); - String inputFileExtension = ""; + List inputFileTypes = apiDocService.getExtensionTypes(false, operation); + if(inputFileTypes == null) { + inputFileTypes = new ArrayList(Arrays.asList("ALL")); + } + //List outputFileTypes = apiDocService.getExtensionTypes(true, operation); + - // TODO - // if (operationNode.has("inputFileType")) { - // inputFileExtension = operationNode.get("inputFileType").asText(); - // } else { - inputFileExtension = ".pdf"; - // } - final String finalInputFileExtension = inputFileExtension; String url = getBaseUrl() + operation; @@ -98,38 +97,40 @@ public class PipelineProcessor { if (!isMultiInputOperation) { for (Resource file : outputFiles) { boolean hasInputFileType = false; - if (file.getFilename().endsWith(inputFileExtension)) { - hasInputFileType = true; - MultiValueMap body = new LinkedMultiValueMap<>(); - body.add("fileInput", file); - - for (Entry entry : parameters.entrySet()) { - body.add(entry.getKey(), entry.getValue()); - } - - ResponseEntity response = sendWebRequest(url, body); - - // If the operation is filter and the response body is null or empty, skip - // this - // file - if (operation.startsWith("filter-") - && (response.getBody() == null || response.getBody().length == 0)) { - logger.info("Skipping file due to failing {}", operation); - continue; - } - - if (!response.getStatusCode().equals(HttpStatus.OK)) { - logPrintStream.println("Error: " + response.getBody()); - hasErrors = true; - continue; - } - processOutputFiles(operation, file.getFilename(), response, newOutputFiles); + for (String extension : inputFileTypes) { + if (extension.equals("ALL") || file.getFilename().endsWith(extension)) { + hasInputFileType = true; + MultiValueMap body = new LinkedMultiValueMap<>(); + body.add("fileInput", file); + + for (Entry entry : parameters.entrySet()) { + body.add(entry.getKey(), entry.getValue()); + } + + ResponseEntity response = sendWebRequest(url, body); + + // If the operation is filter and the response body is null or empty, skip + // this + // file + if (operation.startsWith("filter-") + && (response.getBody() == null || response.getBody().length == 0)) { + logger.info("Skipping file due to failing {}", operation); + continue; + } + + if (!response.getStatusCode().equals(HttpStatus.OK)) { + logPrintStream.println("Error: " + response.getBody()); + hasErrors = true; + continue; + } + processOutputFiles(operation, response, newOutputFiles); + } } if (!hasInputFileType) { logPrintStream.println( "No files with extension " - + inputFileExtension + + String.join(", ", inputFileTypes) + " found for operation " + operation); hasErrors = true; @@ -138,13 +139,16 @@ public class PipelineProcessor { } else { // Filter and collect all files that match the inputFileExtension - List matchingFiles = - outputFiles.stream() - .filter( - file -> - file.getFilename() - .endsWith(finalInputFileExtension)) - .collect(Collectors.toList()); + List matchingFiles; + if (inputFileTypes.contains("ALL")) { + matchingFiles = new ArrayList<>(outputFiles); + } else { + final List finalinputFileTypes = inputFileTypes; + matchingFiles = + outputFiles.stream() + .filter(file -> finalinputFileTypes.stream().anyMatch(file.getFilename()::endsWith)) + .collect(Collectors.toList()); + } // Check if there are matching files if (!matchingFiles.isEmpty()) { @@ -166,7 +170,6 @@ public class PipelineProcessor { if (response.getStatusCode().equals(HttpStatus.OK)) { processOutputFiles( operation, - matchingFiles.get(0).getFilename(), response, newOutputFiles); } else { @@ -178,7 +181,7 @@ public class PipelineProcessor { } else { logPrintStream.println( "No files with extension " - + inputFileExtension + + String.join(", ", inputFileTypes) + " found for multi-input operation " + operation); hasErrors = true; @@ -210,10 +213,30 @@ public class PipelineProcessor { // Make the request to the REST endpoint return restTemplate.exchange(url, HttpMethod.POST, entity, byte[].class); } + + public static String removeTrailingNaming(String filename) { + // Splitting filename into name and extension + int dotIndex = filename.lastIndexOf("."); + if (dotIndex == -1) { + // No extension found + return filename; + } + String name = filename.substring(0, dotIndex); + String extension = filename.substring(dotIndex); + + // Finding the last underscore + int underscoreIndex = name.lastIndexOf("_"); + if (underscoreIndex == -1) { + // No underscore found + return filename; + } + + // Removing the last part and reattaching the extension + return name.substring(0, underscoreIndex) + extension; + } private List processOutputFiles( String operation, - String fileName, ResponseEntity response, List newOutputFiles) throws IOException { @@ -227,9 +250,9 @@ public class PipelineProcessor { newFilename = extractFilename(response); } else { // Otherwise, keep the original filename. - newFilename = fileName; + newFilename = removeTrailingNaming(extractFilename(response)); } - + // Check if the response body is a zip file if (isZip(response.getBody())) { // Unzip the file and add all the files to the new output files diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/CertSignController.java b/src/main/java/stirling/software/SPDF/controller/api/security/CertSignController.java index f7c7390e..e7cccb44 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/CertSignController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/CertSignController.java @@ -74,7 +74,7 @@ public class CertSignController { @Operation( summary = "Sign PDF with a Digital Certificate", description = - "This endpoint accepts a PDF file, a digital certificate and related information to sign the PDF. It then returns the digitally signed PDF file. Input:PDF Output:PDF Type:MF-SISO") + "This endpoint accepts a PDF file, a digital certificate and related information to sign the PDF. It then returns the digitally signed PDF file. Input:PDF Output:PDF Type:SISO") public ResponseEntity signPDFWithCert(@ModelAttribute SignPDFWithCertRequest request) throws Exception { MultipartFile pdf = request.getFileInput(); diff --git a/src/main/java/stirling/software/SPDF/utils/FileToPdf.java b/src/main/java/stirling/software/SPDF/utils/FileToPdf.java index ebdbf4fa..885cb6e5 100644 --- a/src/main/java/stirling/software/SPDF/utils/FileToPdf.java +++ b/src/main/java/stirling/software/SPDF/utils/FileToPdf.java @@ -36,6 +36,10 @@ public class FileToPdf { } else { command.add("wkhtmltopdf"); command.add("--enable-local-file-access"); + command.add("--load-error-handling"); + command.add("ignore"); + command.add("--load-media-error-handling"); + command.add("ignore"); } command.add(tempInputFile.toString()); @@ -130,7 +134,6 @@ public class FileToPdf { command.add("ebook-convert"); command.add(tempInputFile.toString()); command.add(tempOutputFile.toString()); - ProcessExecutorResult returnCode = ProcessExecutor.getInstance(ProcessExecutor.Processes.CALIBRE) .runCommandWithOutputHandling(command); diff --git a/src/main/resources/static/js/languageSelection.js b/src/main/resources/static/js/languageSelection.js index a5e7be2a..432b467e 100644 --- a/src/main/resources/static/js/languageSelection.js +++ b/src/main/resources/static/js/languageSelection.js @@ -1,7 +1,20 @@ document.addEventListener('DOMContentLoaded', function() { setLanguageForDropdown('.lang_dropdown-item'); - const defaultLocale = document.documentElement.lang || 'en_GB'; - const storedLocale = localStorage.getItem('languageCode') || defaultLocale; + + // Detect the browser's preferred language + let browserLang = navigator.language || navigator.userLanguage; + // Convert to a format consistent with your language codes (e.g., en-GB, fr-FR) + browserLang = browserLang.replace('-', '_'); + + // Check if the dropdown contains the browser's language + const dropdownLangExists = document.querySelector(`.lang_dropdown-item[data-language-code="${browserLang}"]`); + + // Set the default language to browser's language or 'en_GB' if not found in the dropdown + const defaultLocale = dropdownLangExists ? browserLang : 'en_GB'; + const storedLocale = localStorage.getItem('languageCode') || defaultLocale; + + + const dropdownItems = document.querySelectorAll('.lang_dropdown-item'); for (let i = 0; i < dropdownItems.length; i++) { From 75cf3ed0c119c6d9b87d027054c4fe64427d318a Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Thu, 18 Jan 2024 23:28:39 +0000 Subject: [PATCH 2/5] Resolve wkhtml and formatting --- .../api/pipeline/ApiDocService.java | 61 ++++++----- .../api/pipeline/PipelineProcessor.java | 102 +++++++++--------- .../software/SPDF/utils/FileToPdf.java | 6 ++ 3 files changed, 93 insertions(+), 76 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/controller/api/pipeline/ApiDocService.java b/src/main/java/stirling/software/SPDF/controller/api/pipeline/ApiDocService.java index 9df659ac..25537ee2 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/pipeline/ApiDocService.java +++ b/src/main/java/stirling/software/SPDF/controller/api/pipeline/ApiDocService.java @@ -2,6 +2,7 @@ package stirling.software.SPDF.controller.api.pipeline; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -23,7 +24,7 @@ import jakarta.servlet.ServletContext; import stirling.software.SPDF.SPdfApplication; import stirling.software.SPDF.model.ApiEndpoint; import stirling.software.SPDF.model.Role; -import java.util.List; + @Service public class ApiDocService { @@ -39,25 +40,37 @@ public class ApiDocService { return "http://localhost:" + port + contextPath + "/v1/api-docs"; } + Map> outputToFileTypes = new HashMap<>(); - - public List getExtensionTypes(boolean output, String operationName) { - if(outputToFileTypes.size() == 0) { - outputToFileTypes.put("PDF", Arrays.asList("pdf")); - outputToFileTypes.put("IMAGE", Arrays.asList("png", "jpg", "jpeg", "gif", "webp", "bmp", "tif", "tiff", "svg", "psd", "ai", "eps")); - outputToFileTypes.put("ZIP", Arrays.asList("zip", "rar", "7z", "tar", "gz", "bz2", "xz", "lz", "lzma", "z")); - outputToFileTypes.put("WORD", Arrays.asList("doc", "docx", "odt", "rtf")); - outputToFileTypes.put("CSV", Arrays.asList("csv")); - outputToFileTypes.put("JS", Arrays.asList("js", "jsx")); - outputToFileTypes.put("HTML", Arrays.asList("html", "htm", "xhtml")); - outputToFileTypes.put("JSON", Arrays.asList("json")); - outputToFileTypes.put("TXT", Arrays.asList("txt", "text", "md", "markdown")); - outputToFileTypes.put("PPT", Arrays.asList("ppt", "pptx", "odp")); - outputToFileTypes.put("XML", Arrays.asList("xml", "xsd", "xsl")); - outputToFileTypes.put("BOOK", Arrays.asList("epub", "mobi", "azw3", "fb2", "txt", "docx")); // As noted before, "Boolean" isn't a file type but a value type. - } - - if (apiDocsJsonRootNode == null || apiDocumentation.size() == 0) { + + public List getExtensionTypes(boolean output, String operationName) { + if (outputToFileTypes.size() == 0) { + outputToFileTypes.put("PDF", Arrays.asList("pdf")); + outputToFileTypes.put( + "IMAGE", + Arrays.asList( + "png", "jpg", "jpeg", "gif", "webp", "bmp", "tif", "tiff", "svg", "psd", + "ai", "eps")); + outputToFileTypes.put( + "ZIP", + Arrays.asList("zip", "rar", "7z", "tar", "gz", "bz2", "xz", "lz", "lzma", "z")); + outputToFileTypes.put("WORD", Arrays.asList("doc", "docx", "odt", "rtf")); + outputToFileTypes.put("CSV", Arrays.asList("csv")); + outputToFileTypes.put("JS", Arrays.asList("js", "jsx")); + outputToFileTypes.put("HTML", Arrays.asList("html", "htm", "xhtml")); + outputToFileTypes.put("JSON", Arrays.asList("json")); + outputToFileTypes.put("TXT", Arrays.asList("txt", "text", "md", "markdown")); + outputToFileTypes.put("PPT", Arrays.asList("ppt", "pptx", "odp")); + outputToFileTypes.put("XML", Arrays.asList("xml", "xsd", "xsl")); + outputToFileTypes.put( + "BOOK", + Arrays.asList( + "epub", "mobi", "azw3", "fb2", "txt", + "docx")); // As noted before, "Boolean" isn't a file type but a value + // type. + } + + if (apiDocsJsonRootNode == null || apiDocumentation.size() == 0) { loadApiDocumentation(); } if (!apiDocumentation.containsKey(operationName)) { @@ -67,16 +80,16 @@ public class ApiDocService { ApiEndpoint endpoint = apiDocumentation.get(operationName); String description = endpoint.getDescription(); Pattern pattern = null; - if(output) { - pattern = Pattern.compile("Output:(\\w+)"); + if (output) { + pattern = Pattern.compile("Output:(\\w+)"); } else { - pattern = Pattern.compile("Input:(\\w+)"); + pattern = Pattern.compile("Input:(\\w+)"); } Matcher matcher = pattern.matcher(description); while (matcher.find()) { String type = matcher.group(1).toUpperCase(); - if(outputToFileTypes.containsKey(type)) { - return outputToFileTypes.get(type); + if (outputToFileTypes.containsKey(type)) { + return outputToFileTypes.get(type); } } return null; diff --git a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineProcessor.java b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineProcessor.java index 392bdac8..5ff6842c 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineProcessor.java +++ b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineProcessor.java @@ -84,12 +84,10 @@ public class PipelineProcessor { isMultiInputOperation); Map parameters = pipelineOperation.getParameters(); List inputFileTypes = apiDocService.getExtensionTypes(false, operation); - if(inputFileTypes == null) { - inputFileTypes = new ArrayList(Arrays.asList("ALL")); + if (inputFileTypes == null) { + inputFileTypes = new ArrayList(Arrays.asList("ALL")); } - //List outputFileTypes = apiDocService.getExtensionTypes(true, operation); - - + // List outputFileTypes = apiDocService.getExtensionTypes(true, operation); String url = getBaseUrl() + operation; @@ -98,33 +96,35 @@ public class PipelineProcessor { for (Resource file : outputFiles) { boolean hasInputFileType = false; for (String extension : inputFileTypes) { - if (extension.equals("ALL") || file.getFilename().endsWith(extension)) { - hasInputFileType = true; - MultiValueMap body = new LinkedMultiValueMap<>(); - body.add("fileInput", file); - - for (Entry entry : parameters.entrySet()) { - body.add(entry.getKey(), entry.getValue()); - } - - ResponseEntity response = sendWebRequest(url, body); - - // If the operation is filter and the response body is null or empty, skip - // this - // file - if (operation.startsWith("filter-") - && (response.getBody() == null || response.getBody().length == 0)) { - logger.info("Skipping file due to failing {}", operation); - continue; - } - - if (!response.getStatusCode().equals(HttpStatus.OK)) { - logPrintStream.println("Error: " + response.getBody()); - hasErrors = true; - continue; - } - processOutputFiles(operation, response, newOutputFiles); - } + if (extension.equals("ALL") || file.getFilename().endsWith(extension)) { + hasInputFileType = true; + MultiValueMap body = new LinkedMultiValueMap<>(); + body.add("fileInput", file); + + for (Entry entry : parameters.entrySet()) { + body.add(entry.getKey(), entry.getValue()); + } + + ResponseEntity response = sendWebRequest(url, body); + + // If the operation is filter and the response body is null or empty, + // skip + // this + // file + if (operation.startsWith("filter-") + && (response.getBody() == null + || response.getBody().length == 0)) { + logger.info("Skipping file due to failing {}", operation); + continue; + } + + if (!response.getStatusCode().equals(HttpStatus.OK)) { + logPrintStream.println("Error: " + response.getBody()); + hasErrors = true; + continue; + } + processOutputFiles(operation, response, newOutputFiles); + } } if (!hasInputFileType) { @@ -139,16 +139,19 @@ public class PipelineProcessor { } else { // Filter and collect all files that match the inputFileExtension - List matchingFiles; - if (inputFileTypes.contains("ALL")) { - matchingFiles = new ArrayList<>(outputFiles); - } else { - final List finalinputFileTypes = inputFileTypes; - matchingFiles = - outputFiles.stream() - .filter(file -> finalinputFileTypes.stream().anyMatch(file.getFilename()::endsWith)) - .collect(Collectors.toList()); - } + List matchingFiles; + if (inputFileTypes.contains("ALL")) { + matchingFiles = new ArrayList<>(outputFiles); + } else { + final List finalinputFileTypes = inputFileTypes; + matchingFiles = + outputFiles.stream() + .filter( + file -> + finalinputFileTypes.stream() + .anyMatch(file.getFilename()::endsWith)) + .collect(Collectors.toList()); + } // Check if there are matching files if (!matchingFiles.isEmpty()) { @@ -168,10 +171,7 @@ public class PipelineProcessor { // Handle the response if (response.getStatusCode().equals(HttpStatus.OK)) { - processOutputFiles( - operation, - response, - newOutputFiles); + processOutputFiles(operation, response, newOutputFiles); } else { // Log error if the response status is not OK logPrintStream.println( @@ -213,7 +213,7 @@ public class PipelineProcessor { // Make the request to the REST endpoint return restTemplate.exchange(url, HttpMethod.POST, entity, byte[].class); } - + public static String removeTrailingNaming(String filename) { // Splitting filename into name and extension int dotIndex = filename.lastIndexOf("."); @@ -236,9 +236,7 @@ public class PipelineProcessor { } private List processOutputFiles( - String operation, - ResponseEntity response, - List newOutputFiles) + String operation, ResponseEntity response, List newOutputFiles) throws IOException { // Define filename String newFilename; @@ -250,9 +248,9 @@ public class PipelineProcessor { newFilename = extractFilename(response); } else { // Otherwise, keep the original filename. - newFilename = removeTrailingNaming(extractFilename(response)); + newFilename = removeTrailingNaming(extractFilename(response)); } - + // Check if the response body is a zip file if (isZip(response.getBody())) { // Unzip the file and add all the files to the new output files diff --git a/src/main/java/stirling/software/SPDF/utils/FileToPdf.java b/src/main/java/stirling/software/SPDF/utils/FileToPdf.java index 885cb6e5..a57bfda4 100644 --- a/src/main/java/stirling/software/SPDF/utils/FileToPdf.java +++ b/src/main/java/stirling/software/SPDF/utils/FileToPdf.java @@ -63,7 +63,13 @@ public class FileToPdf { } pdfBytes = Files.readAllBytes(tempOutputFile); + } catch (IOException e) { + pdfBytes = Files.readAllBytes(tempOutputFile); + if (pdfBytes.length < 1) { + throw e; + } } finally { + // Clean up temporary files Files.delete(tempOutputFile); Files.delete(tempInputFile); From be1904749b4c8269ffbd92e0997861275884d8ce Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 28 Jan 2024 17:36:17 +0000 Subject: [PATCH 3/5] Add stamp, fix html, change accepts --- .../api/converters/ConvertHtmlToPDF.java | 7 +- .../api/converters/ConvertMarkdownToPdf.java | 2 +- .../api/misc/FakeScanControllerWIP.java | 2 +- .../controller/api/misc/StampController.java | 295 ++++++++++++++++++ .../controller/web/OtherWebController.java | 8 + .../api/converters/HTMLToPdfRequest.java | 52 +++ .../SPDF/model/api/misc/AddStampRequest.java | 68 ++++ .../software/SPDF/utils/FileToPdf.java | 62 +++- src/main/resources/messages_en_GB.properties | 38 ++- .../resources/templates/auto-split-pdf.html | 2 +- .../templates/convert/html-to-pdf.html | 67 +++- .../templates/convert/markdown-to-pdf.html | 2 +- .../resources/templates/fragments/navbar.html | 1 + src/main/resources/templates/home.html | 2 + .../templates/misc/show-javascript.html | 2 +- src/main/resources/templates/misc/stamp.html | 216 +++++++++++++ .../templates/pdf-to-single-page.html | 2 +- .../templates/security/get-info-on-pdf.html | 2 +- 18 files changed, 816 insertions(+), 14 deletions(-) create mode 100644 src/main/java/stirling/software/SPDF/controller/api/misc/StampController.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/converters/HTMLToPdfRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/misc/AddStampRequest.java create mode 100644 src/main/resources/templates/misc/stamp.html diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertHtmlToPDF.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertHtmlToPDF.java index fdcd114a..9e1d4fb9 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertHtmlToPDF.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertHtmlToPDF.java @@ -12,7 +12,7 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; -import stirling.software.SPDF.model.api.GeneralFile; +import stirling.software.SPDF.model.api.converters.HTMLToPdfRequest; import stirling.software.SPDF.utils.FileToPdf; import stirling.software.SPDF.utils.WebResponseUtils; @@ -30,7 +30,8 @@ public class ConvertHtmlToPDF { 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.") - public ResponseEntity HtmlToPdf(@ModelAttribute GeneralFile request) throws Exception { + public ResponseEntity HtmlToPdf(@ModelAttribute HTMLToPdfRequest request) + throws Exception { MultipartFile fileInput = request.getFileInput(); if (fileInput == null) { @@ -45,7 +46,7 @@ public class ConvertHtmlToPDF { } byte[] pdfBytes = FileToPdf.convertHtmlToPdf( - fileInput.getBytes(), originalFilename, htmlFormatsInstalled); + request, fileInput.getBytes(), originalFilename, htmlFormatsInstalled); String outputFilename = originalFilename.replaceFirst("[.][^.]+$", "") diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertMarkdownToPdf.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertMarkdownToPdf.java index 1b6efefb..12fc9097 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertMarkdownToPdf.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertMarkdownToPdf.java @@ -68,7 +68,7 @@ public class ConvertMarkdownToPdf { byte[] pdfBytes = FileToPdf.convertHtmlToPdf( - htmlContent.getBytes(), "converted.html", htmlFormatsInstalled); + null, htmlContent.getBytes(), "converted.html", htmlFormatsInstalled); String outputFilename = originalFilename.replaceFirst("[.][^.]+$", "") diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/FakeScanControllerWIP.java b/src/main/java/stirling/software/SPDF/controller/api/misc/FakeScanControllerWIP.java index cb8db7d3..99595049 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/FakeScanControllerWIP.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/FakeScanControllerWIP.java @@ -50,7 +50,7 @@ public class FakeScanControllerWIP { // TODO @Hidden - @PostMapping(consumes = "multipart/form-data", value = "/fakeScan") + //@PostMapping(consumes = "multipart/form-data", value = "/fakeScan") @Operation( summary = "Repair a PDF file", description = diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/StampController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/StampController.java new file mode 100644 index 00000000..718c0ddd --- /dev/null +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/StampController.java @@ -0,0 +1,295 @@ +package stirling.software.SPDF.controller.api.misc; + +import java.awt.Color; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; + +import javax.imageio.ImageIO; + +import org.apache.commons.io.IOUtils; +import org.apache.pdfbox.Loader; +import org.apache.pdfbox.pdmodel.PDDocument; +import org.apache.pdfbox.pdmodel.PDPage; +import org.apache.pdfbox.pdmodel.PDPageContentStream; +import org.apache.pdfbox.pdmodel.common.PDRectangle; +import org.apache.pdfbox.pdmodel.font.PDFont; +import org.apache.pdfbox.pdmodel.font.PDType0Font; +import org.apache.pdfbox.pdmodel.font.PDType1Font; +import org.apache.pdfbox.pdmodel.font.Standard14Fonts; +import org.apache.pdfbox.pdmodel.graphics.image.LosslessFactory; +import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject; +import org.apache.pdfbox.pdmodel.graphics.state.PDExtendedGraphicsState; +import org.apache.pdfbox.util.Matrix; +import org.springframework.core.io.ClassPathResource; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; + +import stirling.software.SPDF.model.api.misc.AddStampRequest; +import stirling.software.SPDF.utils.WebResponseUtils; + +@RestController +@RequestMapping("/api/v1/misc") +@Tag(name = "Misc", description = "Miscellaneous APIs") +public class StampController { + + @PostMapping(consumes = "multipart/form-data", value = "/add-stamp") + @Operation( + summary = "Add stamp to a PDF file", + description = + "This endpoint adds a stamp to a given PDF file. Users can specify the watermark type (text or image), rotation, opacity, width spacer, and height spacer. Input:PDF Output:PDF Type:SISO") + public ResponseEntity addStamp(@ModelAttribute AddStampRequest request) + throws IOException, Exception { + MultipartFile pdfFile = request.getFileInput(); + String watermarkType = request.getStampType(); + String watermarkText = request.getStampText(); + MultipartFile watermarkImage = request.getStampImage(); + String alphabet = request.getAlphabet(); + float fontSize = request.getFontSize(); + float rotation = request.getRotation(); + float opacity = request.getOpacity(); + int position = request.getPosition(); // Updated to use 1-9 positioning logic + float overrideX = request.getOverrideX(); // New field for X override + float overrideY = request.getOverrideY(); // New field for Y override + + String customColor = request.getCustomColor(); + float marginFactor; + switch (request.getCustomMargin().toLowerCase()) { + case "small": + marginFactor = 0.02f; + break; + case "medium": + marginFactor = 0.035f; + break; + case "large": + marginFactor = 0.05f; + break; + case "x-large": + marginFactor = 0.075f; + break; + + default: + marginFactor = 0.035f; + break; + } + + // Load the input PDF + PDDocument document = Loader.loadPDF(pdfFile.getBytes()); + + for (PDPage page : document.getPages()) { + PDPageContentStream contentStream = + new PDPageContentStream( + document, page, PDPageContentStream.AppendMode.APPEND, true, true); + + PDExtendedGraphicsState graphicsState = new PDExtendedGraphicsState(); + graphicsState.setNonStrokingAlphaConstant(opacity); + contentStream.setGraphicsStateParameters(graphicsState); + + if (watermarkType.equalsIgnoreCase("text")) { + addTextStamp( + contentStream, + watermarkText, + document, + page, + rotation, + position, + fontSize, + alphabet, + overrideX, + overrideY, + marginFactor, + customColor); + } else if (watermarkType.equalsIgnoreCase("image")) { + addImageStamp( + contentStream, + watermarkImage, + document, + page, + rotation, + position, + fontSize, + overrideX, + overrideY, + marginFactor); + } + + contentStream.close(); + } + + return WebResponseUtils.pdfDocToWebResponse( + document, + pdfFile.getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_watermarked.pdf"); + } + + private void addTextStamp( + PDPageContentStream contentStream, + String watermarkText, + PDDocument document, + PDPage page, + float rotation, + int position, // 1-9 positioning logic + float fontSize, + String alphabet, + float overrideX, // X override + float overrideY, + float marginFactor, + String colorString) // Y override + throws IOException { + String resourceDir = ""; + PDFont font = new PDType1Font(Standard14Fonts.FontName.HELVETICA); + switch (alphabet) { + case "arabic": + resourceDir = "static/fonts/NotoSansArabic-Regular.ttf"; + break; + case "japanese": + resourceDir = "static/fonts/Meiryo.ttf"; + break; + case "korean": + resourceDir = "static/fonts/malgun.ttf"; + break; + case "chinese": + resourceDir = "static/fonts/SimSun.ttf"; + break; + case "roman": + default: + resourceDir = "static/fonts/NotoSans-Regular.ttf"; + break; + } + + if (!resourceDir.equals("")) { + ClassPathResource classPathResource = new ClassPathResource(resourceDir); + String fileExtension = resourceDir.substring(resourceDir.lastIndexOf(".")); + File tempFile = File.createTempFile("NotoSansFont", fileExtension); + try (InputStream is = classPathResource.getInputStream(); + FileOutputStream os = new FileOutputStream(tempFile)) { + IOUtils.copy(is, os); + } + + font = PDType0Font.load(document, tempFile); + tempFile.deleteOnExit(); + } + + contentStream.setFont(font, fontSize); + + Color redactColor; + try { + if (!colorString.startsWith("#")) { + colorString = "#" + colorString; + } + redactColor = Color.decode(colorString); + } catch (NumberFormatException e) { + + redactColor = Color.LIGHT_GRAY; + } + + contentStream.setNonStrokingColor(redactColor); + + PDRectangle pageSize = page.getMediaBox(); + float x, y; + + if (overrideX >= 0 && overrideY >= 0) { + // Use override values if provided + x = overrideX; + y = overrideY; + } else { + x = calculatePositionX(pageSize, position, fontSize, font, fontSize, watermarkText, marginFactor); + y = calculatePositionY(pageSize, position, fontSize, marginFactor); + } + + contentStream.beginText(); + contentStream.setTextMatrix(Matrix.getRotateInstance(Math.toRadians(rotation), x, y)); + contentStream.showText(watermarkText); + contentStream.endText(); + } + + private void addImageStamp( + PDPageContentStream contentStream, + MultipartFile watermarkImage, + PDDocument document, + PDPage page, + float rotation, + int position, // 1-9 positioning logic + float fontSize, + float overrideX, + float overrideY, + float marginFactor) + throws IOException { + + // Load the watermark image + BufferedImage image = ImageIO.read(watermarkImage.getInputStream()); + + // Compute width based on original aspect ratio + float aspectRatio = (float) image.getWidth() / (float) image.getHeight(); + + // Desired physical height (in PDF points) + float desiredPhysicalHeight = fontSize; + + // Desired physical width based on the aspect ratio + float desiredPhysicalWidth = desiredPhysicalHeight * aspectRatio; + + // Convert the BufferedImage to PDImageXObject + PDImageXObject xobject = LosslessFactory.createFromImage(document, image); + + PDRectangle pageSize = page.getMediaBox(); + float x, y; + + if (overrideX >= 0 && overrideY >= 0) { + // Use override values if provided + x = overrideX; + y = overrideY; + } else { + x = calculatePositionX(pageSize, position, desiredPhysicalWidth, null, 0, null, marginFactor); + y = calculatePositionY(pageSize, position, fontSize, marginFactor); + } + + contentStream.saveGraphicsState(); + contentStream.transform(Matrix.getTranslateInstance(x, y)); + contentStream.transform(Matrix.getRotateInstance(Math.toRadians(rotation), 0, 0)); + contentStream.drawImage(xobject, 0, 0, desiredPhysicalWidth, desiredPhysicalHeight); + contentStream.restoreGraphicsState(); + } + + private float calculatePositionX( + PDRectangle pageSize, int position, float contentWidth, PDFont font, float fontSize, String text, float marginFactor) throws IOException { + float actualWidth = (text != null) ? calculateTextWidth(text, font, fontSize) : contentWidth; + switch (position % 3) { + case 1: // Left + return pageSize.getLowerLeftX() + marginFactor * pageSize.getWidth(); + case 2: // Center + return (pageSize.getWidth() - actualWidth) / 2; + case 0: // Right + return pageSize.getUpperRightX() - actualWidth - marginFactor * pageSize.getWidth(); + default: + return 0; + } + } + + private float calculateTextWidth(String text, PDFont font, float fontSize) throws IOException { + return font.getStringWidth(text) / 1000 * fontSize; + } + + + + private float calculatePositionY( + PDRectangle pageSize, int position, float height, float marginFactor) { + switch ((position - 1) / 3) { + case 0: // Top + return pageSize.getUpperRightY() - height - marginFactor * pageSize.getHeight(); + case 1: // Middle + return (pageSize.getHeight() - height) / 2; + case 2: // Bottom + return pageSize.getLowerLeftY() + marginFactor * pageSize.getHeight(); + default: + return 0; + } + } +} diff --git a/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java b/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java index b0204779..69609536 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java +++ b/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java @@ -38,6 +38,14 @@ public class OtherWebController { model.addAttribute("currentPage", "show-javascript"); return "misc/show-javascript"; } + + @GetMapping("/stamp") + @Hidden + public String stampForm(Model model) { + model.addAttribute("currentPage", "stamp"); + return "misc/stamp"; + } + @GetMapping("/add-page-numbers") @Hidden diff --git a/src/main/java/stirling/software/SPDF/model/api/converters/HTMLToPdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/converters/HTMLToPdfRequest.java new file mode 100644 index 00000000..c778c36f --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/converters/HTMLToPdfRequest.java @@ -0,0 +1,52 @@ +package stirling.software.SPDF.model.api.converters; + +import io.swagger.v3.oas.annotations.media.Schema; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +@EqualsAndHashCode(callSuper = true) +public class HTMLToPdfRequest extends PDFFile { + + @Schema( + description = "Zoom level for displaying the website. Default is '1'.", + defaultValue = "1") + private float zoom; + + @Schema(description = "Width of the page in centimeters.") + private Float pageWidth; + + @Schema(description = "Height of the page in centimeters.") + private Float pageHeight; + + @Schema(description = "Top margin of the page in millimeters.") + private Float marginTop; + + @Schema(description = "Bottom margin of the page in millimeters.") + private Float marginBottom; + + @Schema(description = "Left margin of the page in millimeters.") + private Float marginLeft; + + @Schema(description = "Right margin of the page in millimeters.") + private Float marginRight; + + @Schema( + description = "Enable or disable rendering of website background.", + allowableValues = {"Yes", "No"}) + private String printBackground; + + @Schema( + description = + "Enable or disable the default header. The default header includes the name of the page on the left and the page number on the right.", + allowableValues = {"Yes", "No"}) + private String defaultHeader; + + @Schema( + description = "Change the CSS media type of the page. Defaults to 'print'.", + allowableValues = {"none", "print", "screen"}, + defaultValue = "print") + private String cssMediaType; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/AddStampRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/AddStampRequest.java new file mode 100644 index 00000000..82296acc --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/misc/AddStampRequest.java @@ -0,0 +1,68 @@ +package stirling.software.SPDF.model.api.misc; + +import org.springframework.web.multipart.MultipartFile; + +import io.swagger.v3.oas.annotations.media.Schema; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +@EqualsAndHashCode(callSuper = true) +public class AddStampRequest extends PDFFile { + + @Schema( + description = "The stamp type (text or image)", + allowableValues = {"text", "image"}, + required = true) + private String stampType; + + @Schema(description = "The stamp text") + private String stampText; + + @Schema(description = "The stamp image") + private MultipartFile stampImage; + + @Schema( + description = "The selected alphabet", + allowableValues = {"roman", "arabic", "japanese", "korean", "chinese"}, + defaultValue = "roman") + private String alphabet = "roman"; + + @Schema(description = "The font size of the stamp text", example = "30") + private float fontSize = 30; + + @Schema(description = "The rotation of the stamp in degrees", example = "0") + private float rotation = 0; + + @Schema(description = "The opacity of the stamp (0.0 - 1.0)", example = "0.5") + private float opacity; + + @Schema( + description = + "Position for stamp placement based on a 1-9 grid (1: bottom-left, 2: bottom-center, ..., 9: top-right)", + example = "1") + private int position; + + @Schema( + description = + "Override X coordinate for stamp placement. If set, it will override the position-based calculation. Negative value means no override.", + example = "-1") + private float overrideX = -1; // Default to -1 indicating no override + + @Schema( + description = + "Override Y coordinate for stamp placement. If set, it will override the position-based calculation. Negative value means no override.", + example = "-1") + private float overrideY = -1; // Default to -1 indicating no override + + @Schema( + description = "Specifies the margin size for the stamp.", + allowableValues = {"small", "medium", "large", "x-large"}, + defaultValue = "medium") + private String customMargin = "medium"; + + @Schema(description = "The color for stamp", defaultValue = "#d3d3d3") + private String customColor = "#d3d3d3"; +} diff --git a/src/main/java/stirling/software/SPDF/utils/FileToPdf.java b/src/main/java/stirling/software/SPDF/utils/FileToPdf.java index a57bfda4..bdf3ec61 100644 --- a/src/main/java/stirling/software/SPDF/utils/FileToPdf.java +++ b/src/main/java/stirling/software/SPDF/utils/FileToPdf.java @@ -2,6 +2,7 @@ package stirling.software.SPDF.utils; import java.io.ByteArrayInputStream; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; @@ -11,12 +12,16 @@ import java.util.stream.Stream; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; +import stirling.software.SPDF.model.api.converters.HTMLToPdfRequest; import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; public class FileToPdf { public static byte[] convertHtmlToPdf( - byte[] fileBytes, String fileName, boolean htmlFormatsInstalled) + HTMLToPdfRequest request, + byte[] fileBytes, + String fileName, + boolean htmlFormatsInstalled) throws IOException, InterruptedException { Path tempOutputFile = Files.createTempFile("output_", ".pdf"); @@ -40,6 +45,61 @@ public class FileToPdf { command.add("ignore"); command.add("--load-media-error-handling"); command.add("ignore"); + command.add("--zoom"); + command.add(String.valueOf(request.getZoom())); + + // if custom zoom add zoom style direct to html + // https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4900 + if (request.getZoom() != 1.0) { + String htmlContent = new String(Files.readAllBytes(tempInputFile)); + + String zoomStyle = ""; + // Check for tag, add style tag to associated tag + if (htmlContent.contains("")) { + htmlContent = htmlContent.replace("", "" + zoomStyle); + } else if (htmlContent.contains("")) { + // If no tag, but tag exists + htmlContent = htmlContent.replace("", "" + zoomStyle); + } else { + // If neither nor tags exist + htmlContent = zoomStyle + htmlContent; + } + // rewrite new html to file + Files.write(tempInputFile, htmlContent.getBytes(StandardCharsets.UTF_8)); + } + + if (request.getPageWidth() != null) { + command.add("--page-width"); + command.add(request.getPageWidth() + "cm"); + } + + if (request.getPageHeight() != null) { + command.add("--page-height"); + command.add(request.getPageHeight() + "cm"); + } + + if (request.getMarginTop() != null) { + command.add("--margin-top"); + command.add(request.getMarginTop() + "mm"); + } + + // Repeat similar pattern for marginBottom, marginLeft, marginRight + + if ("Yes".equalsIgnoreCase(request.getPrintBackground())) { + command.add("--background"); + } else { + command.add("--no-background"); + } + + if ("Yes".equalsIgnoreCase(request.getDefaultHeader())) { + command.add("--default-header"); + } + + if ("print".equalsIgnoreCase(request.getCssMediaType())) { + command.add("--print-media-type"); + } else if ("screen".equalsIgnoreCase(request.getCssMediaType())) { + command.add("--no-print-media-type"); + } } command.add(tempInputFile.toString()); diff --git a/src/main/resources/messages_en_GB.properties b/src/main/resources/messages_en_GB.properties index c6da18c2..aeda5c47 100644 --- a/src/main/resources/messages_en_GB.properties +++ b/src/main/resources/messages_en_GB.properties @@ -44,7 +44,8 @@ blue=Blue custom=Custom... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Credentials changed! notAuthenticatedMessage=User not authenticated. userNotFoundMessage=User not found. @@ -385,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -460,8 +466,38 @@ HTMLToPDF.header=HTML To PDF HTMLToPDF.help=Accepts HTML files and ZIPs containing html/css/images etc required HTMLToPDF.submit=Convert HTMLToPDF.credit=Uses WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=Sanitize PDF sanitizePDF.header=Sanitize a PDF file diff --git a/src/main/resources/templates/auto-split-pdf.html b/src/main/resources/templates/auto-split-pdf.html index 4fd27772..bb984cc5 100644 --- a/src/main/resources/templates/auto-split-pdf.html +++ b/src/main/resources/templates/auto-split-pdf.html @@ -24,7 +24,7 @@

-
+
diff --git a/src/main/resources/templates/convert/html-to-pdf.html b/src/main/resources/templates/convert/html-to-pdf.html index ab6c5324..cbb22b99 100644 --- a/src/main/resources/templates/convert/html-to-pdf.html +++ b/src/main/resources/templates/convert/html-to-pdf.html @@ -10,10 +10,73 @@

-
+

-
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ + +
+ +
diff --git a/src/main/resources/templates/convert/markdown-to-pdf.html b/src/main/resources/templates/convert/markdown-to-pdf.html index c8193112..4606d2b5 100644 --- a/src/main/resources/templates/convert/markdown-to-pdf.html +++ b/src/main/resources/templates/convert/markdown-to-pdf.html @@ -13,7 +13,7 @@

-
+

diff --git a/src/main/resources/templates/fragments/navbar.html b/src/main/resources/templates/fragments/navbar.html index b090b08c..aec6b826 100644 --- a/src/main/resources/templates/fragments/navbar.html +++ b/src/main/resources/templates/fragments/navbar.html @@ -133,6 +133,7 @@
+
diff --git a/src/main/resources/templates/home.html b/src/main/resources/templates/home.html index 52f945eb..d42ccb4a 100644 --- a/src/main/resources/templates/home.html +++ b/src/main/resources/templates/home.html @@ -101,8 +101,10 @@
+
+
diff --git a/src/main/resources/templates/misc/show-javascript.html b/src/main/resources/templates/misc/show-javascript.html index 36f1bb80..0614a2c2 100644 --- a/src/main/resources/templates/misc/show-javascript.html +++ b/src/main/resources/templates/misc/show-javascript.html @@ -18,7 +18,7 @@
+ th:replace="~{fragments/common :: fileSelector(name='fileInput', multiple=false, remoteCall='false', accept='application/pdf')}">

diff --git a/src/main/resources/templates/misc/stamp.html b/src/main/resources/templates/misc/stamp.html new file mode 100644 index 00000000..a05e9717 --- /dev/null +++ b/src/main/resources/templates/misc/stamp.html @@ -0,0 +1,216 @@ + + + + + + + + +
+
+
+

+
+
+
+

+ +
+
+
+ + +
+ + + +
+ +
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
+
+ + + + + +
+ + +
+ +
+ + +
+ + + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ + +
+ +
+ + +
+ +
+ + +
+ + + + +
+
+
+ +
+
+
+ + diff --git a/src/main/resources/templates/pdf-to-single-page.html b/src/main/resources/templates/pdf-to-single-page.html index c8dedca5..6c26ace5 100644 --- a/src/main/resources/templates/pdf-to-single-page.html +++ b/src/main/resources/templates/pdf-to-single-page.html @@ -14,7 +14,7 @@

-
+
diff --git a/src/main/resources/templates/security/get-info-on-pdf.html b/src/main/resources/templates/security/get-info-on-pdf.html index 41ff4be7..84bf8692 100644 --- a/src/main/resources/templates/security/get-info-on-pdf.html +++ b/src/main/resources/templates/security/get-info-on-pdf.html @@ -16,7 +16,7 @@
+ th:replace="~{fragments/common :: fileSelector(name='fileInput', multiple=false, remoteCall='false', accept='application/pdf')}">

From ba4ad1aff91500578dd6f93c4b617ed473c1f468 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 28 Jan 2024 17:37:02 +0000 Subject: [PATCH 4/5] langs --- src/main/resources/messages_ar_AR.properties | 39 ++++++++++++++++++- src/main/resources/messages_bg_BG.properties | 39 ++++++++++++++++++- src/main/resources/messages_ca_CA.properties | 39 ++++++++++++++++++- src/main/resources/messages_de_DE.properties | 39 ++++++++++++++++++- src/main/resources/messages_el_GR.properties | 39 ++++++++++++++++++- src/main/resources/messages_en_US.properties | 39 ++++++++++++++++++- src/main/resources/messages_es_ES.properties | 39 ++++++++++++++++++- src/main/resources/messages_eu_ES.properties | 39 ++++++++++++++++++- src/main/resources/messages_fr_FR.properties | 39 ++++++++++++++++++- src/main/resources/messages_hi_IN.properties | 39 ++++++++++++++++++- src/main/resources/messages_hu_HU.properties | 39 ++++++++++++++++++- src/main/resources/messages_id_ID.properties | 39 ++++++++++++++++++- src/main/resources/messages_it_IT.properties | 39 ++++++++++++++++++- src/main/resources/messages_ja_JP.properties | 39 ++++++++++++++++++- src/main/resources/messages_ko_KR.properties | 39 ++++++++++++++++++- src/main/resources/messages_nl_NL.properties | 39 ++++++++++++++++++- src/main/resources/messages_pl_PL.properties | 39 ++++++++++++++++++- src/main/resources/messages_pt_BR.properties | 39 ++++++++++++++++++- src/main/resources/messages_ro_RO.properties | 39 ++++++++++++++++++- src/main/resources/messages_ru_RU.properties | 39 ++++++++++++++++++- .../resources/messages_sr-Latn-RS.properties | 39 ++++++++++++++++++- src/main/resources/messages_sv_SE.properties | 39 ++++++++++++++++++- src/main/resources/messages_tr_TR.properties | 39 ++++++++++++++++++- src/main/resources/messages_zh_CN.properties | 39 ++++++++++++++++++- src/main/resources/messages_zh_TW.properties | 39 ++++++++++++++++++- 25 files changed, 950 insertions(+), 25 deletions(-) diff --git a/src/main/resources/messages_ar_AR.properties b/src/main/resources/messages_ar_AR.properties index cac25052..f37a67a5 100644 --- a/src/main/resources/messages_ar_AR.properties +++ b/src/main/resources/messages_ar_AR.properties @@ -44,7 +44,8 @@ blue=Blue custom=Custom... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Credentials changed! notAuthenticatedMessage=User not authenticated. userNotFoundMessage=User not found. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML To PDF HTMLToPDF.help=Accepts HTML files and ZIPs containing html/css/images etc required HTMLToPDF.submit=Convert HTMLToPDF.credit=Uses WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=Sanitize PDF sanitizePDF.header=Sanitize a PDF file diff --git a/src/main/resources/messages_bg_BG.properties b/src/main/resources/messages_bg_BG.properties index e31749ca..13dce03c 100644 --- a/src/main/resources/messages_bg_BG.properties +++ b/src/main/resources/messages_bg_BG.properties @@ -44,7 +44,8 @@ blue=Синьо custom=Персонализиране... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Идентификационните данни са променени! notAuthenticatedMessage=Потребителят не е автентикиран. userNotFoundMessage=Потребителят не е намерен @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML към PDF HTMLToPDF.help=Приема HTML файлове и ZIP файлове, съдържащи html/css/изображения и т.н HTMLToPDF.submit=Преобразуване HTMLToPDF.credit=Използва WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=Дезинфектирай PDF sanitizePDF.header=Дезинфектира PDF файл diff --git a/src/main/resources/messages_ca_CA.properties b/src/main/resources/messages_ca_CA.properties index 406eee89..8e6dd4fa 100644 --- a/src/main/resources/messages_ca_CA.properties +++ b/src/main/resources/messages_ca_CA.properties @@ -44,7 +44,8 @@ blue=Blau custom=Personalitzat... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Credentials changed! notAuthenticatedMessage=User not authenticated. userNotFoundMessage=User not found. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML To PDF HTMLToPDF.help=Accepts HTML files and ZIPs containing html/css/images etc required HTMLToPDF.submit=Convert HTMLToPDF.credit=Uses WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=Sanitize PDF sanitizePDF.header=Sanitize a PDF file diff --git a/src/main/resources/messages_de_DE.properties b/src/main/resources/messages_de_DE.properties index 082918c3..cac32d58 100644 --- a/src/main/resources/messages_de_DE.properties +++ b/src/main/resources/messages_de_DE.properties @@ -44,7 +44,8 @@ blue=Blau custom=benutzerdefiniert... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Anmeldedaten geändert! notAuthenticatedMessage=Benutzer nicht authentifiziert. userNotFoundMessage=Benutzer nicht gefunden. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML zu PDF HTMLToPDF.help=Akzeptiert HTML-Dateien und ZIPs mit html/css/images etc. HTMLToPDF.submit=Konvertieren HTMLToPDF.credit=Verwendet WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=PDF Bereinigen sanitizePDF.header=PDF Bereinigen diff --git a/src/main/resources/messages_el_GR.properties b/src/main/resources/messages_el_GR.properties index 83bf96b4..2e45c141 100644 --- a/src/main/resources/messages_el_GR.properties +++ b/src/main/resources/messages_el_GR.properties @@ -44,7 +44,8 @@ blue=\u039C\u03C0\u03BB\u03AD custom=\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03B3\u03AE... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=\u03A4\u03B1 \u03B4\u03B9\u03B1\u03C0\u03B9\u03C3\u03C4\u03B5\u03C5\u03C4\u03AE\u03C1\u03B9\u03B1 \u03AD\u03C7\u03BF\u03C5\u03BD \u03B1\u03BB\u03BB\u03AC\u03BE\u03B5\u03B9! notAuthenticatedMessage=\u039F \u03C7\u03C1\u03AE\u03C3\u03C4\u03B7\u03C2 \u03B4\u03B5\u03BD \u03AD\u03C7\u03B5\u03B9 \u03B1\u03C5\u03B8\u03B5\u03BD\u03C4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03B8\u03B5\u03AF. userNotFoundMessage=\u039F \u03C7\u03C1\u03AE\u03C3\u03C4\u03B7\u03C2 \u03B4\u03B5\u03BD \u03B2\u03C1\u03AD\u03B8\u03B7\u03BA\u03B5. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML \u03C3\u03B5 PDF HTMLToPDF.help=\u0394\u03AD\u03C7\u03B5\u03C4\u03B1\u03B9 \u03B1\u03C1\u03C7\u03B5\u03AF\u03B1 \u03C4\u03CD\u03C0\u03BF\u03C5 HTML \u03BA\u03B1\u03B9 \u03C4\u03CD\u03C0\u03BF\u03C5 ZIP \u03C0\u03BF\u03C5 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03BF\u03C5\u03BD html/css/\u03B5\u03B9\u03BA\u03CC\u03BD\u03B5\u03C2 \u03BA.\u03BB\u03C0. \u03C0\u03BF\u03C5 \u03B1\u03C0\u03B1\u03B9\u03C4\u03BF\u03CD\u03BD\u03C4\u03B1\u03B9 HTMLToPDF.submit=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE HTMLToPDF.credit=\u03A7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=\u0391\u03C0\u03BF\u03BB\u03CD\u03BC\u03B1\u03BD\u03C3\u03B7 PDF sanitizePDF.header=\u0391\u03C0\u03BF\u03BB\u03CD\u03BC\u03B1\u03BD\u03C3\u03B7 \u03B5\u03BD\u03CC\u03C2 PDF \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 diff --git a/src/main/resources/messages_en_US.properties b/src/main/resources/messages_en_US.properties index d6f7ef71..58bdafda 100644 --- a/src/main/resources/messages_en_US.properties +++ b/src/main/resources/messages_en_US.properties @@ -44,7 +44,8 @@ blue=Blue custom=Custom... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Credentials changed! notAuthenticatedMessage=User not authenticated. userNotFoundMessage=User not found. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML To PDF HTMLToPDF.help=Accepts HTML files and ZIPs containing html/css/images etc required HTMLToPDF.submit=Convert HTMLToPDF.credit=Uses WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=Sanitize PDF sanitizePDF.header=Sanitize a PDF file diff --git a/src/main/resources/messages_es_ES.properties b/src/main/resources/messages_es_ES.properties index 887b14de..538cc776 100644 --- a/src/main/resources/messages_es_ES.properties +++ b/src/main/resources/messages_es_ES.properties @@ -44,7 +44,8 @@ blue=Azul custom=Personalizado... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Se cambiaron las credenciales! notAuthenticatedMessage=Usuario no autentificado. userNotFoundMessage=Usuario no encontrado. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Dividir PDF por Secciones home.split-by-sections.desc=Dividir cada página de un PDF en secciones verticales y horizontales más pequeñas split-by-sections.tags=Dividir sección, Dividir, Personalizar +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML a PDF HTMLToPDF.help=Acepta archivos HTML y ZIPs conteniendo los html/css/imágenes, etc, requeridas HTMLToPDF.submit=Convertir HTMLToPDF.credit=Utiliza WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=Desinfectar archivo PDF sanitizePDF.header=Desinfectar un archivo PDF diff --git a/src/main/resources/messages_eu_ES.properties b/src/main/resources/messages_eu_ES.properties index ef9b628a..4a3e8552 100644 --- a/src/main/resources/messages_eu_ES.properties +++ b/src/main/resources/messages_eu_ES.properties @@ -44,7 +44,8 @@ blue=Urdina custom=Pertsonalizatu... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Credentials changed! notAuthenticatedMessage=User not authenticated. userNotFoundMessage=User not found. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML bat PDF-ra HTMLToPDF.help=Html/css/images etab dituen HTML eta Zip fitxategiak onartzen ditu HTMLToPDF.submit=Bihurtu HTMLToPDF.credit=WeasyPrint darabil +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=PDF-a desinfektatu sanitizePDF.header=PDF fitxategi bat desinfektatu diff --git a/src/main/resources/messages_fr_FR.properties b/src/main/resources/messages_fr_FR.properties index 80da3038..d6462b66 100644 --- a/src/main/resources/messages_fr_FR.properties +++ b/src/main/resources/messages_fr_FR.properties @@ -44,7 +44,8 @@ blue=Bleu custom=Personnalisé\u2026 WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Les identifiants ont été mis à jour\u00a0! notAuthenticatedMessage=Utilisateur non authentifié. userNotFoundMessage=Utilisateur non trouvé. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML en PDF HTMLToPDF.help=Accepte les fichiers HTML et les ZIP contenant du HTML, du CSS, des images, etc. (requis). HTMLToPDF.submit=Convertir HTMLToPDF.credit=Utilise WeasyPrint. +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=Assainir sanitizePDF.header=Assainir diff --git a/src/main/resources/messages_hi_IN.properties b/src/main/resources/messages_hi_IN.properties index a44f3c5b..5b33891d 100644 --- a/src/main/resources/messages_hi_IN.properties +++ b/src/main/resources/messages_hi_IN.properties @@ -44,7 +44,8 @@ blue=नीला custom=कस्टम... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=क्रेडेंशियल्स बदल दी गईं! notAuthenticatedMessage=उपयोगकर्ता प्रमाणित नहीं है। userNotFoundMessage=उपयोगकर्ता नहीं मिला। @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=खंडों से पीडीएफ़ वि home.split-by-sections.desc=पीडीएफ़ के प्रत्येक पृष्ठ को छोटे से छोटे क्षैतिज और ऊर्ध्वाधर खंडों में विभाजित करें split-by-sections.tags=खंड विभाजन, विभाजित करें, अनुकूलित +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML से पीडीएफ़ HTMLToPDF.help=HTML फ़ाइलों और html/css/images आदि को आत्मसात करने वाले ZIPs को स्वीकार करता है HTMLToPDF.submit=रूपांतरित करें HTMLToPDF.credit=WeasyPrint का प्रयोग होता है +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=पीडीएफ़ को सफाई करें sanitizePDF.header=एक पीडीएफ़ फ़ाइल को सफाई करें diff --git a/src/main/resources/messages_hu_HU.properties b/src/main/resources/messages_hu_HU.properties index 7a43b8ce..c1364ce1 100644 --- a/src/main/resources/messages_hu_HU.properties +++ b/src/main/resources/messages_hu_HU.properties @@ -44,7 +44,8 @@ blue=Kék custom=Egyedi... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=A hitelek megváltoztak! notAuthenticatedMessage=Felhasználó nincs hitelesítve. userNotFoundMessage=A felhasználó nem található. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=PDF Szakaszokra osztása home.split-by-sections.desc=Minden oldal felosztása kisebb vízszintes és függőleges szakaszokra split-by-sections.tags=Szakasz elosztás, felosztás, testreszabás +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML >> PDF HTMLToPDF.help=Elfogad HTML fájlokat és ZIP-fájlokat, amelyek tartalmaznak html/css/képeket stb. HTMLToPDF.submit=Átalakítás HTMLToPDF.credit=WeasyPrint alkalmazása +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=PDF tisztítása sanitizePDF.header=PDF fájl megtisztítása diff --git a/src/main/resources/messages_id_ID.properties b/src/main/resources/messages_id_ID.properties index b3ed56a9..926dcd1b 100644 --- a/src/main/resources/messages_id_ID.properties +++ b/src/main/resources/messages_id_ID.properties @@ -44,7 +44,8 @@ blue=Biru custom=Kustom... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Kredensial berubah!! notAuthenticatedMessage=Pengguna tidak ter-autentikasi. userNotFoundMessage=Pengguna tidak ditemukan. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Membagi PDF berdasarkan Bagian home.split-by-sections.desc=Membagi setiap halaman PDF menjadi beberapa bagian horizontal dan vertikal yang lebih kecil split-by-sections.tags=Membagi Bagian, Membagi, Menyesuaikan +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML Ke PDF HTMLToPDF.help=Menerima berkas HTML dan ZIP yang berisi html / css / gambar, dll yang diperlukan HTMLToPDF.submit=Konversi HTMLToPDF.credit=Menggunakan WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=Bersihkan PDF sanitizePDF.header=Membersihkan berkas PDF diff --git a/src/main/resources/messages_it_IT.properties b/src/main/resources/messages_it_IT.properties index 7ef311ba..b9d011bf 100644 --- a/src/main/resources/messages_it_IT.properties +++ b/src/main/resources/messages_it_IT.properties @@ -44,7 +44,8 @@ blue=Blu custom=Personalizzato WorkInProgess=Lavori in corso, potrebbe non funzionare o essere difettoso, segnalare eventuali problemi! poweredBy=Alimentato da - +yes=Yes +no=No changedCredsMessage=Credenziali cambiate! notAuthenticatedMessage=Utente non autenticato. userNotFoundMessage=Utente non trovato. @@ -68,6 +69,7 @@ pipelineOptions.header=Configurazione Pipeline pipelineOptions.pipelineNameLabel=Nome della Pipeline pipelineOptions.saveSettings=Salva Impostazioni pipelineOptions.pipelineNamePrompt=Inserisci qui il nome della pipeline +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Aggiungi operazione pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Dividi PDF per sezioni home.split-by-sections.desc=Dividi ciascuna pagina di un PDF in sezioni orizzontali e verticali più piccole split-by-sections.tags=Dividi sezione, dividi, personalizza +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML a PDF HTMLToPDF.help=Accetta file HTML e ZIP contenenti html/css/immagini ecc. richiesti HTMLToPDF.submit=Converti HTMLToPDF.credit=Utilizza WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=Pulire PDF sanitizePDF.header=Pulisci un file PDF diff --git a/src/main/resources/messages_ja_JP.properties b/src/main/resources/messages_ja_JP.properties index 7ba8b206..f369807b 100644 --- a/src/main/resources/messages_ja_JP.properties +++ b/src/main/resources/messages_ja_JP.properties @@ -44,7 +44,8 @@ blue=青 custom=カスタム... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=資格情報が変更されました! notAuthenticatedMessage=ユーザーが認証されていません。 userNotFoundMessage=ユーザーが見つかりません。 @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTMLをPDFに変換 HTMLToPDF.help=HTMLファイルと必要なhtml/css/画像などを含むZIPを受け入れます HTMLToPDF.submit=変換 HTMLToPDF.credit=WeasyPrintを使用 +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=PDFをサニタイズ sanitizePDF.header=PDFファイルをサニタイズ diff --git a/src/main/resources/messages_ko_KR.properties b/src/main/resources/messages_ko_KR.properties index 0213dc79..bebdb217 100644 --- a/src/main/resources/messages_ko_KR.properties +++ b/src/main/resources/messages_ko_KR.properties @@ -44,7 +44,8 @@ blue=Blue custom=Custom... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=계정 정보 변경 성공! notAuthenticatedMessage=User not authenticated. userNotFoundMessage=사용자를 찾을 수 없습니다. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML 파일을 PDF 문서로 변환 HTMLToPDF.help=HTML 파일, 또는 html/css/이미지 등을 포함한 ZIP 파일을 받습니다. HTMLToPDF.submit=변환 HTMLToPDF.credit=이 기능은 WeasyPrint를 사용합니다. +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=PDF 정제 sanitizePDF.header=PDF 문서 정제 diff --git a/src/main/resources/messages_nl_NL.properties b/src/main/resources/messages_nl_NL.properties index bcfa528c..bac726df 100644 --- a/src/main/resources/messages_nl_NL.properties +++ b/src/main/resources/messages_nl_NL.properties @@ -44,7 +44,8 @@ blue=Blue custom=Custom... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Credentials changed! notAuthenticatedMessage=User not authenticated. userNotFoundMessage=User not found. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML naar PDF HTMLToPDF.help=Accepteert HTML-bestanden en ZIP''s die html/css/afbeeldingen etc. bevatten HTMLToPDF.submit=Converteren HTMLToPDF.credit=Gebruikt WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=PDF opschonen sanitizePDF.header=Een PDF-bestand opschonen diff --git a/src/main/resources/messages_pl_PL.properties b/src/main/resources/messages_pl_PL.properties index 5d08a346..48411999 100644 --- a/src/main/resources/messages_pl_PL.properties +++ b/src/main/resources/messages_pl_PL.properties @@ -44,7 +44,8 @@ blue=Blue custom=Custom... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Credentials changed! notAuthenticatedMessage=User not authenticated. userNotFoundMessage=User not found. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML To PDF HTMLToPDF.help=Accepts HTML files and ZIPs containing html/css/images etc required HTMLToPDF.submit=Convert HTMLToPDF.credit=Uses WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=Sanitize PDF sanitizePDF.header=Sanitize a PDF file diff --git a/src/main/resources/messages_pt_BR.properties b/src/main/resources/messages_pt_BR.properties index 5002f064..0976d83f 100644 --- a/src/main/resources/messages_pt_BR.properties +++ b/src/main/resources/messages_pt_BR.properties @@ -44,7 +44,8 @@ blue=Blue custom=Custom... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Credentials changed! notAuthenticatedMessage=User not authenticated. userNotFoundMessage=User not found. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML para PDF HTMLToPDF.help=Aceita arquivos HTML e ZIPs contendo html/css/imagens etc necessários HTMLToPDF.submit=Converter HTMLToPDF.credit=Usa o WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=Sanitizar PDF sanitizePDF.header=Sanitizar um arquivo PDF diff --git a/src/main/resources/messages_ro_RO.properties b/src/main/resources/messages_ro_RO.properties index dbbd73d2..d6f3b97a 100644 --- a/src/main/resources/messages_ro_RO.properties +++ b/src/main/resources/messages_ro_RO.properties @@ -44,7 +44,8 @@ blue=Blue custom=Custom... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Credentials changed! notAuthenticatedMessage=User not authenticated. userNotFoundMessage=User not found. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML To PDF HTMLToPDF.help=Accepts HTML files and ZIPs containing html/css/images etc required HTMLToPDF.submit=Convert HTMLToPDF.credit=Uses WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=Sanitize PDF sanitizePDF.header=Sanitize a PDF file diff --git a/src/main/resources/messages_ru_RU.properties b/src/main/resources/messages_ru_RU.properties index 1b6fa7f0..289b0fa6 100644 --- a/src/main/resources/messages_ru_RU.properties +++ b/src/main/resources/messages_ru_RU.properties @@ -44,7 +44,8 @@ blue=Blue custom=Custom... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Credentials changed! notAuthenticatedMessage=User not authenticated. userNotFoundMessage=User not found. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML в PDF HTMLToPDF.help=Принимает файлы HTML и ZIP-файлы, содержащие html/css/изображения и т. д. HTMLToPDF.submit=Конвертировать HTMLToPDF.credit=Использует WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=Дезинфицировать PDF sanitizePDF.header=Дезинфицировать PDF файл diff --git a/src/main/resources/messages_sr-Latn-RS.properties b/src/main/resources/messages_sr-Latn-RS.properties index 620e7df8..9ff6d44a 100644 --- a/src/main/resources/messages_sr-Latn-RS.properties +++ b/src/main/resources/messages_sr-Latn-RS.properties @@ -44,7 +44,8 @@ blue=Plavo custom=Prilagođeno... WorkInProgess=Radovi u toku, možda neće raditi ili će biti grešaka, molimo prijavite sve probleme ! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Podaci za prijavu uspešno promenjeni! notAuthenticatedMessage=Korisnik nije autentifikovan. userNotFoundMessage=Korisnik nije pronađen. @@ -68,6 +69,7 @@ pipelineOptions.header=Konfiguracija Pipeline-a pipelineOptions.pipelineNameLabel=Ime Pipeline-a pipelineOptions.saveSettings=Sačuvaj podešavanja pipelineOptions.pipelineNamePrompt=Unesite ime pipeline-a ovde +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Dodaj operaciju pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Preuzmi @@ -384,6 +386,11 @@ home.split-by-sections.title=Deljenje PDF-a po Odeljcima home.split-by-sections.desc=Deljenje svake stranice PDF-a na manje horizontalne i vertikalne odeljke split-by-sections.tags=Deljenje odeljaka,Deljenje,Podešavanje +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML u PDF HTMLToPDF.help=Prihvata HTML fajlove i ZIP-ove koji sadrže html/css/slike itd. potrebno HTMLToPDF.submit=Konvertuj HTMLToPDF.credit=Koristi WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=Sanitizacija PDF-a sanitizePDF.header=Sanitizacija PDF fajla diff --git a/src/main/resources/messages_sv_SE.properties b/src/main/resources/messages_sv_SE.properties index 85e2559c..85a934b2 100644 --- a/src/main/resources/messages_sv_SE.properties +++ b/src/main/resources/messages_sv_SE.properties @@ -44,7 +44,8 @@ blue=Blue custom=Custom... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Credentials changed! notAuthenticatedMessage=User not authenticated. userNotFoundMessage=User not found. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML To PDF HTMLToPDF.help=Accepts HTML files and ZIPs containing html/css/images etc required HTMLToPDF.submit=Convert HTMLToPDF.credit=Uses WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=Sanitize PDF sanitizePDF.header=Sanitize a PDF file diff --git a/src/main/resources/messages_tr_TR.properties b/src/main/resources/messages_tr_TR.properties index f3071b00..caae0867 100644 --- a/src/main/resources/messages_tr_TR.properties +++ b/src/main/resources/messages_tr_TR.properties @@ -44,7 +44,8 @@ blue=Mavi custom=Özel WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=Bilgiler değiştirildi! notAuthenticatedMessage=Kullanıcı doğrulanmadı. userNotFoundMessage=Kullanıcı bulunamadı. @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=Split PDF by Sections home.split-by-sections.desc=Divide each page of a PDF into smaller horizontal and vertical sections split-by-sections.tags=Section Split, Divide, Customize +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML'den PDF'e HTMLToPDF.help=HTML dosyalarını ve html/css/görsel vb. içeren ZIP'leri kabul eder HTMLToPDF.submit=Dönüştür HTMLToPDF.credit=WeasyPrint Kullanıyor +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=PDF'i Temizle sanitizePDF.header=PDF dosyasını temizle diff --git a/src/main/resources/messages_zh_CN.properties b/src/main/resources/messages_zh_CN.properties index 7498b0c9..46934cba 100644 --- a/src/main/resources/messages_zh_CN.properties +++ b/src/main/resources/messages_zh_CN.properties @@ -44,7 +44,8 @@ blue=Blue custom=Custom... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=凭证已更改! notAuthenticatedMessage=用户未经过身份验证。 userNotFoundMessage=未找到用户。 @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=拆分PDF成小块 home.split-by-sections.desc=将PDF的每一页分割成更小的水平和垂直的部分 split-by-sections.tags=章节拆分、分割、自定义 +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML转PDF HTMLToPDF.help=接受HTML文件和包含所需的html/css/images等的ZIP文件 HTMLToPDF.submit=转换 HTMLToPDF.credit=使用WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=清理PDF sanitizePDF.header=清理PDF文件 diff --git a/src/main/resources/messages_zh_TW.properties b/src/main/resources/messages_zh_TW.properties index b6a8811c..e2f0e4d9 100644 --- a/src/main/resources/messages_zh_TW.properties +++ b/src/main/resources/messages_zh_TW.properties @@ -44,7 +44,8 @@ blue=藍色 custom=自訂... WorkInProgess=Work in progress, May not work or be buggy, Please report any ploblems! poweredBy=Powered by - +yes=Yes +no=No changedCredsMessage=憑證已變更! notAuthenticatedMessage=使用者未認證。 userNotFoundMessage=找不到使用者。 @@ -68,6 +69,7 @@ pipelineOptions.header=Pipeline Configuration pipelineOptions.pipelineNameLabel=Pipeline Name pipelineOptions.saveSettings=Save Operation Settings pipelineOptions.pipelineNamePrompt=Enter pipeline name here +pipelineOptions.selectOperation=Select Operation pipelineOptions.addOperationButton=Add operation pipelineOptions.pipelineHeader=Pipeline: pipelineOptions.saveButton=Download @@ -384,6 +386,11 @@ home.split-by-sections.title=依區段分割 PDF home.split-by-sections.desc=將 PDF 的每一頁分割為較小的水平和垂直區段 split-by-sections.tags=區段分割, 劃分, 自訂 +home.AddStampRequest.title=Add Stamp to PDF +home.AddStampRequest.desc=Add text or add image stamps at set locations +AddStampRequest.tags=Stamp, Add image, center image, Watermark, PDF, Embed, Customize + + ########################### # # # WEB PAGES # @@ -459,8 +466,38 @@ HTMLToPDF.header=HTML 轉 PDF HTMLToPDF.help=接受 HTML 文件和包含所需 html/css/images 等的 ZIP HTMLToPDF.submit=轉換 HTMLToPDF.credit=使用 WeasyPrint +HTMLToPDF.zoom=Zoom level for displaying the website. +HTMLToPDF.pageWidth=Width of the page in centimeters. (Blank to default) +HTMLToPDF.pageHeight=Height of the page in centimeters. (Blank to default) +HTMLToPDF.marginTop=Top margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginBottom=Bottom margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginLeft=Left margin of the page in millimeters. (Blank to default) +HTMLToPDF.marginRight=Right margin of the page in millimeters. (Blank to default) +HTMLToPDF.printBackground=Render the background of websites. +HTMLToPDF.defaultHeader=Enable Default Header (Name and page number) +HTMLToPDF.cssMediaType=Change the CSS media type of the page. +HTMLToPDF.none=None +HTMLToPDF.print=Print +HTMLToPDF.screen=Screen +#AddStampRequest +AddStampRequest.header=Stamp PDF +AddStampRequest.title=Stamp PDF +AddStampRequest.stampType=Stamp Type +AddStampRequest.stampText=Stamp Text +AddStampRequest.stampImage=Stamp Image +AddStampRequest.alphabet=Alphabet +AddStampRequest.fontSize=Font/Image Size +AddStampRequest.rotation=Rotation +AddStampRequest.opacity=Opacity +AddStampRequest.position=Position +AddStampRequest.overrideX=Override X Coordinate +AddStampRequest.overrideY=Override Y Coordinate +AddStampRequest.customMargin=Custom Margin +AddStampRequest.customColor=Custom Text Color +AddStampRequest.submit=Submit + #sanitizePDF sanitizePDF.title=清理 PDF sanitizePDF.header=清理 PDF 檔案 From 89e461e4f63f19177c1c68f1b74e069cd0e01d31 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 28 Jan 2024 17:39:07 +0000 Subject: [PATCH 5/5] formats --- .../api/misc/FakeScanControllerWIP.java | 3 +- .../controller/api/misc/StampController.java | 28 +++++++++++++++---- .../api/pipeline/ApiDocService.java | 2 +- .../controller/web/OtherWebController.java | 3 +- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/FakeScanControllerWIP.java b/src/main/java/stirling/software/SPDF/controller/api/misc/FakeScanControllerWIP.java index 99595049..cf719f56 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/FakeScanControllerWIP.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/FakeScanControllerWIP.java @@ -29,7 +29,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -50,7 +49,7 @@ public class FakeScanControllerWIP { // TODO @Hidden - //@PostMapping(consumes = "multipart/form-data", value = "/fakeScan") + // @PostMapping(consumes = "multipart/form-data", value = "/fakeScan") @Operation( summary = "Repair a PDF file", description = diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/StampController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/StampController.java index 718c0ddd..0dd4200c 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/StampController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/StampController.java @@ -201,7 +201,15 @@ public class StampController { x = overrideX; y = overrideY; } else { - x = calculatePositionX(pageSize, position, fontSize, font, fontSize, watermarkText, marginFactor); + x = + calculatePositionX( + pageSize, + position, + fontSize, + font, + fontSize, + watermarkText, + marginFactor); y = calculatePositionY(pageSize, position, fontSize, marginFactor); } @@ -247,7 +255,9 @@ public class StampController { x = overrideX; y = overrideY; } else { - x = calculatePositionX(pageSize, position, desiredPhysicalWidth, null, 0, null, marginFactor); + x = + calculatePositionX( + pageSize, position, desiredPhysicalWidth, null, 0, null, marginFactor); y = calculatePositionY(pageSize, position, fontSize, marginFactor); } @@ -259,8 +269,16 @@ public class StampController { } private float calculatePositionX( - PDRectangle pageSize, int position, float contentWidth, PDFont font, float fontSize, String text, float marginFactor) throws IOException { - float actualWidth = (text != null) ? calculateTextWidth(text, font, fontSize) : contentWidth; + PDRectangle pageSize, + int position, + float contentWidth, + PDFont font, + float fontSize, + String text, + float marginFactor) + throws IOException { + float actualWidth = + (text != null) ? calculateTextWidth(text, font, fontSize) : contentWidth; switch (position % 3) { case 1: // Left return pageSize.getLowerLeftX() + marginFactor * pageSize.getWidth(); @@ -277,8 +295,6 @@ public class StampController { return font.getStringWidth(text) / 1000 * fontSize; } - - private float calculatePositionY( PDRectangle pageSize, int position, float height, float marginFactor) { switch ((position - 1) / 3) { diff --git a/src/main/java/stirling/software/SPDF/controller/api/pipeline/ApiDocService.java b/src/main/java/stirling/software/SPDF/controller/api/pipeline/ApiDocService.java index 25537ee2..27240b6f 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/pipeline/ApiDocService.java +++ b/src/main/java/stirling/software/SPDF/controller/api/pipeline/ApiDocService.java @@ -66,7 +66,7 @@ public class ApiDocService { "BOOK", Arrays.asList( "epub", "mobi", "azw3", "fb2", "txt", - "docx")); // As noted before, "Boolean" isn't a file type but a value + "docx")); // type. } diff --git a/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java b/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java index 69609536..a7c10908 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java +++ b/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java @@ -38,14 +38,13 @@ public class OtherWebController { model.addAttribute("currentPage", "show-javascript"); return "misc/show-javascript"; } - + @GetMapping("/stamp") @Hidden public String stampForm(Model model) { model.addAttribute("currentPage", "stamp"); return "misc/stamp"; } - @GetMapping("/add-page-numbers") @Hidden