From 4e06e8c0c0f1eae5393f09a4af96be1555d14d6f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Aug 2023 21:53:43 +0000 Subject: [PATCH 01/57] Bump io.spring.dependency-management from 1.1.2 to 1.1.3 Bumps [io.spring.dependency-management](https://github.com/spring-gradle-plugins/dependency-management-plugin) from 1.1.2 to 1.1.3. - [Release notes](https://github.com/spring-gradle-plugins/dependency-management-plugin/releases) - [Commits](https://github.com/spring-gradle-plugins/dependency-management-plugin/compare/v1.1.2...v1.1.3) --- updated-dependencies: - dependency-name: io.spring.dependency-management dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index c8cb5d3a..b63f3ca4 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id 'org.springframework.boot' version '3.1.2' - id 'io.spring.dependency-management' version '1.1.2' + id 'io.spring.dependency-management' version '1.1.3' id 'org.springdoc.openapi-gradle-plugin' version '1.6.0' id "io.swagger.swaggerhub" version "1.2.0" id 'edu.sc.seis.launch4j' version '3.0.3' From 42907ade21435ccd3ee55b4bcec45f605668adb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Fri, 8 Sep 2023 11:34:03 +0300 Subject: [PATCH 02/57] Update messages_ru_RU.properties Added translation --- src/main/resources/messages_ru_RU.properties | 228 +++++++++---------- 1 file changed, 114 insertions(+), 114 deletions(-) diff --git a/src/main/resources/messages_ru_RU.properties b/src/main/resources/messages_ru_RU.properties index 89be5d64..e416988a 100644 --- a/src/main/resources/messages_ru_RU.properties +++ b/src/main/resources/messages_ru_RU.properties @@ -20,7 +20,7 @@ close=Закрыть filesSelected=файлов выбрано noFavourites=Нет избранного bored=Скучно ждать? -alphabet=\u0430\u043B\u0444\u0430\u0432\u0438\u0442 +alphabet=Алфавит downloadPdf=Скачать PDF text=Текст font=Шрифт @@ -40,7 +40,7 @@ navbar.convert=Конвертировать navbar.security=Безопасность navbar.other=Другое navbar.darkmode=Темный режим -navbar.pageOps=Операции со страницей +navbar.pageOps=Операции с страницей navbar.settings=Настройки ############# @@ -187,80 +187,80 @@ home.compare.title=Сравнение home.compare.desc=Сравнивает и показывает различия между двумя PDF-документами compare.tags=differentiate,contrast,changes,analysis -home.certSign.title=Sign with Certificate -home.certSign.desc=Signs a PDF with a Certificate/Key (PEM/P12) +home.certSign.title=Подписать сертификатом +home.certSign.desc=Подписать PDF сертификатом/ключом (PEM/P12) certSign.tags=authenticate,PEM,P12,official,encrypt -home.pageLayout.title=Multi-Page Layout -home.pageLayout.desc=Merge multiple pages of a PDF document into a single page +home.pageLayout.title=Объединить страницы +home.pageLayout.desc=Объединение нескольких страниц документа PDF в одну страницу pageLayout.tags=merge,composite,single-view,organize -home.scalePages.title=Adjust page size/scale -home.scalePages.desc=Change the size/scale of page and/or its contents. +home.scalePages.title=Изменить размер/масштаб страницы +home.scalePages.desc=Изменить размер/масштаб страницы и/или ее содержимого. scalePages.tags=resize,modify,dimension,adapt -home.pipeline.title=Pipeline (Advanced) -home.pipeline.desc=Run multiple actions on PDFs by defining pipeline scripts +home.pipeline.title=Конвейер (расширенный) +home.pipeline.desc=Выполняйте несколько действий с PDF-файлами, определяя конвейерные сценарии. pipeline.tags=automate,sequence,scripted,batch-process -home.add-page-numbers.title=Add Page Numbers -home.add-page-numbers.desc=Add Page numbers throughout a document in a set location +home.add-page-numbers.title=Добавить номера страниц +home.add-page-numbers.desc=Добавляйте номера страниц по всему документу в заданном месте add-page-numbers.tags=paginate,label,organize,index -home.auto-rename.title=Auto Rename PDF File -home.auto-rename.desc=Auto renames a PDF file based on its detected header +home.auto-rename.title=Автоматическое переименование PDF-файла +home.auto-rename.desc=Автоматическое переименование файла PDF на основе его обнаруженного заголовка auto-rename.tags=auto-detect,header-based,organize,relabel -home.adjust-contrast.title=Adjust Colors/Contrast -home.adjust-contrast.desc=Adjust Contrast, Saturation and Brightness of a PDF +home.adjust-contrast.title=Настройка цветов/контрастности +home.adjust-contrast.desc=Настройка контрастность, насыщенность и яркость PDF-файла adjust-contrast.tags=color-correction,tune,modify,enhance -home.crop.title=Crop PDF -home.crop.desc=Crop a PDF to reduce its size (maintains text!) +home.crop.title=Обрезать PDF-файл +home.crop.desc=Обрезать PDF-файл, чтобы уменьшить его размер (текст сохраняется!) crop.tags=trim,shrink,edit,shape -home.autoSplitPDF.title=Auto Split Pages -home.autoSplitPDF.desc=Auto Split Scanned PDF with physical scanned page splitter QR Code +home.autoSplitPDF.title=Автоматическое разделение страниц +home.autoSplitPDF.desc=Автоматическое разделение отсканированного PDF-файла с помощью физического разделителя отсканированных страниц QR-кода autoSplitPDF.tags=QR-based,separate,scan-segment,organize -home.sanitizePdf.title=Sanitize -home.sanitizePdf.desc=Remove scripts and other elements from PDF files +home.sanitizePdf.title=Дезинфицировать +home.sanitizePdf.desc=Удаление скриптов и других элементов из PDF-файлов sanitizePdf.tags=clean,secure,safe,remove-threats -home.URLToPDF.title=URL/Website To PDF -home.URLToPDF.desc=Converts any http(s)URL to PDF +home.URLToPDF.title=URL/сайт в PDF +home.URLToPDF.desc=Конвертирует любой http(s)URL в PDF URLToPDF.tags=web-capture,save-page,web-to-doc,archive -home.HTMLToPDF.title=HTML to PDF -home.HTMLToPDF.desc=Converts any HTML file or zip to PDF +home.HTMLToPDF.title=HTML в PDF +home.HTMLToPDF.desc=Конвертирует любой HTML-файл или zip-файл в PDF. HTMLToPDF.tags=markup,web-content,transformation,convert -home.MarkdownToPDF.title=Markdown to PDF -home.MarkdownToPDF.desc=Converts any Markdown file to PDF +home.MarkdownToPDF.title=Markdown в PDF +home.MarkdownToPDF.desc=Конвертирует любой файл Markdown в PDF MarkdownToPDF.tags=markup,web-content,transformation,convert -home.getPdfInfo.title=Get ALL Info on PDF -home.getPdfInfo.desc=Grabs any and all information possible on PDFs +home.getPdfInfo.title=Получите ВСЮ информацию в формате PDF +home.getPdfInfo.desc=Собирает любую возможную информацию в PDF-файлах. getPdfInfo.tags=infomation,data,stats,statistics -home.extractPage.title=Extract page(s) -home.extractPage.desc=Extracts select pages from PDF +home.extractPage.title=Извлечь страницу(ы) +home.extractPage.desc=Извлекает выбранные страницы из PDF extractPage.tags=extract -home.PdfToSinglePage.title=PDF to Single Large Page -home.PdfToSinglePage.desc=Merges all PDF pages into one large single page +home.PdfToSinglePage.title=PDF в одну большую страницу +home.PdfToSinglePage.desc=Объединяет все страницы PDF в одну большую страницу. PdfToSinglePage.tags=single page ########################## ### TODO: Translate ### ########################## -home.showJS.title=Show Javascript -home.showJS.desc=Searches and displays any JS injected into a PDF +home.showJS.title=Показать Javascript +home.showJS.desc=Ищет и отображает любой JS, внедренный в PDF-файл. showJS.tags=JS ########################### @@ -272,112 +272,112 @@ showJS.tags=JS ########################## ### TODO: Translate ### ########################## -showJS.title=Show Javascript -showJS.header=Show Javascript -showJS.downloadJS=Download Javascript -showJS.submit=Show +showJS.title=Показать Javascript +showJS.header=Показать Javascript +showJS.downloadJS=Скачать Javascript +showJS.submit=Показать #pdfToSinglePage -pdfToSinglePage.title=PDF To Single Page -pdfToSinglePage.header=PDF To Single Page -pdfToSinglePage.submit=Convert To Single Page +pdfToSinglePage.title=PDF на одну страницу +pdfToSinglePage.header=PDF на одну страницу +pdfToSinglePage.submit=Преобразовать в одну страницу #pageExtracter -pageExtracter.title=Extract Pages -pageExtracter.header=Extract Pages -pageExtracter.submit=Extract +pageExtracter.title=Извлечь страницы +pageExtracter.header=Извлечь страницы +pageExtracter.submit=Извлечь #getPdfInfo -getPdfInfo.title=Get Info on PDF -getPdfInfo.header=Get Info on PDF -getPdfInfo.submit=Get Info -getPdfInfo.downloadJson=Download JSON +getPdfInfo.title=Получить информацию в PDF +getPdfInfo.header=Получить информацию в PDF +getPdfInfo.submit=Получить информацию +getPdfInfo.downloadJson=Скачать JSON #markdown-to-pdf -MarkdownToPDF.title=Markdown To PDF -MarkdownToPDF.header=Markdown To PDF -MarkdownToPDF.submit=Convert -MarkdownToPDF.help=Work in progress -MarkdownToPDF.credit=Uses WeasyPrint +MarkdownToPDF.title=Markdown в PDF +MarkdownToPDF.header=Markdown в PDF +MarkdownToPDF.submit=Конвертировать +MarkdownToPDF.help=Работа в процессе +MarkdownToPDF.credit=Использует WeasyPrint #url-to-pdf -URLToPDF.title=URL To PDF -URLToPDF.header=URL To PDF -URLToPDF.submit=Convert -URLToPDF.credit=Uses WeasyPrint +URLToPDF.title=URL в PDF +URLToPDF.header=URL в PDF +URLToPDF.submit=Конвертировать +URLToPDF.credit=Использует WeasyPrint #html-to-pdf -HTMLToPDF.title=HTML To PDF -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.title=HTML в PDF +HTMLToPDF.header=HTML в PDF +HTMLToPDF.help=Принимает файлы HTML и ZIP-файлы, содержащие html/css/изображения и т. д. +HTMLToPDF.submit=Конвертировать +HTMLToPDF.credit=Использует WeasyPrint #sanitizePDF -sanitizePDF.title=Sanitize PDF -sanitizePDF.header=Sanitize a PDF file -sanitizePDF.selectText.1=Remove JavaScript actions -sanitizePDF.selectText.2=Remove embedded files -sanitizePDF.selectText.3=Remove metadata -sanitizePDF.selectText.4=Remove links -sanitizePDF.selectText.5=Remove fonts -sanitizePDF.submit=Sanitize PDF +sanitizePDF.title=Дезинфицировать PDF +sanitizePDF.header=Дезинфицировать PDF файл +sanitizePDF.selectText.1=Удалить JavaScript +sanitizePDF.selectText.2=Удалить встроенные файлы +sanitizePDF.selectText.3=Удалить метаданные +sanitizePDF.selectText.4=Удалить ссылки +sanitizePDF.selectText.5=Удалить шрифты +sanitizePDF.submit=Дезинфицировать #addPageNumbers -addPageNumbers.title=Add Page Numbers -addPageNumbers.header=Add Page Numbers -addPageNumbers.selectText.1=Select PDF file: -addPageNumbers.selectText.2=Margin Size -addPageNumbers.selectText.3=Position -addPageNumbers.selectText.4=Starting Number -addPageNumbers.selectText.5=Pages to Number -addPageNumbers.selectText.6=Custom Text -addPageNumbers.submit=Add Page Numbers +addPageNumbers.title=Добавить номера страниц +addPageNumbers.header=Добавить номера страниц +addPageNumbers.selectText.1=Выберите PDF-файл: +addPageNumbers.selectText.2=Размер поля +addPageNumbers.selectText.3=Позиция +addPageNumbers.selectText.4=Стартовый номер +addPageNumbers.selectText.5=Страницы для нумерации +addPageNumbers.selectText.6=Свой текст +addPageNumbers.submit=Добавить номера страниц #auto-rename -auto-rename.title=Auto Rename -auto-rename.header=Auto Rename PDF -auto-rename.submit=Auto Rename +auto-rename.title=Автоматическое переименование +auto-rename.header=Автоматическое переименование PDF +auto-rename.submit=Автоматическое переименование #adjustContrast -adjustContrast.title=Adjust Contrast -adjustContrast.header=Adjust Contrast -adjustContrast.contrast=Contrast: -adjustContrast.brightness=Brightness: -adjustContrast.saturation=Saturation: -adjustContrast.download=Download +adjustContrast.title=Настройка контрастности +adjustContrast.header=Настройка контрастности +adjustContrast.contrast=Контраст: +adjustContrast.brightness=Яркость: +adjustContrast.saturation=Насыщенность: +adjustContrast.download=Скачать #crop -crop.title=Crop -crop.header=Crop Image -crop.submit=Submit +crop.title=Обрезать +crop.header=Обрезать изображение +crop.submit=Отправить #autoSplitPDF -autoSplitPDF.title=Auto Split PDF -autoSplitPDF.header=Auto Split PDF -autoSplitPDF.description=Print, Insert, Scan, upload, and let us auto-separate your documents. No manual work sorting needed. -autoSplitPDF.selectText.1=Print out some divider sheets from below (Black and white is fine). -autoSplitPDF.selectText.2=Scan all your documents at once by inserting the divider sheet between them. -autoSplitPDF.selectText.3=Upload the single large scanned PDF file and let Stirling PDF handle the rest. -autoSplitPDF.selectText.4=Divider pages are automatically detected and removed, guaranteeing a neat final document. -autoSplitPDF.formPrompt=Submit PDF containing Stirling-PDF Page dividers: -autoSplitPDF.duplexMode=Duplex Mode (Front and back scanning) -autoSplitPDF.dividerDownload1=Download 'Auto Splitter Divider (minimal).pdf' -autoSplitPDF.dividerDownload2=Download 'Auto Splitter Divider (with instructions).pdf' -autoSplitPDF.submit=Submit +autoSplitPDF.title=Автоматическое разделение PDF +autoSplitPDF.header=Автоматическое разделение PDF +autoSplitPDF.description=Распечатывайте, вставляйте, сканируйте, загружайте и позволяйте нам автоматически разделять ваши документы. Никакой ручной сортировки работы не требуется. +autoSplitPDF.selectText.1=Печатайте несколько раздельных листов (подойдет черно-белый вариант). +autoSplitPDF.selectText.2=Сканируйте все документы одновременно, вставив между ними разделительный лист. +autoSplitPDF.selectText.3=Загрузите один большой отсканированный PDF-файл, и пусть Stirling PDF сделает все остальное. +autoSplitPDF.selectText.4=Разделительные страницы автоматически обнаруживаются и удаляются, гарантируя аккуратный окончательный документ. +autoSplitPDF.formPrompt=Отравить PDF-файл, содержащий разделители страниц Stirling-PDF: +autoSplitPDF.duplexMode=Дуплексный режим (сканирование спереди и сзади) +autoSplitPDF.dividerDownload1=Скачать 'Auto Splitter Divider (minimal).pdf' +autoSplitPDF.dividerDownload2=Скачать 'Auto Splitter Divider (with instructions).pdf' +autoSplitPDF.submit=Отравить #pipeline @@ -385,18 +385,18 @@ pipeline.title=Pipeline #pageLayout -pageLayout.title=Multi Page Layout -pageLayout.header=Multi Page Layout -pageLayout.pagesPerSheet=Pages per sheet: -pageLayout.submit=Submit +pageLayout.title=Многостраничный макет +pageLayout.header=Многостраничный макет +pageLayout.pagesPerSheet=Страниц на одном листе: +pageLayout.submit=Отправить #scalePages -scalePages.title=Adjust page-scale -scalePages.header=Adjust page-scale -scalePages.pageSize=Size of a page of the document. -scalePages.scaleFactor=Zoom level (crop) of a page. -scalePages.submit=Submit +scalePages.title=Отрегулировать масштаб страницы +scalePages.header=Отрегулировать масштаб страницы +scalePages.pageSize=Размер страницы документа. +scalePages.scaleFactor=Уровень масштабирования (обрезки) страницы. +scalePages.submit=Отправить #certSign From b1fd798a5cbf02fd9f804103dd6a3df602477659 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sat, 9 Sep 2023 00:25:27 +0100 Subject: [PATCH 03/57] init --- build.gradle | 2 + .../SPDF/controller/api/CropController.java | 19 ++++---- .../SPDF/controller/api/MergeController.java | 19 +++----- .../api/MultiPageLayoutController.java | 11 +++-- .../api/RearrangePagesPDFController.java | 32 +++++-------- .../controller/api/RotationController.java | 12 ++--- .../controller/api/ScalePagesController.java | 14 +++--- .../controller/api/SplitPDFController.java | 31 +++--------- .../api/ToSinglePageController.java | 11 ++--- .../api/converters/ConvertEpubToPdf.java | 7 ++- .../api/converters/ConvertHtmlToPDF.java | 6 ++- .../converters/ConvertImgPDFController.java | 46 +++++++----------- .../api/converters/ConvertMarkdownToPdf.java | 7 ++- .../converters/ConvertOfficeController.java | 13 ++--- .../api/converters/ConvertPDFToOffice.java | 43 +++++++++-------- .../api/converters/ConvertPDFToPDFA.java | 9 ++-- .../api/converters/ConvertWebsiteToPDF.java | 8 ++-- .../other/ExtractImageScansController.java | 48 ++++++++----------- .../SPDF/controller/api/other/MyForm.java | 27 +++++++++++ .../api/security/CertSignController.java | 2 +- .../software/SPDF/model/SortTypes.java | 4 ++ .../software/SPDF/model/api/GeneralFile.java | 13 +++++ .../software/SPDF/model/api/ImageFile.java | 12 +++++ .../SPDF/model/api/MultiplePDFFiles.java | 11 +++++ .../software/SPDF/model/api/PDFFile.java | 11 +++++ .../SPDF/model/api/PDFWithPageNums.java | 36 ++++++++++++++ .../api/converters/ConvertToImageRequest.java | 22 +++++++++ .../api/converters/ConvertToPdfRequest.java | 21 ++++++++ .../converters/PdfToPresentationRequest.java | 13 +++++ .../api/converters/PdfToTextOrRTFRequest.java | 12 +++++ .../api/converters/PdfToWordRequest.java | 12 +++++ .../model/api/converters/UrlToPdfRequest.java | 11 +++++ .../SPDF/model/api/general/CropPdfForm.java | 26 ++++++++++ .../general/MergeMultiplePagesRequest.java | 13 +++++ .../model/api/general/MergePdfsRequest.java | 20 ++++++++ .../api/general/RearrangePagesRequest.java | 23 +++++++++ .../model/api/general/RotatePDFRequest.java | 13 +++++ .../model/api/general/ScalePagesRequest.java | 20 ++++++++ .../software/SPDF/utils/GeneralUtils.java | 3 ++ 39 files changed, 468 insertions(+), 195 deletions(-) create mode 100644 src/main/java/stirling/software/SPDF/controller/api/other/MyForm.java create mode 100644 src/main/java/stirling/software/SPDF/model/SortTypes.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/GeneralFile.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/ImageFile.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/MultiplePDFFiles.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/PDFFile.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/PDFWithPageNums.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/converters/ConvertToImageRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/converters/ConvertToPdfRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/converters/PdfToPresentationRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/converters/PdfToTextOrRTFRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/converters/PdfToWordRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/converters/UrlToPdfRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/general/CropPdfForm.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/general/MergeMultiplePagesRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/general/MergePdfsRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/general/RearrangePagesRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/general/RotatePDFRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/general/ScalePagesRequest.java diff --git a/build.gradle b/build.gradle index b628a2d4..bc62189e 100644 --- a/build.gradle +++ b/build.gradle @@ -98,6 +98,8 @@ dependencies { implementation 'com.github.vladimir-bukhtoyarov:bucket4j-core:7.6.0' developmentOnly("org.springframework.boot:spring-boot-devtools") + compileOnly 'org.projectlombok:lombok:1.18.28' + annotationProcessor 'org.projectlombok:lombok:1.18.28' } diff --git a/src/main/java/stirling/software/SPDF/controller/api/CropController.java b/src/main/java/stirling/software/SPDF/controller/api/CropController.java index 9e8cf1fe..38d68420 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/CropController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/CropController.java @@ -13,6 +13,7 @@ import org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; @@ -22,6 +23,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.general.CropPdfForm; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @@ -32,18 +34,13 @@ public class CropController { @PostMapping(value = "/crop", consumes = "multipart/form-data") @Operation(summary = "Crops a PDF document", description = "This operation takes an input PDF file and crops it according to the given coordinates. Input:PDF Output:PDF Type:SISO") - public ResponseEntity cropPdf( - @Parameter(description = "The input PDF file", required = true) @RequestParam("fileInput") MultipartFile file, - @Parameter(description = "The x-coordinate of the top-left corner of the crop area", required = true, schema = @Schema(type = "number")) @RequestParam("x") float x, - @Parameter(description = "The y-coordinate of the top-left corner of the crop area", required = true, schema = @Schema(type = "number")) @RequestParam("y") float y, - @Parameter(description = "The width of the crop area", required = true, schema = @Schema(type = "number")) @RequestParam("width") float width, - @Parameter(description = "The height of the crop area", required = true, schema = @Schema(type = "number")) @RequestParam("height") float height) + public ResponseEntity cropPdf(@ModelAttribute CropPdfForm form) throws IOException { + - -PDDocument sourceDocument = PDDocument.load(new ByteArrayInputStream(file.getBytes())); +PDDocument sourceDocument = PDDocument.load(new ByteArrayInputStream(form.getFileInput().getBytes())); PDDocument newDocument = new PDDocument(); @@ -65,7 +62,7 @@ for (int i = 0; i < totalPages; i++) { contentStream.saveGraphicsState(); // Define the crop area - contentStream.addRect(x, y, width, height); + contentStream.addRect(form.getX(), form.getY(), form.getWidth(), form.getHeight()); contentStream.clip(); // Draw the entire formXObject @@ -76,7 +73,7 @@ for (int i = 0; i < totalPages; i++) { contentStream.close(); // Now, set the new page's media box to the cropped size - newPage.setMediaBox(new PDRectangle(x, y, width, height)); + newPage.setMediaBox(new PDRectangle(form.getX(), form.getY(), form.getWidth(), form.getHeight())); } ByteArrayOutputStream baos = new ByteArrayOutputStream(); @@ -85,7 +82,7 @@ newDocument.close(); sourceDocument.close(); byte[] pdfContent = baos.toByteArray(); -return WebResponseUtils.bytesToWebResponse(pdfContent, file.getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_cropped.pdf"); +return WebResponseUtils.bytesToWebResponse(pdfContent, form.getFileInput().getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_cropped.pdf"); } } diff --git a/src/main/java/stirling/software/SPDF/controller/api/MergeController.java b/src/main/java/stirling/software/SPDF/controller/api/MergeController.java index e51db38e..03bf4066 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/MergeController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/MergeController.java @@ -15,6 +15,7 @@ import org.apache.pdfbox.pdmodel.PDPage; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -25,6 +26,8 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.general.CropPdfForm; +import stirling.software.SPDF.model.api.general.MergePdfsRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @@ -88,20 +91,10 @@ private Comparator getSortComparator(String sortType) { @PostMapping(consumes = "multipart/form-data", value = "/merge-pdfs") @Operation(summary = "Merge multiple PDF files into one", description = "This endpoint merges multiple PDF files into a single PDF file. The merged file will contain all pages from the input files in the order they were provided. Input:PDF Output:PDF Type:MISO") -public ResponseEntity mergePdfs( - @RequestPart(required = true, value = "fileInput") MultipartFile[] files, - @RequestParam(value = "sortType", defaultValue = "orderProvided") - @Parameter(schema = @Schema(description = "The type of sorting to be applied on the input files before merging.", - allowableValues = { - "orderProvided", - "byFileName", - "byDateModified", - "byDateCreated", - "byPDFTitle" - })) - String sortType) throws IOException { +public ResponseEntity mergePdfs(@ModelAttribute MergePdfsRequest form) throws IOException { - Arrays.sort(files, getSortComparator(sortType)); + MultipartFile[] files = form.getFileInput(); + Arrays.sort(files, getSortComparator(form.getSortType())); List documents = new ArrayList<>(); for (MultipartFile file : files) { diff --git a/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java b/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java index 738542a0..12c262cd 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java @@ -14,6 +14,7 @@ import org.apache.pdfbox.util.Matrix; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; @@ -23,6 +24,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.general.MergeMultiplePagesRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @@ -36,12 +38,11 @@ public class MultiPageLayoutController { summary = "Merge multiple pages of a PDF document into a single page", description = "This operation takes an input PDF file and the number of pages to merge into a single sheet in the output PDF file. Input:PDF Output:PDF Type:SISO" ) - public ResponseEntity mergeMultiplePagesIntoOne( - @Parameter(description = "The input PDF file", required = true) @RequestParam("fileInput") MultipartFile file, - @Parameter(description = "The number of pages to fit onto a single sheet in the output PDF. Acceptable values are 2, 3, 4, 9, 16.", required = true, schema = @Schema(type = "integer", allowableValues = { - "2", "3", "4", "9", "16" })) @RequestParam("pagesPerSheet") int pagesPerSheet) + public ResponseEntity mergeMultiplePagesIntoOne(@ModelAttribute MergeMultiplePagesRequest request) throws IOException { - + + int pagesPerSheet = request.getPagesPerSheet(); + MultipartFile file = request.getFileInput(); if (pagesPerSheet != 2 && pagesPerSheet != 3 && pagesPerSheet != (int) Math.sqrt(pagesPerSheet) * Math.sqrt(pagesPerSheet)) { throw new IllegalArgumentException("pagesPerSheet must be 2, 3 or a perfect square"); } diff --git a/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java b/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java index 78df1f41..294df38d 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java @@ -9,6 +9,7 @@ import org.apache.pdfbox.pdmodel.PDPage; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -21,7 +22,8 @@ import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.utils.GeneralUtils; import stirling.software.SPDF.utils.WebResponseUtils; - +import stirling.software.SPDF.model.SortTypes; +import stirling.software.SPDF.model.api.general.RearrangePagesRequest; @RestController @Tag(name = "General", description = "General APIs") public class RearrangePagesPDFController { @@ -51,9 +53,7 @@ public class RearrangePagesPDFController { } - private enum CustomMode { - REVERSE_ORDER, DUPLEX_SORT, BOOKLET_SORT, SIDE_STITCH_BOOKLET_SORT, ODD_EVEN_SPLIT, REMOVE_FIRST, REMOVE_LAST, REMOVE_FIRST_AND_LAST, - } + private List removeFirst(int totalPages) { if (totalPages <= 1) @@ -137,9 +137,9 @@ public class RearrangePagesPDFController { return newPageOrder; } - private List processCustomMode(String customMode, int totalPages) { + private List processSortTypes(String sortTypes, int totalPages) { try { - CustomMode mode = CustomMode.valueOf(customMode.toUpperCase()); + SortTypes mode = SortTypes.valueOf(sortTypes.toUpperCase()); switch (mode) { case REVERSE_ORDER: return reverseOrder(totalPages); @@ -168,16 +168,10 @@ public class RearrangePagesPDFController { @PostMapping(consumes = "multipart/form-data", value = "/rearrange-pages") @Operation(summary = "Rearrange pages in a PDF file", description = "This endpoint rearranges pages in a given PDF file based on the specified page order or custom mode. Users can provide a page order as a comma-separated list of page numbers or page ranges, or a custom mode. Input:PDF Output:PDF") - public ResponseEntity rearrangePages( - @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file to rearrange pages") MultipartFile pdfFile, - @RequestParam(required = false, value = "pageOrder") @Parameter(description = "The new page order as a comma-separated list of page numbers, page ranges (e.g., '1,3,5-7'), or functions in the format 'an+b' where 'a' is the multiplier of the page number 'n', and 'b' is a constant (e.g., '2n+1', '3n', '6n-5')") String pageOrder, - @RequestParam(required = false, value = "customMode") @Parameter(schema = @Schema(implementation = CustomMode.class, description = "The custom mode for page rearrangement. " - + "Valid values are:\n" + "REVERSE_ORDER: Reverses the order of all pages.\n" - + "DUPLEX_SORT: Sorts pages as if all fronts were scanned then all backs in reverse (1, n, 2, n-1, ...). " - + "BOOKLET_SORT: Arranges pages for booklet printing (last, first, second, second last, ...).\n" - + "ODD_EVEN_SPLIT: Splits and arranges pages into odd and even numbered pages.\n" - + "REMOVE_FIRST: Removes the first page.\n" + "REMOVE_LAST: Removes the last page.\n" - + "REMOVE_FIRST_AND_LAST: Removes both the first and the last pages.\n")) String customMode) { + public ResponseEntity rearrangePages(@ModelAttribute RearrangePagesRequest request) throws IOException { + MultipartFile pdfFile = request.getFileInput(); + String pageOrder = request.getPageNumbers(); + String sortType = request.getCustomMode(); try { // Load the input PDF PDDocument document = PDDocument.load(pdfFile.getInputStream()); @@ -186,10 +180,10 @@ public class RearrangePagesPDFController { String[] pageOrderArr = pageOrder != null ? pageOrder.split(",") : new String[0]; int totalPages = document.getNumberOfPages(); System.out.println("pageOrder=" + pageOrder); - System.out.println("customMode length =" + customMode.length()); + System.out.println("SortTypes length =" + sortType.length()); List newPageOrder; - if (customMode != null && customMode.length() > 0) { - newPageOrder = processCustomMode(customMode, totalPages); + if (sortType != null && sortType.length() > 0) { + newPageOrder = processSortTypes(sortType, totalPages); } else { newPageOrder = GeneralUtils.parsePageList(pageOrderArr, totalPages); } diff --git a/src/main/java/stirling/software/SPDF/controller/api/RotationController.java b/src/main/java/stirling/software/SPDF/controller/api/RotationController.java index 916d2afb..ef32df4e 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/RotationController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/RotationController.java @@ -8,6 +8,7 @@ import org.apache.pdfbox.pdmodel.PDPageTree; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -17,6 +18,7 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.general.RotatePDFRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @@ -31,13 +33,9 @@ public class RotationController { description = "This endpoint rotates a given PDF file by a specified angle. The angle must be a multiple of 90. Input:PDF Output:PDF Type:SISO" ) public ResponseEntity rotatePDF( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The PDF file to be rotated", required = true) - MultipartFile pdfFile, - @RequestParam("angle") - @Parameter(description = "The angle by which to rotate the PDF file. This should be a multiple of 90.", example = "90", required = true) - Integer angle) throws IOException { - + @ModelAttribute RotatePDFRequest request) throws IOException { + MultipartFile pdfFile = request.getFileInput(); + Integer angle = request.getAngle(); // Load the PDF document PDDocument document = PDDocument.load(pdfFile.getBytes()); diff --git a/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java b/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java index 2f1cde7d..2dcb26af 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java @@ -15,6 +15,7 @@ import org.apache.pdfbox.util.Matrix; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; @@ -24,6 +25,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.general.ScalePagesRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @Tag(name = "General", description = "General APIs") @@ -33,14 +35,10 @@ public class ScalePagesController { @PostMapping(value = "/scale-pages", consumes = "multipart/form-data") @Operation(summary = "Change the size of a PDF page/document", description = "This operation takes an input PDF file and the size to scale the pages to in the output PDF file. Input:PDF Output:PDF Type:SISO") - public ResponseEntity scalePages( - @Parameter(description = "The input PDF file", required = true) @RequestParam("fileInput") MultipartFile file, - @Parameter(description = "The scale of pages in the output PDF. Acceptable values are A0-A10, B0-B9, LETTER, TABLOID, LEDGER, LEGAL, EXECUTIVE.", required = true, schema = @Schema(type = "string", allowableValues = { - "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9", "A10", "B0", "B1", "B2", "B3", "B4", - "B5", "B6", "B7", "B8", "B9", "LETTER", "TABLOID", "LEDGER", "LEGAL", - "EXECUTIVE" })) @RequestParam("pageSize") String targetPDRectangle, - @Parameter(description = "The scale of the content on the pages of the output PDF. Acceptable values are floats.", required = true, schema = @Schema(type = "integer")) @RequestParam("scaleFactor") float scaleFactor) - throws IOException { + public ResponseEntity scalePages(@ModelAttribute ScalePagesRequest request) throws IOException { + MultipartFile file = request.getFileInput(); + String targetPDRectangle = request.getTargetPDRectangle(); + float scaleFactor = request.getScaleFactor(); Map sizeMap = new HashMap<>(); // Add A0 - A10 diff --git a/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java b/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java index abc201ab..fe3a1cc5 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java @@ -17,6 +17,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.MediaType; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -26,6 +27,7 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.PDFWithPageNums; import stirling.software.SPDF.utils.GeneralUtils; import stirling.software.SPDF.utils.WebResponseUtils; @@ -38,35 +40,14 @@ public class SplitPDFController { @PostMapping(consumes = "multipart/form-data", value = "/split-pages") @Operation(summary = "Split a PDF file into separate documents", description = "This endpoint splits a given PDF file into separate documents based on the specified page numbers or ranges. Users can specify pages using individual numbers, ranges, or 'all' for every page. Input:PDF Output:PDF Type:SIMO") - public ResponseEntity splitPdf( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The input PDF file to be split") - MultipartFile file, - @RequestParam("pages") - @Parameter(description = "The pages to be included in separate documents. Specify individual page numbers (e.g., '1,3,5'), ranges (e.g., '1-3,5-7'), or 'all' for every page.") - String pages) throws IOException { - // parse user input - + public ResponseEntity splitPdf(@ModelAttribute PDFWithPageNums request) throws IOException { + MultipartFile file = request.getFileInput(); + String pages = request.getPageNumbers(); // open the pdf document InputStream inputStream = file.getInputStream(); PDDocument document = PDDocument.load(inputStream); - List pageNumbers = new ArrayList<>(); - pages = pages.replaceAll("\\s+", ""); // remove whitespaces - if (pages.toLowerCase().equals("all")) { - for (int i = 0; i < document.getNumberOfPages(); i++) { - pageNumbers.add(i); - } - } else { - String[] splitPoints = pages.split(","); - for (String splitPoint : splitPoints) { - List orderedPages = GeneralUtils.parsePageList(new String[] {splitPoint}, document.getNumberOfPages()); - pageNumbers.addAll(orderedPages); - } - // Add the last page as a split point - pageNumbers.add(document.getNumberOfPages() - 1); - } - + List pageNumbers = request.getPageNumbersList(document); logger.info("Splitting PDF into pages: {}", pageNumbers.stream().map(String::valueOf).collect(Collectors.joining(","))); // split the document diff --git a/src/main/java/stirling/software/SPDF/controller/api/ToSinglePageController.java b/src/main/java/stirling/software/SPDF/controller/api/ToSinglePageController.java index e46cb55a..ea64d55b 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/ToSinglePageController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/ToSinglePageController.java @@ -13,6 +13,7 @@ import org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -21,6 +22,7 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @Tag(name = "General", description = "General APIs") @@ -34,13 +36,10 @@ public class ToSinglePageController { summary = "Convert a multi-page PDF into a single long page PDF", description = "This endpoint converts a multi-page PDF document into a single paged PDF document. The width of the single page will be same as the input's width, but the height will be the sum of all the pages' heights. Input:PDF Output:PDF Type:SISO" ) - public ResponseEntity pdfToSinglePage( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The input multi-page PDF file to be converted into a single page", required = true) - MultipartFile file) throws IOException { + public ResponseEntity pdfToSinglePage(@ModelAttribute PDFFile request) throws IOException { // Load the source document - PDDocument sourceDocument = PDDocument.load(file.getInputStream()); + PDDocument sourceDocument = PDDocument.load(request.getFileInput().getInputStream()); // Calculate total height and max width float totalHeight = 0; @@ -79,7 +78,7 @@ public class ToSinglePageController { sourceDocument.close(); byte[] result = baos.toByteArray(); - return WebResponseUtils.bytesToWebResponse(result, file.getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_singlePage.pdf"); + return WebResponseUtils.bytesToWebResponse(result, request.getFileInput().getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_singlePage.pdf"); diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertEpubToPdf.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertEpubToPdf.java index 21f4612b..77262cce 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertEpubToPdf.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertEpubToPdf.java @@ -14,6 +14,7 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -26,6 +27,8 @@ import org.xml.sax.InputSource; import io.swagger.v3.oas.annotations.Hidden; 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.PDFFile; import stirling.software.SPDF.utils.FileToPdf; import stirling.software.SPDF.utils.WebResponseUtils; @@ -40,9 +43,9 @@ public class ConvertEpubToPdf { description = "This endpoint takes an EPUB file input and converts it to a single PDF." ) public ResponseEntity epubToSinglePdf( - @RequestPart(required = true, value = "fileInput") MultipartFile fileInput) + @ModelAttribute GeneralFile request) throws Exception { - + MultipartFile fileInput = request.getFileInput(); if (fileInput == null) { throw new IllegalArgumentException("Please provide an EPUB file for conversion."); } 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 762cbe6b..d9308d09 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 @@ -3,6 +3,7 @@ package stirling.software.SPDF.controller.api.converters; import java.io.IOException; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -10,6 +11,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.utils.FileToPdf; import stirling.software.SPDF.utils.WebResponseUtils; @@ -24,7 +26,9 @@ public class ConvertHtmlToPDF { description = "This endpoint takes an HTML or ZIP file input and converts it to a PDF format." ) public ResponseEntity HtmlToPdf( - @RequestPart(required = true, value = "fileInput") MultipartFile fileInput) throws IOException, InterruptedException { + @ModelAttribute GeneralFile request) + throws Exception { + MultipartFile fileInput = request.getFileInput(); if (fileInput == null) { throw new IllegalArgumentException("Please provide an HTML or ZIP file for conversion."); 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 d4964196..5a4dab2c 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 @@ -11,6 +11,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -21,6 +22,8 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.converters.ConvertToImageRequest; +import stirling.software.SPDF.model.api.converters.ConvertToPdfRequest; import stirling.software.SPDF.utils.PdfUtils; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @@ -32,23 +35,13 @@ public class ConvertImgPDFController { @PostMapping(consumes = "multipart/form-data", value = "/pdf-to-img") @Operation(summary = "Convert PDF to image(s)", description = "This endpoint converts a PDF file to image(s) with the specified image format, color type, and DPI. Users can choose to get a single image or multiple images. Input:PDF Output:Image Type:SI-Conditional") - public ResponseEntity convertToImage( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The input PDF file to be converted") - MultipartFile file, - @RequestParam("imageFormat") - @Parameter(description = "The output image format", schema = @Schema(allowableValues = {"png", "jpeg", "jpg", "gif"})) - String imageFormat, - @RequestParam("singleOrMultiple") - @Parameter(description = "Choose between a single image containing all pages or separate images for each page", schema = @Schema(allowableValues = {"single", "multiple"})) - String singleOrMultiple, - @RequestParam("colorType") - @Parameter(description = "The color type of the output image(s)", schema = @Schema(allowableValues = {"color", "greyscale", "blackwhite"})) - String colorType, - @RequestParam("dpi") - @Parameter(description = "The DPI (dots per inch) for the output image(s)") - String dpi) throws IOException { - + public ResponseEntity convertToImage(@ModelAttribute ConvertToImageRequest request) throws IOException { + MultipartFile file = request.getFileInput(); + String imageFormat = request.getImageFormat(); + String singleOrMultiple = request.getSingleOrMultiple(); + String colorType = request.getColorType(); + String dpi = request.getDpi(); + byte[] pdfBytes = file.getBytes(); ImageType colorTypeResult = ImageType.RGB; if ("greyscale".equals(colorType)) { @@ -86,19 +79,12 @@ public class ConvertImgPDFController { @PostMapping(consumes = "multipart/form-data", value = "/img-to-pdf") @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?") - public ResponseEntity convertToPdf( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The input images to be converted to a PDF file") - MultipartFile[] file, - @RequestParam(defaultValue = "false", name = "stretchToFit") - @Parameter(description = "Whether to stretch the images to fit the PDF page or maintain the aspect ratio", example = "false") - boolean stretchToFit, - @RequestParam("colorType") - @Parameter(description = "The color type of the output image(s)", schema = @Schema(allowableValues = {"color", "greyscale", "blackwhite"})) - String colorType, - @RequestParam(defaultValue = "false", name = "autoRotate") - @Parameter(description = "Whether to automatically rotate the images to better fit the PDF page", example = "true") - boolean autoRotate) throws IOException { + public ResponseEntity convertToPdf(@ModelAttribute ConvertToPdfRequest request) throws IOException { + MultipartFile[] file = request.getFileInput(); + boolean stretchToFit = request.isStretchToFit(); + String colorType = request.getColorType(); + boolean autoRotate = request.isAutoRotate(); + // Convert the file to PDF and get the resulting bytes byte[] bytes = PdfUtils.imageToPdf(file, stretchToFit, autoRotate, colorType); return WebResponseUtils.bytesToWebResponse(bytes, file[0].getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_converted.pdf"); 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 c1bc1b73..02ff1e27 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 @@ -6,6 +6,7 @@ import org.commonmark.node.Node; import org.commonmark.parser.Parser; import org.commonmark.renderer.html.HtmlRenderer; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -13,6 +14,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.utils.FileToPdf; import stirling.software.SPDF.utils.WebResponseUtils; @@ -26,8 +28,9 @@ public class ConvertMarkdownToPdf { description = "This endpoint takes a Markdown file input, converts it to HTML, and then to PDF format." ) public ResponseEntity markdownToPdf( - @RequestPart(required = true, value = "fileInput") MultipartFile fileInput) - throws IOException, InterruptedException { + @ModelAttribute GeneralFile request) + throws Exception { + MultipartFile fileInput = request.getFileInput(); if (fileInput == null) { throw new IllegalArgumentException("Please provide a Markdown file for conversion."); diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertOfficeController.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertOfficeController.java index 3b9f278f..9ee5cdd5 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertOfficeController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertOfficeController.java @@ -10,6 +10,7 @@ import java.util.List; import org.apache.commons.io.FilenameUtils; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -18,6 +19,7 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.GeneralFile; import stirling.software.SPDF.utils.ProcessExecutor; import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; import stirling.software.SPDF.utils.WebResponseUtils; @@ -63,14 +65,9 @@ public class ConvertOfficeController { summary = "Convert a file to a PDF using LibreOffice", description = "This endpoint converts a given file to a PDF using LibreOffice API Input:Any Output:PDF Type:SISO" ) - public ResponseEntity processFileToPDF( - @RequestPart(required = true, value = "fileInput") - @Parameter( - description = "The input file to be converted to a PDF file using LibreOffice", - required = true - ) - MultipartFile inputFile - ) throws IOException, InterruptedException { + public ResponseEntity processFileToPDF(@ModelAttribute GeneralFile request) + throws Exception { + MultipartFile inputFile = request.getFileInput(); // unused but can start server instance if startup time is to long // LibreOfficeListener.getInstance().start(); diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToOffice.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToOffice.java index 7c99ee4d..b61549ff 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToOffice.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToOffice.java @@ -3,6 +3,7 @@ package stirling.software.SPDF.controller.api.converters; import java.io.IOException; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -13,6 +14,11 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.GeneralFile; +import stirling.software.SPDF.model.api.PDFFile; +import stirling.software.SPDF.model.api.converters.PdfToPresentationRequest; +import stirling.software.SPDF.model.api.converters.PdfToTextOrRTFRequest; +import stirling.software.SPDF.model.api.converters.PdfToWordRequest; import stirling.software.SPDF.utils.PDFToFile; @RestController @@ -21,51 +27,46 @@ public class ConvertPDFToOffice { @PostMapping(consumes = "multipart/form-data", value = "/pdf-to-html") @Operation(summary = "Convert PDF to HTML", description = "This endpoint converts a PDF file to HTML format. Input:PDF Output:HTML Type:SISO") - public ResponseEntity processPdfToHTML( - @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file to be converted to HTML format", required = true) MultipartFile inputFile) - throws IOException, InterruptedException { + public ResponseEntity processPdfToHTML(@ModelAttribute PDFFile request) + throws Exception { + MultipartFile inputFile = request.getFileInput(); PDFToFile pdfToFile = new PDFToFile(); return pdfToFile.processPdfToOfficeFormat(inputFile, "html", "writer_pdf_import"); } @PostMapping(consumes = "multipart/form-data", value = "/pdf-to-presentation") @Operation(summary = "Convert PDF to Presentation format", description = "This endpoint converts a given PDF file to a Presentation format. Input:PDF Output:PPT Type:SISO") - public ResponseEntity processPdfToPresentation( - @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file") MultipartFile inputFile, - @RequestParam("outputFormat") @Parameter(description = "The output Presentation format", schema = @Schema(allowableValues = { - "ppt", "pptx", "odp" })) String outputFormat) - throws IOException, InterruptedException { + public ResponseEntity processPdfToPresentation(@ModelAttribute PdfToPresentationRequest request) throws IOException, InterruptedException { + MultipartFile inputFile = request.getFileInput(); + String outputFormat = request.getOutputFormat(); PDFToFile pdfToFile = new PDFToFile(); return pdfToFile.processPdfToOfficeFormat(inputFile, outputFormat, "impress_pdf_import"); } @PostMapping(consumes = "multipart/form-data", value = "/pdf-to-text") @Operation(summary = "Convert PDF to Text or RTF format", description = "This endpoint converts a given PDF file to Text or RTF format. Input:PDF Output:TXT Type:SISO") - public ResponseEntity processPdfToRTForTXT( - @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file") MultipartFile inputFile, - @RequestParam("outputFormat") @Parameter(description = "The output Text or RTF format", schema = @Schema(allowableValues = { - "rtf", "txt:Text" })) String outputFormat) - throws IOException, InterruptedException { + public ResponseEntity processPdfToRTForTXT(@ModelAttribute PdfToTextOrRTFRequest request) throws IOException, InterruptedException { + MultipartFile inputFile = request.getFileInput(); + String outputFormat = request.getOutputFormat(); + PDFToFile pdfToFile = new PDFToFile(); return pdfToFile.processPdfToOfficeFormat(inputFile, outputFormat, "writer_pdf_import"); } @PostMapping(consumes = "multipart/form-data", value = "/pdf-to-word") @Operation(summary = "Convert PDF to Word document", description = "This endpoint converts a given PDF file to a Word document format. Input:PDF Output:WORD Type:SISO") - public ResponseEntity processPdfToWord( - @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file") MultipartFile inputFile, - @RequestParam("outputFormat") @Parameter(description = "The output Word document format", schema = @Schema(allowableValues = { - "doc", "docx", "odt" })) String outputFormat) - throws IOException, InterruptedException { + public ResponseEntity processPdfToWord(@ModelAttribute PdfToWordRequest request) throws IOException, InterruptedException { + MultipartFile inputFile = request.getFileInput(); + String outputFormat = request.getOutputFormat(); PDFToFile pdfToFile = new PDFToFile(); return pdfToFile.processPdfToOfficeFormat(inputFile, outputFormat, "writer_pdf_import"); } @PostMapping(consumes = "multipart/form-data", value = "/pdf-to-xml") @Operation(summary = "Convert PDF to XML", description = "This endpoint converts a PDF file to an XML file. Input:PDF Output:XML Type:SISO") - public ResponseEntity processPdfToXML( - @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file to be converted to an XML file", required = true) MultipartFile inputFile) - throws IOException, InterruptedException { + public ResponseEntity processPdfToXML(@ModelAttribute PDFFile request) + throws Exception { + MultipartFile inputFile = request.getFileInput(); PDFToFile pdfToFile = new PDFToFile(); return pdfToFile.processPdfToOfficeFormat(inputFile, "xml", "writer_pdf_import"); diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToPDFA.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToPDFA.java index 6a99090b..ca83d4ed 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToPDFA.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToPDFA.java @@ -7,6 +7,7 @@ import java.util.ArrayList; import java.util.List; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -15,6 +16,7 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.utils.ProcessExecutor; import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; import stirling.software.SPDF.utils.WebResponseUtils; @@ -28,10 +30,9 @@ public class ConvertPDFToPDFA { summary = "Convert a PDF to a PDF/A", description = "This endpoint converts a PDF file to a PDF/A file. PDF/A is a format designed for long-term archiving of digital documents. Input:PDF Output:PDF Type:SISO" ) - public ResponseEntity pdfToPdfA( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The input PDF file to be converted to a PDF/A file", required = true) - MultipartFile inputFile) throws IOException, InterruptedException { + public ResponseEntity pdfToPdfA(@ModelAttribute PDFFile request) + throws Exception { + MultipartFile inputFile = request.getFileInput(); // Save the uploaded file to a temporary location Path tempInputFile = Files.createTempFile("input_", ".pdf"); diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java index 2268ead5..3d4fd368 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java @@ -7,6 +7,7 @@ import java.util.ArrayList; import java.util.List; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; @@ -14,6 +15,7 @@ import org.springframework.web.bind.annotation.RestController; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.converters.UrlToPdfRequest; import stirling.software.SPDF.utils.GeneralUtils; import stirling.software.SPDF.utils.ProcessExecutor; import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; @@ -28,10 +30,8 @@ public class ConvertWebsiteToPDF { summary = "Convert a URL to a PDF", description = "This endpoint fetches content from a URL and converts it to a PDF format." ) - public ResponseEntity urlToPdf( - @RequestParam(required = true, value = "urlInput") - @Parameter(description = "The input URL to be converted to a PDF file", required = true) - String URL) throws IOException, InterruptedException { + public ResponseEntity urlToPdf(@ModelAttribute UrlToPdfRequest request) throws IOException, InterruptedException { + String URL = request.getUrlInput(); // Validate the URL format if(!URL.matches("^https?://.*") || !GeneralUtils.isValidURL(URL)) { diff --git a/src/main/java/stirling/software/SPDF/controller/api/other/ExtractImageScansController.java b/src/main/java/stirling/software/SPDF/controller/api/other/ExtractImageScansController.java index 55ff446c..cb13682d 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/other/ExtractImageScansController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/other/ExtractImageScansController.java @@ -30,12 +30,14 @@ 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.parameters.RequestBody; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.utils.ProcessExecutor; import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; import stirling.software.SPDF.utils.WebResponseUtils; - +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; @RestController @Tag(name = "Other", description = "Other APIs") public class ExtractImageScansController { @@ -46,26 +48,16 @@ public class ExtractImageScansController { @Operation(summary = "Extract image scans from an input file", description = "This endpoint extracts image scans from a given file based on certain parameters. Users can specify angle threshold, tolerance, minimum area, minimum contour area, and border size. Input:PDF Output:IMAGE/ZIP Type:SIMO") public ResponseEntity extractImageScans( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The input file containing image scans") - MultipartFile inputFile, - @RequestParam(name = "angle_threshold", defaultValue = "5") - @Parameter(description = "The angle threshold for the image scan extraction", example = "5") - int angleThreshold, - @RequestParam(name = "tolerance", defaultValue = "20") - @Parameter(description = "The tolerance for the image scan extraction", example = "20") - int tolerance, - @RequestParam(name = "min_area", defaultValue = "8000") - @Parameter(description = "The minimum area for the image scan extraction", example = "8000") - int minArea, - @RequestParam(name = "min_contour_area", defaultValue = "500") - @Parameter(description = "The minimum contour area for the image scan extraction", example = "500") - int minContourArea, - @RequestParam(name = "border_size", defaultValue = "1") - @Parameter(description = "The border size for the image scan extraction", example = "1") - int borderSize) throws IOException, InterruptedException { - - String fileName = inputFile.getOriginalFilename(); + @RequestBody( + description = "Form data containing file and extraction parameters", + required = true, + content = @Content( + mediaType = "multipart/form-data", + schema = @Schema(implementation = MyForm.class) // This should represent your form's structure + ) + ) + MyForm form) throws IOException, InterruptedException { + String fileName = form.getFileInput().getOriginalFilename(); String extension = fileName.substring(fileName.lastIndexOf(".") + 1); List images = new ArrayList<>(); @@ -73,7 +65,7 @@ public class ExtractImageScansController { // Check if input file is a PDF if (extension.equalsIgnoreCase("pdf")) { // Load PDF document - try (PDDocument document = PDDocument.load(new ByteArrayInputStream(inputFile.getBytes()))) { + try (PDDocument document = PDDocument.load(new ByteArrayInputStream(form.getFileInput().getBytes()))) { PDFRenderer pdfRenderer = new PDFRenderer(document); int pageCount = document.getNumberOfPages(); images = new ArrayList<>(); @@ -93,7 +85,7 @@ public class ExtractImageScansController { } } else { Path tempInputFile = Files.createTempFile("input_", "." + extension); - Files.copy(inputFile.getInputStream(), tempInputFile, StandardCopyOption.REPLACE_EXISTING); + Files.copy(form.getFileInput().getInputStream(), tempInputFile, StandardCopyOption.REPLACE_EXISTING); // Add input file path to images list images.add(tempInputFile.toString()); } @@ -109,11 +101,11 @@ public class ExtractImageScansController { "./scripts/split_photos.py", images.get(i), tempDir.toString(), - "--angle_threshold", String.valueOf(angleThreshold), - "--tolerance", String.valueOf(tolerance), - "--min_area", String.valueOf(minArea), - "--min_contour_area", String.valueOf(minContourArea), - "--border_size", String.valueOf(borderSize) + "--angle_threshold", String.valueOf(form.getAngleThreshold()), + "--tolerance", String.valueOf(form.getTolerance()), + "--min_area", String.valueOf(form.getMinArea()), + "--min_contour_area", String.valueOf(form.getMinContourArea()), + "--border_size", String.valueOf(form.getBorderSize()) )); diff --git a/src/main/java/stirling/software/SPDF/controller/api/other/MyForm.java b/src/main/java/stirling/software/SPDF/controller/api/other/MyForm.java new file mode 100644 index 00000000..1938493a --- /dev/null +++ b/src/main/java/stirling/software/SPDF/controller/api/other/MyForm.java @@ -0,0 +1,27 @@ +package stirling.software.SPDF.controller.api.other; + +import org.springframework.web.multipart.MultipartFile; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +public class MyForm { + @Schema(description = "The input file containing image scans", required = true) + private MultipartFile fileInput; + + @Schema(description = "The angle threshold for the image scan extraction", defaultValue = "5", example = "5") + private int angleThreshold; + + @Schema(description = "The tolerance for the image scan extraction", defaultValue = "20", example = "20") + private int tolerance; + + @Schema(description = "The minimum area for the image scan extraction", defaultValue = "8000", example = "8000") + private int minArea; + + @Schema(description = "The minimum contour area for the image scan extraction", defaultValue = "500", example = "500") + private int minContourArea; + + @Schema(description = "The border size for the image scan extraction", defaultValue = "1", example = "1") + private int borderSize; +} 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 aaaf22b4..6392be96 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 @@ -69,7 +69,7 @@ public class CertSignController { @PostMapping(consumes = "multipart/form-data", value = "/cert-sign") @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") public ResponseEntity signPDF2( - @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file to be signed") MultipartFile pdf, + @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file") MultipartFile pdf, @RequestParam(value = "certType", required = false) @Parameter(description = "The type of the digital certificate", schema = @Schema(allowableValues = { "PKCS12", "PEM" })) String certType, diff --git a/src/main/java/stirling/software/SPDF/model/SortTypes.java b/src/main/java/stirling/software/SPDF/model/SortTypes.java new file mode 100644 index 00000000..21181cfa --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/SortTypes.java @@ -0,0 +1,4 @@ +package stirling.software.SPDF.model; +public enum SortTypes { + REVERSE_ORDER, DUPLEX_SORT, BOOKLET_SORT, SIDE_STITCH_BOOKLET_SORT, ODD_EVEN_SPLIT, REMOVE_FIRST, REMOVE_LAST, REMOVE_FIRST_AND_LAST, +} \ No newline at end of file diff --git a/src/main/java/stirling/software/SPDF/model/api/GeneralFile.java b/src/main/java/stirling/software/SPDF/model/api/GeneralFile.java new file mode 100644 index 00000000..84710585 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/GeneralFile.java @@ -0,0 +1,13 @@ +package stirling.software.SPDF.model.api; + +import org.springframework.web.multipart.MultipartFile; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +public class GeneralFile { + + @Schema(description = "The input file") + private MultipartFile fileInput; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/ImageFile.java b/src/main/java/stirling/software/SPDF/model/api/ImageFile.java new file mode 100644 index 00000000..8c4c0cff --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/ImageFile.java @@ -0,0 +1,12 @@ +package stirling.software.SPDF.model.api; + +import org.springframework.web.multipart.MultipartFile; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +public class ImageFile { + @Schema(description = "The input image file") + private MultipartFile fileInput; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/MultiplePDFFiles.java b/src/main/java/stirling/software/SPDF/model/api/MultiplePDFFiles.java new file mode 100644 index 00000000..17bec404 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/MultiplePDFFiles.java @@ -0,0 +1,11 @@ +package stirling.software.SPDF.model.api; + +import org.springframework.web.multipart.MultipartFile; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +@Data +public class MultiplePDFFiles { + @Schema(description = "The input PDF files", type = "array", format = "binary") + private MultipartFile[] fileInput; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/PDFFile.java b/src/main/java/stirling/software/SPDF/model/api/PDFFile.java new file mode 100644 index 00000000..0b304747 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/PDFFile.java @@ -0,0 +1,11 @@ +package stirling.software.SPDF.model.api; + +import org.springframework.web.multipart.MultipartFile; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +@Data +public class PDFFile { + @Schema(description = "The input PDF file") + private MultipartFile fileInput; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/PDFWithPageNums.java b/src/main/java/stirling/software/SPDF/model/api/PDFWithPageNums.java new file mode 100644 index 00000000..4de315de --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/PDFWithPageNums.java @@ -0,0 +1,36 @@ +package stirling.software.SPDF.model.api; + +import java.io.IOException; +import java.util.List; + +import org.apache.pdfbox.pdmodel.PDDocument; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.NoArgsConstructor; +import stirling.software.SPDF.utils.GeneralUtils; +@Data +@NoArgsConstructor +public class PDFWithPageNums extends PDFFile { + + @Schema(description = "The pages to select, Supports ranges (e.g., '1,3,5-9'), or 'all' or functions in the format 'an+b' where 'a' is the multiplier of the page number 'n', and 'b' is a constant (e.g., '2n+1', '3n', '6n-5')\"") + private String pageNumbers; + + + public List getPageNumbersList(){ + int pageCount = 0; + try { + pageCount = PDDocument.load(getFileInput().getInputStream()).getNumberOfPages(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return GeneralUtils.parsePageString(pageNumbers, pageCount); + + } + public List getPageNumbersList(PDDocument doc){ + int pageCount = 0; + pageCount = doc.getNumberOfPages(); + return GeneralUtils.parsePageString(pageNumbers, pageCount); + + } +} diff --git a/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToImageRequest.java b/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToImageRequest.java new file mode 100644 index 00000000..34e36379 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToImageRequest.java @@ -0,0 +1,22 @@ +package stirling.software.SPDF.model.api.converters; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.web.multipart.MultipartFile; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class ConvertToImageRequest extends PDFFile { + + @Schema(description = "The output image format", allowableValues = {"png", "jpeg", "jpg", "gif"}) + private String imageFormat; + + @Schema(description = "Choose between a single image containing all pages or separate images for each page", allowableValues = {"single", "multiple"}) + private String singleOrMultiple; + + @Schema(description = "The color type of the output image(s)", allowableValues = {"color", "greyscale", "blackwhite"}) + private String colorType; + + @Schema(description = "The DPI (dots per inch) for the output image(s)") + private String dpi; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToPdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToPdfRequest.java new file mode 100644 index 00000000..90325ed6 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToPdfRequest.java @@ -0,0 +1,21 @@ +package stirling.software.SPDF.model.api.converters; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.web.multipart.MultipartFile; + +@Data +public class ConvertToPdfRequest { + + @Schema(description = "The input images to be converted to a PDF file") + private MultipartFile[] fileInput; + + @Schema(description = "Whether to stretch the images to fit the PDF page or maintain the aspect ratio", example = "false") + private boolean stretchToFit; + + @Schema(description = "The color type of the output image(s)", allowableValues = {"color", "greyscale", "blackwhite"}) + private String colorType; + + @Schema(description = "Whether to automatically rotate the images to better fit the PDF page", example = "true") + private boolean autoRotate; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/converters/PdfToPresentationRequest.java b/src/main/java/stirling/software/SPDF/model/api/converters/PdfToPresentationRequest.java new file mode 100644 index 00000000..f1bf7a9d --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/converters/PdfToPresentationRequest.java @@ -0,0 +1,13 @@ +package stirling.software.SPDF.model.api.converters; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.web.multipart.MultipartFile; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class PdfToPresentationRequest extends PDFFile { + + @Schema(description = "The output Presentation format", allowableValues = {"ppt", "pptx", "odp"}) + private String outputFormat; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/converters/PdfToTextOrRTFRequest.java b/src/main/java/stirling/software/SPDF/model/api/converters/PdfToTextOrRTFRequest.java new file mode 100644 index 00000000..8093cd45 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/converters/PdfToTextOrRTFRequest.java @@ -0,0 +1,12 @@ +package stirling.software.SPDF.model.api.converters; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class PdfToTextOrRTFRequest extends PDFFile { + + @Schema(description = "The output Text or RTF format", allowableValues = {"rtf", "txt:Text"}) + private String outputFormat; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/converters/PdfToWordRequest.java b/src/main/java/stirling/software/SPDF/model/api/converters/PdfToWordRequest.java new file mode 100644 index 00000000..de5a7c4e --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/converters/PdfToWordRequest.java @@ -0,0 +1,12 @@ +package stirling.software.SPDF.model.api.converters; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class PdfToWordRequest extends PDFFile { + + @Schema(description = "The output Word document format", allowableValues = {"doc", "docx", "odt"}) + private String outputFormat; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/converters/UrlToPdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/converters/UrlToPdfRequest.java new file mode 100644 index 00000000..7d4e69ed --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/converters/UrlToPdfRequest.java @@ -0,0 +1,11 @@ +package stirling.software.SPDF.model.api.converters; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +public class UrlToPdfRequest { + + @Schema(description = "The input URL to be converted to a PDF file", required = true) + private String urlInput; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/general/CropPdfForm.java b/src/main/java/stirling/software/SPDF/model/api/general/CropPdfForm.java new file mode 100644 index 00000000..52c0f269 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/general/CropPdfForm.java @@ -0,0 +1,26 @@ +package stirling.software.SPDF.model.api.general; +import lombok.Data; +import stirling.software.SPDF.model.api.PDFFile; + +import org.springframework.web.multipart.MultipartFile; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +@Data +public class CropPdfForm extends PDFFile { + + + @Schema(description = "The x-coordinate of the top-left corner of the crop area", type = "number") + private float x; + + @Schema(description = "The y-coordinate of the top-left corner of the crop area", type = "number") + private float y; + + @Schema(description = "The width of the crop area", type = "number") + private float width; + + @Schema(description = "The height of the crop area", type = "number") + private float height; +} + diff --git a/src/main/java/stirling/software/SPDF/model/api/general/MergeMultiplePagesRequest.java b/src/main/java/stirling/software/SPDF/model/api/general/MergeMultiplePagesRequest.java new file mode 100644 index 00000000..6752b1b7 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/general/MergeMultiplePagesRequest.java @@ -0,0 +1,13 @@ +package stirling.software.SPDF.model.api.general; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class MergeMultiplePagesRequest extends PDFFile { + + @Schema(description = "The number of pages to fit onto a single sheet in the output PDF.", + type = "integer", allowableValues = {"2", "3", "4", "9", "16"}) + private int pagesPerSheet; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/general/MergePdfsRequest.java b/src/main/java/stirling/software/SPDF/model/api/general/MergePdfsRequest.java new file mode 100644 index 00000000..4e1ed397 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/general/MergePdfsRequest.java @@ -0,0 +1,20 @@ +package stirling.software.SPDF.model.api.general; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import stirling.software.SPDF.model.api.MultiplePDFFiles; + +@Data +public class MergePdfsRequest extends MultiplePDFFiles { + + @Schema(description = "The type of sorting to be applied on the input files before merging.", + allowableValues = { + "orderProvided", + "byFileName", + "byDateModified", + "byDateCreated", + "byPDFTitle" + }, + defaultValue = "orderProvided") + private String sortType; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/general/RearrangePagesRequest.java b/src/main/java/stirling/software/SPDF/model/api/general/RearrangePagesRequest.java new file mode 100644 index 00000000..4e054343 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/general/RearrangePagesRequest.java @@ -0,0 +1,23 @@ +package stirling.software.SPDF.model.api.general; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.web.multipart.MultipartFile; +import stirling.software.SPDF.model.api.PDFFile; +import stirling.software.SPDF.model.api.PDFWithPageNums; +import stirling.software.SPDF.model.SortTypes; +@Data +public class RearrangePagesRequest extends PDFWithPageNums { + + @Schema(implementation = SortTypes.class, description = "The custom mode for page rearrangement. Valid values are:\n" + + "REVERSE_ORDER: Reverses the order of all pages.\n" + + "DUPLEX_SORT: Sorts pages as if all fronts were scanned then all backs in reverse (1, n, 2, n-1, ...). " + + "BOOKLET_SORT: Arranges pages for booklet printing (last, first, second, second last, ...).\n" + + "ODD_EVEN_SPLIT: Splits and arranges pages into odd and even numbered pages.\n" + + "REMOVE_FIRST: Removes the first page.\n" + "REMOVE_LAST: Removes the last page.\n" + + "REMOVE_FIRST_AND_LAST: Removes both the first and the last pages.\n") + private String customMode; + + + +} diff --git a/src/main/java/stirling/software/SPDF/model/api/general/RotatePDFRequest.java b/src/main/java/stirling/software/SPDF/model/api/general/RotatePDFRequest.java new file mode 100644 index 00000000..58d268a8 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/general/RotatePDFRequest.java @@ -0,0 +1,13 @@ +package stirling.software.SPDF.model.api.general; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.web.multipart.MultipartFile; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class RotatePDFRequest extends PDFFile { + + @Schema(description = "The angle by which to rotate the PDF file. This should be a multiple of 90.", example = "90") + private Integer angle; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/general/ScalePagesRequest.java b/src/main/java/stirling/software/SPDF/model/api/general/ScalePagesRequest.java new file mode 100644 index 00000000..3411e1d2 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/general/ScalePagesRequest.java @@ -0,0 +1,20 @@ +package stirling.software.SPDF.model.api.general; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.web.multipart.MultipartFile; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class ScalePagesRequest extends PDFFile { + + @Schema(description = "The scale of pages in the output PDF. Acceptable values are A0-A10, B0-B9, LETTER, TABLOID, LEDGER, LEGAL, EXECUTIVE.", + allowableValues = { + "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9", "A10", "B0", "B1", "B2", "B3", "B4", + "B5", "B6", "B7", "B8", "B9", "LETTER", "TABLOID", "LEDGER", "LEGAL", "EXECUTIVE" + }) + private String targetPDRectangle; + + @Schema(description = "The scale of the content on the pages of the output PDF. Acceptable values are floats.") + private float scaleFactor; +} diff --git a/src/main/java/stirling/software/SPDF/utils/GeneralUtils.java b/src/main/java/stirling/software/SPDF/utils/GeneralUtils.java index 34ee9c35..b4377039 100644 --- a/src/main/java/stirling/software/SPDF/utils/GeneralUtils.java +++ b/src/main/java/stirling/software/SPDF/utils/GeneralUtils.java @@ -75,6 +75,9 @@ public class GeneralUtils { return null; } + public static List parsePageString(String pageOrder, int totalPages) { + return parsePageList(pageOrder.split(","), 100); + } public static List parsePageList(String[] pageOrderArr, int totalPages) { List newPageOrder = new ArrayList<>(); From 872f562aadbb8803e24ef73d2a3920ad6749204e Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sat, 9 Sep 2023 18:21:55 +0100 Subject: [PATCH 04/57] misc beginings --- .../api/filters/FilterController.java | 64 +++++++++---------- .../{other => misc}/AutoRenameController.java | 11 ++-- .../AutoSplitPdfController.java | 11 ++-- .../{other => misc}/BlankPageController.java | 18 ++---- .../{other => misc}/CompressController.java | 15 +++-- .../ExtractImageScansController.java | 7 +- .../ExtractImagesController.java | 2 +- .../FakeScanControllerWIP.java | 2 +- .../{other => misc}/MetadataController.java | 2 +- .../api/{other => misc}/OCRController.java | 2 +- .../OverlayImageController.java | 2 +- .../PageNumbersController.java | 2 +- .../api/{other => misc}/RepairController.java | 2 +- .../api/{other => misc}/ShowJavascript.java | 2 +- .../SPDF/model/api/PDFComparison.java | 19 ++++++ .../SPDF/model/api/PDFComparisonAndCount.java | 18 ++++++ .../model/api/filter/ContainsTextRequest.java | 12 ++++ .../model/api/filter/FileSizeRequest.java | 15 +++++ .../model/api/filter/PageRotationRequest.java | 14 ++++ .../model/api/filter/PageSizeRequest.java | 15 +++++ .../model/api/misc/AutoSplitPdfRequest.java | 12 ++++ .../model/api/misc/ExtractHeaderRequest.java | 12 ++++ .../api/misc/ExtractImageScansRequest.java} | 4 +- .../model/api/misc/OptimizePdfRequest.java | 16 +++++ .../api/misc/RemoveBlankPagesRequest.java | 15 +++++ 25 files changed, 221 insertions(+), 73 deletions(-) rename src/main/java/stirling/software/SPDF/controller/api/{other => misc}/AutoRenameController.java (90%) rename src/main/java/stirling/software/SPDF/controller/api/{other => misc}/AutoSplitPdfController.java (91%) rename src/main/java/stirling/software/SPDF/controller/api/{other => misc}/BlankPageController.java (87%) rename src/main/java/stirling/software/SPDF/controller/api/{other => misc}/CompressController.java (93%) rename src/main/java/stirling/software/SPDF/controller/api/{other => misc}/ExtractImageScansController.java (95%) rename src/main/java/stirling/software/SPDF/controller/api/{other => misc}/ExtractImagesController.java (98%) rename src/main/java/stirling/software/SPDF/controller/api/{other => misc}/FakeScanControllerWIP.java (99%) rename src/main/java/stirling/software/SPDF/controller/api/{other => misc}/MetadataController.java (99%) rename src/main/java/stirling/software/SPDF/controller/api/{other => misc}/OCRController.java (99%) rename src/main/java/stirling/software/SPDF/controller/api/{other => misc}/OverlayImageController.java (98%) rename src/main/java/stirling/software/SPDF/controller/api/{other => misc}/PageNumbersController.java (96%) rename src/main/java/stirling/software/SPDF/controller/api/{other => misc}/RepairController.java (98%) rename src/main/java/stirling/software/SPDF/controller/api/{other => misc}/ShowJavascript.java (97%) create mode 100644 src/main/java/stirling/software/SPDF/model/api/PDFComparison.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/PDFComparisonAndCount.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/filter/ContainsTextRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/filter/FileSizeRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/filter/PageRotationRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/filter/PageSizeRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/misc/AutoSplitPdfRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/misc/ExtractHeaderRequest.java rename src/main/java/stirling/software/SPDF/{controller/api/other/MyForm.java => model/api/misc/ExtractImageScansRequest.java} (91%) create mode 100644 src/main/java/stirling/software/SPDF/model/api/misc/OptimizePdfRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/misc/RemoveBlankPagesRequest.java diff --git a/src/main/java/stirling/software/SPDF/controller/api/filters/FilterController.java b/src/main/java/stirling/software/SPDF/controller/api/filters/FilterController.java index bd2e75be..dbb20bfe 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/filters/FilterController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/filters/FilterController.java @@ -6,6 +6,7 @@ import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDPage; import org.apache.pdfbox.pdmodel.common.PDRectangle; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -15,6 +16,12 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.PDFComparisonAndCount; +import stirling.software.SPDF.model.api.PDFWithPageNums; +import stirling.software.SPDF.model.api.filter.ContainsTextRequest; +import stirling.software.SPDF.model.api.filter.FileSizeRequest; +import stirling.software.SPDF.model.api.filter.PageRotationRequest; +import stirling.software.SPDF.model.api.filter.PageSizeRequest; import stirling.software.SPDF.utils.PdfUtils; import stirling.software.SPDF.utils.WebResponseUtils; @@ -24,11 +31,11 @@ public class FilterController { @PostMapping(consumes = "multipart/form-data", value = "/filter-contains-text") @Operation(summary = "Checks if a PDF contains set text, returns true if does", description = "Input:PDF Output:Boolean Type:SISO") - public ResponseEntity containsText( - @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file to be converted to a PDF/A file", required = true) MultipartFile inputFile, - @Parameter(description = "The text to check for", required = true) String text, - @Parameter(description = "The page number to check for text on accepts 'All', ranges like '1-4'", required = false) String pageNumber) - throws IOException, InterruptedException { + public ResponseEntity containsText(@ModelAttribute ContainsTextRequest request) throws IOException, InterruptedException { + MultipartFile inputFile = request.getFileInput(); + String text = request.getText(); + String pageNumber = request.getPageNumbers(); + PDDocument pdfDocument = PDDocument.load(inputFile.getInputStream()); if (PdfUtils.hasText(pdfDocument, pageNumber, text)) return WebResponseUtils.pdfDocToWebResponse(pdfDocument, inputFile.getOriginalFilename()); @@ -38,10 +45,11 @@ public class FilterController { // TODO @PostMapping(consumes = "multipart/form-data", value = "/filter-contains-image") @Operation(summary = "Checks if a PDF contains an image", description = "Input:PDF Output:Boolean Type:SISO") - public ResponseEntity containsImage( - @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file to be converted to a PDF/A file", required = true) MultipartFile inputFile, - @Parameter(description = "The page number to check for image on accepts 'All', ranges like '1-4'", required = false) String pageNumber) + public ResponseEntity containsImage(@ModelAttribute PDFWithPageNums request) throws IOException, InterruptedException { + MultipartFile inputFile = request.getFileInput(); + String pageNumber = request.getPageNumbers(); + PDDocument pdfDocument = PDDocument.load(inputFile.getInputStream()); if (PdfUtils.hasImages(pdfDocument, pageNumber)) return WebResponseUtils.pdfDocToWebResponse(pdfDocument, inputFile.getOriginalFilename()); @@ -50,12 +58,10 @@ public class FilterController { @PostMapping(consumes = "multipart/form-data", value = "/filter-page-count") @Operation(summary = "Checks if a PDF is greater, less or equal to a setPageCount", description = "Input:PDF Output:Boolean Type:SISO") - public ResponseEntity pageCount( - @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file", required = true) MultipartFile inputFile, - @Parameter(description = "Page Count", required = true) String pageCount, - @Parameter(description = "Comparison type", schema = @Schema(description = "The comparison type, accepts Greater, Equal, Less than", allowableValues = { - "Greater", "Equal", "Less" })) String comparator) - throws IOException, InterruptedException { + public ResponseEntity pageCount(@ModelAttribute PDFComparisonAndCount request) throws IOException, InterruptedException { + MultipartFile inputFile = request.getFileInput(); + String pageCount = request.getPageCount(); + String comparator = request.getComparator(); // Load the PDF PDDocument document = PDDocument.load(inputFile.getInputStream()); int actualPageCount = document.getNumberOfPages(); @@ -83,12 +89,10 @@ public class FilterController { @PostMapping(consumes = "multipart/form-data", value = "/filter-page-size") @Operation(summary = "Checks if a PDF is of a certain size", description = "Input:PDF Output:Boolean Type:SISO") - public ResponseEntity pageSize( - @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file", required = true) MultipartFile inputFile, - @Parameter(description = "Standard Page Size", required = true) String standardPageSize, - @Parameter(description = "Comparison type", schema = @Schema(description = "The comparison type, accepts Greater, Equal, Less than", allowableValues = { - "Greater", "Equal", "Less" })) String comparator) - throws IOException, InterruptedException { + public ResponseEntity pageSize(@ModelAttribute PageSizeRequest request) throws IOException, InterruptedException { + MultipartFile inputFile = request.getFileInput(); + String standardPageSize = request.getStandardPageSize(); + String comparator = request.getComparator(); // Load the PDF PDDocument document = PDDocument.load(inputFile.getInputStream()); @@ -126,12 +130,10 @@ public class FilterController { @PostMapping(consumes = "multipart/form-data", value = "/filter-file-size") @Operation(summary = "Checks if a PDF is a set file size", description = "Input:PDF Output:Boolean Type:SISO") - public ResponseEntity fileSize( - @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file", required = true) MultipartFile inputFile, - @Parameter(description = "File Size", required = true) String fileSize, - @Parameter(description = "Comparison type", schema = @Schema(description = "The comparison type, accepts Greater, Equal, Less than", allowableValues = { - "Greater", "Equal", "Less" })) String comparator) - throws IOException, InterruptedException { + public ResponseEntity fileSize(@ModelAttribute FileSizeRequest request) throws IOException, InterruptedException { + MultipartFile inputFile = request.getFileInput(); + String fileSize = request.getFileSize(); + String comparator = request.getComparator(); // Get the file size long actualFileSize = inputFile.getSize(); @@ -159,12 +161,10 @@ public class FilterController { @PostMapping(consumes = "multipart/form-data", value = "/filter-page-rotation") @Operation(summary = "Checks if a PDF is of a certain rotation", description = "Input:PDF Output:Boolean Type:SISO") - public ResponseEntity pageRotation( - @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file", required = true) MultipartFile inputFile, - @Parameter(description = "Rotation in degrees", required = true) int rotation, - @Parameter(description = "Comparison type", schema = @Schema(description = "The comparison type, accepts Greater, Equal, Less than", allowableValues = { - "Greater", "Equal", "Less" })) String comparator) - throws IOException, InterruptedException { + public ResponseEntity pageRotation(@ModelAttribute PageRotationRequest request) throws IOException, InterruptedException { + MultipartFile inputFile = request.getFileInput(); + int rotation = request.getRotation(); + String comparator = request.getComparator(); // Load the PDF PDDocument document = PDDocument.load(inputFile.getInputStream()); diff --git a/src/main/java/stirling/software/SPDF/controller/api/other/AutoRenameController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java similarity index 90% rename from src/main/java/stirling/software/SPDF/controller/api/other/AutoRenameController.java rename to src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java index eb20f3bd..8059062c 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/other/AutoRenameController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java @@ -1,4 +1,4 @@ -package stirling.software.SPDF.controller.api.other; +package stirling.software.SPDF.controller.api.misc; import java.io.IOException; import java.util.ArrayList; @@ -11,6 +11,7 @@ import org.apache.pdfbox.text.TextPosition; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -20,6 +21,7 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.misc.ExtractHeaderRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @Tag(name = "Other", description = "Other APIs") @@ -32,10 +34,9 @@ public class AutoRenameController { @PostMapping(consumes = "multipart/form-data", value = "/auto-rename") @Operation(summary = "Extract header from PDF file", description = "This endpoint accepts a PDF file and attempts to extract its title or header based on heuristics. Input:PDF Output:PDF Type:SISO") - public ResponseEntity extractHeader( - @RequestPart(value = "fileInput") @Parameter(description = "The input PDF file from which the header is to be extracted.", required = true) MultipartFile file, - @RequestParam(required = false, defaultValue = "false") @Parameter(description = "Flag indicating whether to use the first text as a fallback if no suitable title is found. Defaults to false.", required = false) Boolean useFirstTextAsFallback) - throws Exception { + public ResponseEntity extractHeader(@ModelAttribute ExtractHeaderRequest request) throws Exception { + MultipartFile file = request.getFileInput(); + Boolean useFirstTextAsFallback = request.getUseFirstTextAsFallback(); PDDocument document = PDDocument.load(file.getInputStream()); PDFTextStripper reader = new PDFTextStripper() { diff --git a/src/main/java/stirling/software/SPDF/controller/api/other/AutoSplitPdfController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoSplitPdfController.java similarity index 91% rename from src/main/java/stirling/software/SPDF/controller/api/other/AutoSplitPdfController.java rename to src/main/java/stirling/software/SPDF/controller/api/misc/AutoSplitPdfController.java index e3e56847..3ba81f78 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/other/AutoSplitPdfController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoSplitPdfController.java @@ -1,4 +1,4 @@ -package stirling.software.SPDF.controller.api.other; +package stirling.software.SPDF.controller.api.misc; import java.awt.image.BufferedImage; import java.awt.image.DataBufferByte; import java.awt.image.DataBufferInt; @@ -16,6 +16,7 @@ import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.rendering.PDFRenderer; import org.springframework.http.MediaType; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; @@ -31,6 +32,7 @@ import com.google.zxing.common.HybridBinarizer; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; +import stirling.software.SPDF.model.api.misc.AutoSplitPdfRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @@ -40,10 +42,9 @@ public class AutoSplitPdfController { @PostMapping(value = "/auto-split-pdf", consumes = "multipart/form-data") @Operation(summary = "Auto split PDF pages into separate documents", description = "This endpoint accepts a PDF file, scans each page for a specific QR code, and splits the document at the QR code boundaries. The output is a zip file containing each separate PDF document. Input:PDF Output:ZIP Type:SISO") - public ResponseEntity autoSplitPdf( - @RequestParam("fileInput") @Parameter(description = "The input PDF file which needs to be split into separate documents based on QR code boundaries.", required = true) MultipartFile file, - @RequestParam(value ="duplexMode",defaultValue = "false") @Parameter(description = "Flag indicating if the duplex mode is active, where the page after the divider also gets removed.", required = false) boolean duplexMode) - throws IOException { + public ResponseEntity autoSplitPdf(@ModelAttribute AutoSplitPdfRequest request) throws IOException { + MultipartFile file = request.getFileInput(); + boolean duplexMode = request.isDuplexMode(); InputStream inputStream = file.getInputStream(); PDDocument document = PDDocument.load(inputStream); diff --git a/src/main/java/stirling/software/SPDF/controller/api/other/BlankPageController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/BlankPageController.java similarity index 87% rename from src/main/java/stirling/software/SPDF/controller/api/other/BlankPageController.java rename to src/main/java/stirling/software/SPDF/controller/api/misc/BlankPageController.java index 4f505b73..5107d8c0 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/other/BlankPageController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/BlankPageController.java @@ -1,4 +1,4 @@ -package stirling.software.SPDF.controller.api.other; +package stirling.software.SPDF.controller.api.misc; import java.awt.image.BufferedImage; import java.io.IOException; @@ -20,6 +20,7 @@ import org.apache.pdfbox.rendering.PDFRenderer; import org.apache.pdfbox.text.PDFTextStripper; import org.springframework.http.HttpStatus; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -29,6 +30,7 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.misc.RemoveBlankPagesRequest; import stirling.software.SPDF.utils.PdfUtils; import stirling.software.SPDF.utils.ProcessExecutor; import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; @@ -43,16 +45,10 @@ public class BlankPageController { summary = "Remove blank pages from a PDF file", description = "This endpoint removes blank pages from a given PDF file. Users can specify the threshold and white percentage to tune the detection of blank pages. Input:PDF Output:PDF Type:SISO" ) - public ResponseEntity removeBlankPages( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The input PDF file from which blank pages will be removed", required = true) - MultipartFile inputFile, - @RequestParam(defaultValue = "10", name = "threshold") - @Parameter(description = "The threshold value to determine blank pages", example = "10") - int threshold, - @RequestParam(defaultValue = "99.9", name = "whitePercent") - @Parameter(description = "The percentage of white color on a page to consider it as blank", example = "99.9") - float whitePercent) throws IOException, InterruptedException { + public ResponseEntity removeBlankPages(@ModelAttribute RemoveBlankPagesRequest request) throws IOException, InterruptedException { + MultipartFile inputFile = request.getFileInput(); + int threshold = request.getThreshold(); + float whitePercent = request.getWhitePercent(); PDDocument document = null; try { diff --git a/src/main/java/stirling/software/SPDF/controller/api/other/CompressController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java similarity index 93% rename from src/main/java/stirling/software/SPDF/controller/api/other/CompressController.java rename to src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java index 381a6821..89147056 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/other/CompressController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java @@ -1,4 +1,4 @@ -package stirling.software.SPDF.controller.api.other; +package stirling.software.SPDF.controller.api.misc; import java.awt.Image; import java.awt.image.BufferedImage; @@ -22,6 +22,7 @@ import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -32,6 +33,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.misc.OptimizePdfRequest; import stirling.software.SPDF.utils.GeneralUtils; import stirling.software.SPDF.utils.ProcessExecutor; import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; @@ -45,12 +47,11 @@ public class CompressController { @PostMapping(consumes = "multipart/form-data", value = "/compress-pdf") @Operation(summary = "Optimize PDF file", description = "This endpoint accepts a PDF file and optimizes it based on the provided parameters. Input:PDF Output:PDF Type:SISO") - public ResponseEntity optimizePdf( - @RequestPart(value = "fileInput") @Parameter(description = "The input PDF file to be optimized.", required = true) MultipartFile inputFile, - @RequestParam(required = false, value = "optimizeLevel") @Parameter(description = "The level of optimization to apply to the PDF file. Higher values indicate greater compression but may reduce quality.", schema = @Schema(allowableValues = { - "1", "2", "3", "4", "5" })) Integer optimizeLevel, - @RequestParam(value = "expectedOutputSize", required = false) @Parameter(description = "The expected output size, e.g. '100MB', '25KB', etc.", required = false) String expectedOutputSizeString) - throws Exception { + public ResponseEntity optimizePdf(@ModelAttribute OptimizePdfRequest request) throws Exception { + MultipartFile inputFile = request.getFileInput(); + Integer optimizeLevel = request.getOptimizeLevel(); + String expectedOutputSizeString = request.getExpectedOutputSizeString(); + if(expectedOutputSizeString == null && optimizeLevel == null) { throw new Exception("Both expected output size and optimize level are not specified"); diff --git a/src/main/java/stirling/software/SPDF/controller/api/other/ExtractImageScansController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java similarity index 95% rename from src/main/java/stirling/software/SPDF/controller/api/other/ExtractImageScansController.java rename to src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java index cb13682d..5a1bbf8a 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/other/ExtractImageScansController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java @@ -1,4 +1,4 @@ -package stirling.software.SPDF.controller.api.other; +package stirling.software.SPDF.controller.api.misc; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; @@ -33,6 +33,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.parameters.RequestBody; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.misc.ExtractImageScansRequest; import stirling.software.SPDF.utils.ProcessExecutor; import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; import stirling.software.SPDF.utils.WebResponseUtils; @@ -53,10 +54,10 @@ public class ExtractImageScansController { required = true, content = @Content( mediaType = "multipart/form-data", - schema = @Schema(implementation = MyForm.class) // This should represent your form's structure + schema = @Schema(implementation = ExtractImageScansRequest.class) // This should represent your form's structure ) ) - MyForm form) throws IOException, InterruptedException { + ExtractImageScansRequest form) throws IOException, InterruptedException { String fileName = form.getFileInput().getOriginalFilename(); String extension = fileName.substring(fileName.lastIndexOf(".") + 1); diff --git a/src/main/java/stirling/software/SPDF/controller/api/other/ExtractImagesController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java similarity index 98% rename from src/main/java/stirling/software/SPDF/controller/api/other/ExtractImagesController.java rename to src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java index c10dd7b4..206c78a2 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/other/ExtractImagesController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java @@ -1,4 +1,4 @@ -package stirling.software.SPDF.controller.api.other; +package stirling.software.SPDF.controller.api.misc; import java.awt.Graphics2D; import java.awt.Image; diff --git a/src/main/java/stirling/software/SPDF/controller/api/other/FakeScanControllerWIP.java b/src/main/java/stirling/software/SPDF/controller/api/misc/FakeScanControllerWIP.java similarity index 99% rename from src/main/java/stirling/software/SPDF/controller/api/other/FakeScanControllerWIP.java rename to src/main/java/stirling/software/SPDF/controller/api/misc/FakeScanControllerWIP.java index 19c5aa5e..e3ec8d5e 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/other/FakeScanControllerWIP.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/FakeScanControllerWIP.java @@ -1,4 +1,4 @@ -package stirling.software.SPDF.controller.api.other; +package stirling.software.SPDF.controller.api.misc; import java.awt.Color; import java.awt.geom.AffineTransform; diff --git a/src/main/java/stirling/software/SPDF/controller/api/other/MetadataController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java similarity index 99% rename from src/main/java/stirling/software/SPDF/controller/api/other/MetadataController.java rename to src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java index e3979d10..059db19d 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/other/MetadataController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java @@ -1,4 +1,4 @@ -package stirling.software.SPDF.controller.api.other; +package stirling.software.SPDF.controller.api.misc; import java.io.IOException; import java.text.ParseException; diff --git a/src/main/java/stirling/software/SPDF/controller/api/other/OCRController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java similarity index 99% rename from src/main/java/stirling/software/SPDF/controller/api/other/OCRController.java rename to src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java index d6009c8a..768493ab 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/other/OCRController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java @@ -1,4 +1,4 @@ -package stirling.software.SPDF.controller.api.other; +package stirling.software.SPDF.controller.api.misc; import java.io.File; import java.io.FileOutputStream; diff --git a/src/main/java/stirling/software/SPDF/controller/api/other/OverlayImageController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/OverlayImageController.java similarity index 98% rename from src/main/java/stirling/software/SPDF/controller/api/other/OverlayImageController.java rename to src/main/java/stirling/software/SPDF/controller/api/misc/OverlayImageController.java index 61768f6a..975e7628 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/other/OverlayImageController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/OverlayImageController.java @@ -1,4 +1,4 @@ -package stirling.software.SPDF.controller.api.other; +package stirling.software.SPDF.controller.api.misc; import java.io.IOException; diff --git a/src/main/java/stirling/software/SPDF/controller/api/other/PageNumbersController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java similarity index 96% rename from src/main/java/stirling/software/SPDF/controller/api/other/PageNumbersController.java rename to src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java index 8e38bd10..2192d876 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/other/PageNumbersController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java @@ -1,4 +1,4 @@ -package stirling.software.SPDF.controller.api.other; +package stirling.software.SPDF.controller.api.misc; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/src/main/java/stirling/software/SPDF/controller/api/other/RepairController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java similarity index 98% rename from src/main/java/stirling/software/SPDF/controller/api/other/RepairController.java rename to src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java index 52644080..e9983902 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/other/RepairController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java @@ -1,4 +1,4 @@ -package stirling.software.SPDF.controller.api.other; +package stirling.software.SPDF.controller.api.misc; import java.io.IOException; import java.nio.file.Files; diff --git a/src/main/java/stirling/software/SPDF/controller/api/other/ShowJavascript.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java similarity index 97% rename from src/main/java/stirling/software/SPDF/controller/api/other/ShowJavascript.java rename to src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java index d812f5c8..08ac3e1b 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/other/ShowJavascript.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java @@ -1,4 +1,4 @@ -package stirling.software.SPDF.controller.api.other; +package stirling.software.SPDF.controller.api.misc; import java.nio.charset.StandardCharsets; import java.util.Map; diff --git a/src/main/java/stirling/software/SPDF/model/api/PDFComparison.java b/src/main/java/stirling/software/SPDF/model/api/PDFComparison.java new file mode 100644 index 00000000..5d7871b0 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/PDFComparison.java @@ -0,0 +1,19 @@ +package stirling.software.SPDF.model.api; + +import java.io.IOException; +import java.util.List; + +import org.apache.pdfbox.pdmodel.PDDocument; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.NoArgsConstructor; +import stirling.software.SPDF.utils.GeneralUtils; +@Data +@NoArgsConstructor +public class PDFComparison extends PDFFile { + + @Schema(description = "The comparison type, accepts Greater, Equal, Less than", allowableValues = { + "Greater", "Equal", "Less" }) + private String comparator; + +} diff --git a/src/main/java/stirling/software/SPDF/model/api/PDFComparisonAndCount.java b/src/main/java/stirling/software/SPDF/model/api/PDFComparisonAndCount.java new file mode 100644 index 00000000..8779ba57 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/PDFComparisonAndCount.java @@ -0,0 +1,18 @@ +package stirling.software.SPDF.model.api; + +import java.io.IOException; +import java.util.List; + +import org.apache.pdfbox.pdmodel.PDDocument; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.NoArgsConstructor; +import stirling.software.SPDF.utils.GeneralUtils; +@Data +@NoArgsConstructor +public class PDFComparisonAndCount extends PDFComparison { + @Schema(description = "Count") + private String pageCount; + + +} diff --git a/src/main/java/stirling/software/SPDF/model/api/filter/ContainsTextRequest.java b/src/main/java/stirling/software/SPDF/model/api/filter/ContainsTextRequest.java new file mode 100644 index 00000000..4dc4e137 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/filter/ContainsTextRequest.java @@ -0,0 +1,12 @@ +package stirling.software.SPDF.model.api.filter; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import stirling.software.SPDF.model.api.PDFWithPageNums; + +@Data +public class ContainsTextRequest extends PDFWithPageNums { + + @Schema(description = "The text to check for", required = true) + private String text; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/filter/FileSizeRequest.java b/src/main/java/stirling/software/SPDF/model/api/filter/FileSizeRequest.java new file mode 100644 index 00000000..cffcd9a4 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/filter/FileSizeRequest.java @@ -0,0 +1,15 @@ +package stirling.software.SPDF.model.api.filter; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import stirling.software.SPDF.model.api.PDFComparison; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class FileSizeRequest extends PDFComparison { + + @Schema(description = "File Size", required = true) + private String fileSize; + + +} diff --git a/src/main/java/stirling/software/SPDF/model/api/filter/PageRotationRequest.java b/src/main/java/stirling/software/SPDF/model/api/filter/PageRotationRequest.java new file mode 100644 index 00000000..8f36ae5d --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/filter/PageRotationRequest.java @@ -0,0 +1,14 @@ +package stirling.software.SPDF.model.api.filter; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import stirling.software.SPDF.model.api.PDFComparison; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class PageRotationRequest extends PDFComparison { + + @Schema(description = "Rotation in degrees", required = true) + private int rotation; + +} diff --git a/src/main/java/stirling/software/SPDF/model/api/filter/PageSizeRequest.java b/src/main/java/stirling/software/SPDF/model/api/filter/PageSizeRequest.java new file mode 100644 index 00000000..0184ac90 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/filter/PageSizeRequest.java @@ -0,0 +1,15 @@ +package stirling.software.SPDF.model.api.filter; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import stirling.software.SPDF.model.api.PDFComparison; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class PageSizeRequest extends PDFComparison { + + @Schema(description = "Standard Page Size", required = true) + private String standardPageSize; + + +} diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/AutoSplitPdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/AutoSplitPdfRequest.java new file mode 100644 index 00000000..822eb7a6 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/misc/AutoSplitPdfRequest.java @@ -0,0 +1,12 @@ +package stirling.software.SPDF.model.api.misc; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class AutoSplitPdfRequest extends PDFFile { + + @Schema(description = "Flag indicating if the duplex mode is active, where the page after the divider also gets removed.", required = false, defaultValue = "false") + private boolean duplexMode; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/ExtractHeaderRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/ExtractHeaderRequest.java new file mode 100644 index 00000000..d05b865e --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/misc/ExtractHeaderRequest.java @@ -0,0 +1,12 @@ +package stirling.software.SPDF.model.api.misc; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class ExtractHeaderRequest extends PDFFile { + + @Schema(description = "Flag indicating whether to use the first text as a fallback if no suitable title is found. Defaults to false.", required = false, defaultValue = "false") + private Boolean useFirstTextAsFallback; +} diff --git a/src/main/java/stirling/software/SPDF/controller/api/other/MyForm.java b/src/main/java/stirling/software/SPDF/model/api/misc/ExtractImageScansRequest.java similarity index 91% rename from src/main/java/stirling/software/SPDF/controller/api/other/MyForm.java rename to src/main/java/stirling/software/SPDF/model/api/misc/ExtractImageScansRequest.java index 1938493a..8a12fc47 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/other/MyForm.java +++ b/src/main/java/stirling/software/SPDF/model/api/misc/ExtractImageScansRequest.java @@ -1,4 +1,4 @@ -package stirling.software.SPDF.controller.api.other; +package stirling.software.SPDF.model.api.misc; import org.springframework.web.multipart.MultipartFile; @@ -6,7 +6,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @Data -public class MyForm { +public class ExtractImageScansRequest { @Schema(description = "The input file containing image scans", required = true) private MultipartFile fileInput; diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/OptimizePdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/OptimizePdfRequest.java new file mode 100644 index 00000000..65028a7f --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/misc/OptimizePdfRequest.java @@ -0,0 +1,16 @@ +package stirling.software.SPDF.model.api.misc; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class OptimizePdfRequest extends PDFFile { + + @Schema(description = "The level of optimization to apply to the PDF file. Higher values indicate greater compression but may reduce quality.", + allowableValues = { "1", "2", "3", "4", "5" }) + private Integer optimizeLevel; + + @Schema(description = "The expected output size, e.g. '100MB', '25KB', etc.") + private String expectedOutputSizeString; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/RemoveBlankPagesRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/RemoveBlankPagesRequest.java new file mode 100644 index 00000000..a7a92897 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/misc/RemoveBlankPagesRequest.java @@ -0,0 +1,15 @@ +package stirling.software.SPDF.model.api.misc; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class RemoveBlankPagesRequest extends PDFFile { + + @Schema(description = "The threshold value to determine blank pages", example = "10", defaultValue = "10") + private int threshold; + + @Schema(description = "The percentage of white color on a page to consider it as blank", example = "99.9", defaultValue = "99.9") + private float whitePercent; +} From 145e8006f0773f884e67d45928b0b9b91622c0a6 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sat, 9 Sep 2023 18:51:43 +0100 Subject: [PATCH 05/57] metadata --- .../api/misc/ExtractImagesController.java | 12 ++-- .../api/misc/FakeScanControllerWIP.java | 8 +-- .../api/misc/MetadataController.java | 58 +++++++------------ .../model/api/PDFWithImageFormatRequest.java | 12 ++++ .../SPDF/model/api/misc/MetadataRequest.java | 44 ++++++++++++++ 5 files changed, 86 insertions(+), 48 deletions(-) create mode 100644 src/main/java/stirling/software/SPDF/model/api/PDFWithImageFormatRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/misc/MetadataRequest.java diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java index 206c78a2..91bbff09 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java @@ -20,6 +20,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.MediaType; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -30,6 +31,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.PDFWithImageFormatRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @Tag(name = "Other", description = "Other APIs") @@ -40,13 +42,9 @@ public class ExtractImagesController { @PostMapping(consumes = "multipart/form-data", value = "/extract-images") @Operation(summary = "Extract images from a PDF file", description = "This endpoint extracts images from a given PDF file and returns them in a zip file. Users can specify the output image format. Input:PDF Output:IMAGE/ZIP Type:SIMO") - public ResponseEntity extractImages( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The input PDF file containing images") - MultipartFile file, - @RequestParam("format") - @Parameter(description = "The output image format e.g., 'png', 'jpeg', or 'gif'", schema = @Schema(allowableValues = {"png", "jpeg", "gif"})) - String format) throws IOException { + public ResponseEntity extractImages(@ModelAttribute PDFWithImageFormatRequest request) throws IOException { + MultipartFile file = request.getFileInput(); + String format = request.getFormat(); System.out.println(System.currentTimeMillis() + "file=" + file.getName() + ", format=" + format); PDDocument document = PDDocument.load(file.getBytes()); 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 e3ec8d5e..70fc2e88 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 @@ -30,6 +30,7 @@ import org.apache.pdfbox.rendering.PDFRenderer; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -39,6 +40,7 @@ import io.swagger.v3.oas.annotations.Hidden; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @@ -54,10 +56,8 @@ public class FakeScanControllerWIP { summary = "Repair a PDF file", description = "This endpoint repairs a given PDF file by running Ghostscript command. The PDF is first saved to a temporary location, repaired, read back, and then returned as a response." ) - public ResponseEntity repairPdf( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The input PDF file to be repaired", required = true) - MultipartFile inputFile) throws IOException, InterruptedException { + public ResponseEntity repairPdf(@ModelAttribute PDFFile request) throws IOException { + MultipartFile inputFile = request.getFileInput(); PDDocument document = PDDocument.load(inputFile.getBytes()); PDFRenderer pdfRenderer = new PDFRenderer(document); diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java index 059db19d..aa9b5395 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java @@ -11,6 +11,7 @@ import org.apache.pdfbox.cos.COSName; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDDocumentInformation; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -20,6 +21,7 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.misc.MetadataRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @@ -41,43 +43,25 @@ public class MetadataController { @PostMapping(consumes = "multipart/form-data", value = "/update-metadata") @Operation(summary = "Update metadata of a PDF file", description = "This endpoint allows you to update the metadata of a given PDF file. You can add, modify, or delete standard and custom metadata fields. Input:PDF Output:PDF Type:SISO") - public ResponseEntity metadata( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The input PDF file to update metadata") - MultipartFile pdfFile, - @RequestParam(value = "deleteAll", required = false, defaultValue = "false") - @Parameter(description = "Delete all metadata if set to true") - Boolean deleteAll, - @RequestParam(value = "author", required = false) - @Parameter(description = "The author of the document") - String author, - @RequestParam(value = "creationDate", required = false) - @Parameter(description = "The creation date of the document (format: yyyy/MM/dd HH:mm:ss)") - String creationDate, - @RequestParam(value = "creator", required = false) - @Parameter(description = "The creator of the document") - String creator, - @RequestParam(value = "keywords", required = false) - @Parameter(description = "The keywords for the document") - String keywords, - @RequestParam(value = "modificationDate", required = false) - @Parameter(description = "The modification date of the document (format: yyyy/MM/dd HH:mm:ss)") - String modificationDate, - @RequestParam(value = "producer", required = false) - @Parameter(description = "The producer of the document") - String producer, - @RequestParam(value = "subject", required = false) - @Parameter(description = "The subject of the document") - String subject, - @RequestParam(value = "title", required = false) - @Parameter(description = "The title of the document") - String title, - @RequestParam(value = "trapped", required = false) - @Parameter(description = "The trapped status of the document") - String trapped, - @Parameter(description = "Map list of key and value of custom parameters, note these must start with customKey and customValue if they are non standard") - @RequestParam Map allRequestParams) - throws IOException { + public ResponseEntity metadata(@ModelAttribute MetadataRequest request) throws IOException { + + // Extract PDF file from the request object + MultipartFile pdfFile = request.getFileInput(); + + // Extract metadata information + Boolean deleteAll = request.getDeleteAll(); + String author = request.getAuthor(); + String creationDate = request.getCreationDate(); + String creator = request.getCreator(); + String keywords = request.getKeywords(); + String modificationDate = request.getModificationDate(); + String producer = request.getProducer(); + String subject = request.getSubject(); + String title = request.getTitle(); + String trapped = request.getTrapped(); + + // Extract additional custom parameters + Map allRequestParams = request.getAllRequestParams(); // Load the PDF file into a PDDocument PDDocument document = PDDocument.load(pdfFile.getBytes()); diff --git a/src/main/java/stirling/software/SPDF/model/api/PDFWithImageFormatRequest.java b/src/main/java/stirling/software/SPDF/model/api/PDFWithImageFormatRequest.java new file mode 100644 index 00000000..9766fdbf --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/PDFWithImageFormatRequest.java @@ -0,0 +1,12 @@ +package stirling.software.SPDF.model.api; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Data +public class PDFWithImageFormatRequest extends PDFFile { + + @Schema(description = "The output image format e.g., 'png', 'jpeg', or 'gif'", + allowableValues = { "png", "jpeg", "gif" }) + private String format; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/MetadataRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/MetadataRequest.java new file mode 100644 index 00000000..586f83f5 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/misc/MetadataRequest.java @@ -0,0 +1,44 @@ +package stirling.software.SPDF.model.api.misc; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import stirling.software.SPDF.model.api.PDFFile; + +import java.util.Map; + +@Data +public class MetadataRequest extends PDFFile { + + @Schema(description = "Delete all metadata if set to true") + private Boolean deleteAll; + + @Schema(description = "The author of the document") + private String author; + + @Schema(description = "The creation date of the document (format: yyyy/MM/dd HH:mm:ss)") + private String creationDate; + + @Schema(description = "The creator of the document") + private String creator; + + @Schema(description = "The keywords for the document") + private String keywords; + + @Schema(description = "The modification date of the document (format: yyyy/MM/dd HH:mm:ss)") + private String modificationDate; + + @Schema(description = "The producer of the document") + private String producer; + + @Schema(description = "The subject of the document") + private String subject; + + @Schema(description = "The title of the document") + private String title; + + @Schema(description = "The trapped status of the document") + private String trapped; + + @Schema(description = "Map list of key and value of custom parameters. Note these must start with customKey and customValue if they are non-standard") + private Map allRequestParams; +} From 1f4aae9249413ee2d3f5b288c75b146a10f7a1ff Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 10 Sep 2023 01:10:24 +0100 Subject: [PATCH 06/57] finishing forms --- .../controller/api/misc/OCRController.java | 41 ++++-------- .../api/misc/OverlayImageController.java | 24 +++---- .../api/misc/PageNumbersController.java | 17 ++--- .../controller/api/misc/RepairController.java | 10 +-- .../controller/api/misc/ShowJavascript.java | 7 +- .../api/pipeline/PipelineController.java | 7 +- .../api/security/CertSignController.java | 38 ++++------- .../controller/api/security/GetInfoOnPDF.java | 8 +-- .../api/security/PasswordController.java | 67 ++++++------------- .../api/security/RedactController.java | 18 ++--- .../api/security/SanitizeController.java | 28 +++----- .../api/security/WatermarkController.java | 29 ++++---- .../SPDF/model/api/HandleDataRequest.java | 15 +++++ .../model/api/misc/AddPageNumbersRequest.java | 26 +++++++ .../model/api/misc/OverlayImageRequest.java | 23 +++++++ .../api/misc/ProcessPdfWithOcrRequest.java | 36 ++++++++++ .../api/security/AddPasswordRequest.java | 43 ++++++++++++ .../api/security/AddWatermarkRequest.java | 39 +++++++++++ .../api/security/PDFPasswordRequest.java | 13 ++++ .../model/api/security/RedactPdfRequest.java | 28 ++++++++ .../api/security/SanitizePdfRequest.java | 25 +++++++ .../api/security/SignPDFWithCertRequest.java | 40 +++++++++++ 22 files changed, 403 insertions(+), 179 deletions(-) create mode 100644 src/main/java/stirling/software/SPDF/model/api/HandleDataRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/misc/AddPageNumbersRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/misc/OverlayImageRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/misc/ProcessPdfWithOcrRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/security/AddPasswordRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/security/AddWatermarkRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/security/PDFPasswordRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/security/RedactPdfRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/security/SanitizePdfRequest.java create mode 100644 src/main/java/stirling/software/SPDF/model/api/security/SignPDFWithCertRequest.java diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java index 768493ab..aa25b9b4 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java @@ -18,6 +18,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.MediaType; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -28,6 +29,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.misc.ProcessPdfWithOcrRequest; import stirling.software.SPDF.utils.ProcessExecutor; import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; import stirling.software.SPDF.utils.WebResponseUtils; @@ -51,35 +53,16 @@ public class OCRController { @PostMapping(consumes = "multipart/form-data", value = "/ocr-pdf") @Operation(summary = "Process a PDF file with OCR", description = "This endpoint processes a PDF file using OCR (Optical Character Recognition). Users can specify languages, sidecar, deskew, clean, cleanFinal, ocrType, ocrRenderType, and removeImagesAfter options. Input:PDF Output:PDF Type:SI-Conditional") - public ResponseEntity processPdfWithOCR( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The input PDF file to be processed with OCR") - MultipartFile inputFile, - @RequestParam("languages") - @Parameter(description = "List of languages to use in OCR processing") - List selectedLanguages, - @RequestParam(name = "sidecar", required = false) - @Parameter(description = "Include OCR text in a sidecar text file if set to true") - Boolean sidecar, - @RequestParam(name = "deskew", required = false) - @Parameter(description = "Deskew the input file if set to true") - Boolean deskew, - @RequestParam(name = "clean", required = false) - @Parameter(description = "Clean the input file if set to true") - Boolean clean, - @RequestParam(name = "clean-final", required = false) - @Parameter(description = "Clean the final output if set to true") - Boolean cleanFinal, - @RequestParam(name = "ocrType", required = false) - @Parameter(description = "Specify the OCR type, e.g., 'skip-text', 'force-ocr', or 'Normal'", schema = @Schema(allowableValues = {"skip-text", "force-ocr", "Normal"})) - String ocrType, - @RequestParam(name = "ocrRenderType", required = false, defaultValue = "hocr") - @Parameter(description = "Specify the OCR render type, either 'hocr' or 'sandwich'", schema = @Schema(allowableValues = {"hocr", "sandwich"})) - String ocrRenderType, - @RequestParam(name = "removeImagesAfter", required = false) - @Parameter(description = "Remove images from the output PDF if set to true") - Boolean removeImagesAfter) throws IOException, InterruptedException { - + public ResponseEntity processPdfWithOCR(@ModelAttribute ProcessPdfWithOcrRequest request) throws IOException, InterruptedException { + MultipartFile inputFile = request.getFileInput(); + List selectedLanguages = request.getSelectedLanguages(); + Boolean sidecar = request.getSidecar(); + Boolean deskew = request.getDeskew(); + Boolean clean = request.getClean(); + Boolean cleanFinal = request.getCleanFinal(); + String ocrType = request.getOcrType(); + String ocrRenderType = request.getOcrRenderType(); + Boolean removeImagesAfter = request.getRemoveImagesAfter(); // --output-type pdfa if (selectedLanguages == null || selectedLanguages.isEmpty()) { throw new IOException("Please select at least one language."); 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 975e7628..44c16fd7 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 @@ -6,6 +6,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpStatus; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -15,6 +16,7 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.misc.OverlayImageRequest; import stirling.software.SPDF.utils.PdfUtils; import stirling.software.SPDF.utils.WebResponseUtils; @@ -29,22 +31,12 @@ public class OverlayImageController { 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" ) - public ResponseEntity overlayImage( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The input PDF file to overlay the image onto.", required = true) - MultipartFile pdfFile, - @RequestParam("fileInput2") - @Parameter(description = "The image file to be overlaid onto the PDF.", required = true) - MultipartFile imageFile, - @RequestParam("x") - @Parameter(description = "The x-coordinate at which to place the top-left corner of the image.", example = "0") - float x, - @RequestParam("y") - @Parameter(description = "The y-coordinate at which to place the top-left corner of the image.", example = "0") - float y, - @RequestParam("everyPage") - @Parameter(description = "Whether to overlay the image onto every page of the PDF.", example = "false") - boolean everyPage) { + public ResponseEntity overlayImage(@ModelAttribute OverlayImageRequest request) { + MultipartFile pdfFile = request.getFileInput(); + MultipartFile imageFile = request.getImageFile(); + float x = request.getX(); + float y = request.getY(); + boolean everyPage = request.isEveryPage(); try { byte[] pdfBytes = pdfFile.getBytes(); byte[] imageBytes = imageFile.getBytes(); diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java index 2192d876..d1ecc9df 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java @@ -13,6 +13,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.MediaType; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; @@ -22,6 +23,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.misc.AddPageNumbersRequest; import stirling.software.SPDF.utils.GeneralUtils; import stirling.software.SPDF.utils.WebResponseUtils; @@ -33,14 +35,13 @@ public class PageNumbersController { @PostMapping(value = "/add-page-numbers", consumes = "multipart/form-data") @Operation(summary = "Add page numbers to a PDF document", description = "This operation takes an input PDF file and adds page numbers to it. Input:PDF Output:PDF Type:SISO") - public ResponseEntity addPageNumbers( - @Parameter(description = "The input PDF file", required = true) @RequestParam("fileInput") MultipartFile file, - @Parameter(description = "Custom margin: small/medium/large", required = true, schema = @Schema(type = "string", allowableValues = {"small", "medium", "large"})) @RequestParam("customMargin") String customMargin, - @Parameter(description = "Position: 1 of 9 positions", required = true, schema = @Schema(type = "integer", minimum = "1", maximum = "9")) @RequestParam("position") int position, - @Parameter(description = "Starting number", required = true, schema = @Schema(type = "integer", minimum = "1")) @RequestParam("startingNumber") int startingNumber, - @Parameter(description = "Which pages to number, default all", required = false, schema = @Schema(type = "string")) @RequestParam(value = "pagesToNumber", required = false) String pagesToNumber, - @Parameter(description = "Custom text: defaults to just number but can have things like \"Page {n} of {p}\"", required = false, schema = @Schema(type = "string")) @RequestParam(value = "customText", required = false) String customText) - throws IOException { + public ResponseEntity addPageNumbers(@ModelAttribute AddPageNumbersRequest request) throws IOException { + MultipartFile file = request.getFileInput(); + String customMargin = request.getCustomMargin(); + int position = request.getPosition(); + int startingNumber = request.getStartingNumber(); + String pagesToNumber = request.getPagesToNumber(); + String customText = request.getCustomText(); int pageNumber = startingNumber; byte[] fileBytes = file.getBytes(); PDDocument document = PDDocument.load(fileBytes); diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java index e9983902..819f8f70 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java @@ -9,6 +9,7 @@ import java.util.List; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -17,6 +18,8 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.PDFFile; +import stirling.software.SPDF.model.api.misc.AddPageNumbersRequest; import stirling.software.SPDF.utils.ProcessExecutor; import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; import stirling.software.SPDF.utils.WebResponseUtils; @@ -32,11 +35,8 @@ public class RepairController { summary = "Repair a PDF file", description = "This endpoint repairs a given PDF file by running Ghostscript command. The PDF is first saved to a temporary location, repaired, read back, and then returned as a response. Input:PDF Output:PDF Type:SISO" ) - public ResponseEntity repairPdf( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The input PDF file to be repaired", required = true) - MultipartFile inputFile) throws IOException, InterruptedException { - + public ResponseEntity repairPdf(@ModelAttribute PDFFile request) throws IOException, InterruptedException { + MultipartFile inputFile = request.getFileInput(); // Save the uploaded file to a temporary location Path tempInputFile = Files.createTempFile("input_", ".pdf"); inputFile.transferTo(tempInputFile.toFile()); diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java index 08ac3e1b..d3101ff2 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java @@ -9,12 +9,14 @@ import org.apache.pdfbox.pdmodel.interactive.action.PDActionJavaScript; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @Tag(name = "Other", description = "Other APIs") @@ -22,9 +24,8 @@ public class ShowJavascript { private static final Logger logger = LoggerFactory.getLogger(ShowJavascript.class); @PostMapping(consumes = "multipart/form-data", value = "/show-javascript") - public ResponseEntity extractHeader( - @RequestPart(value = "fileInput") MultipartFile inputFile) throws Exception { - + public ResponseEntity extractHeader(@ModelAttribute PDFFile request) throws Exception { + MultipartFile inputFile = request.getFileInput(); String script = ""; try (PDDocument document = PDDocument.load(inputFile.getInputStream())) { diff --git a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java index d5a50329..0e5d8de3 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java @@ -37,6 +37,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; +import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -51,6 +52,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.ApplicationProperties; import stirling.software.SPDF.model.PipelineConfig; import stirling.software.SPDF.model.PipelineOperation; +import stirling.software.SPDF.model.api.HandleDataRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @@ -418,8 +420,9 @@ public class PipelineController { } @PostMapping("/handleData") - public ResponseEntity handleData(@RequestPart("fileInput") MultipartFile[] files, - @RequestParam("json") String jsonString) { + public ResponseEntity handleData(@ModelAttribute HandleDataRequest request) { + MultipartFile[] files = request.getFileInputs(); + String jsonString = request.getJsonString(); logger.info("Received POST request to /handleData with {} files", files.length); try { List outputFiles = handleFiles(files, jsonString); 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 6392be96..d9eb68a3 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 @@ -44,6 +44,7 @@ import org.bouncycastle.util.io.pem.PemReader; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -54,6 +55,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.security.SignPDFWithCertRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @@ -68,30 +70,18 @@ public class CertSignController { @PostMapping(consumes = "multipart/form-data", value = "/cert-sign") @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") - public ResponseEntity signPDF2( - @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file") MultipartFile pdf, - - @RequestParam(value = "certType", required = false) @Parameter(description = "The type of the digital certificate", schema = @Schema(allowableValues = { - "PKCS12", "PEM" })) String certType, - - @RequestParam(value = "key", required = false) @Parameter(description = "The private key for the digital certificate (required for PEM type certificates)") MultipartFile privateKeyFile, - - @RequestParam(value = "cert", required = false) @Parameter(description = "The digital certificate (required for PEM type certificates)") MultipartFile certFile, - - @RequestParam(value = "p12", required = false) @Parameter(description = "The PKCS12 keystore file (required for PKCS12 type certificates)") MultipartFile p12File, - - @RequestParam(value = "password", required = false) @Parameter(description = "The password for the keystore or the private key") String password, - - @RequestParam(value = "showSignature", required = false) @Parameter(description = "Whether to visually show the signature in the PDF file") Boolean showSignature, - - @RequestParam(value = "reason", required = false) @Parameter(description = "The reason for signing the PDF") String reason, - - @RequestParam(value = "location", required = false) @Parameter(description = "The location where the PDF is signed") String location, - - @RequestParam(value = "name", required = false) @Parameter(description = "The name of the signer") String name, - - @RequestParam(value = "pageNumber", required = false) @Parameter(description = "The page number where the signature should be visible. This is required if showSignature is set to true") Integer pageNumber) - throws Exception { + public ResponseEntity signPDFWithCert(@ModelAttribute SignPDFWithCertRequest request) throws Exception { + MultipartFile pdf = request.getFileInput(); + String certType = request.getCertType(); + MultipartFile privateKeyFile = request.getPrivateKeyFile(); + MultipartFile certFile = request.getCertFile(); + MultipartFile p12File = request.getP12File(); + String password = request.getPassword(); + Boolean showSignature = request.getShowSignature(); + String reason = request.getReason(); + String location = request.getLocation(); + String name = request.getName(); + Integer pageNumber = request.getPageNumber(); PrivateKey privateKey = null; X509Certificate cert = null; diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java b/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java index 1f0e7d62..48f1c655 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java @@ -60,6 +60,7 @@ import org.apache.xmpbox.xml.XmpParsingException; import org.apache.xmpbox.xml.XmpSerializer; import org.springframework.http.MediaType; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -72,6 +73,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @Tag(name = "Security", description = "Security APIs") @@ -81,11 +83,9 @@ public class GetInfoOnPDF { @PostMapping(consumes = "multipart/form-data", value = "/get-info-on-pdf") @Operation(summary = "Summary here", description = "desc. Input:PDF Output:JSON Type:SISO") - public ResponseEntity getPdfInfo( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The input PDF file to get info on", required = true) MultipartFile inputFile) + public ResponseEntity getPdfInfo(@ModelAttribute PDFFile request) throws IOException { - + MultipartFile inputFile = request.getFileInput(); try ( PDDocument pdfBoxDoc = PDDocument.load(inputFile.getInputStream()); ) { diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java b/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java index bcc7e37f..9634143b 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java @@ -8,6 +8,7 @@ import org.apache.pdfbox.pdmodel.encryption.StandardProtectionPolicy; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -18,6 +19,8 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.security.AddPasswordRequest; +import stirling.software.SPDF.model.api.security.PDFPasswordRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @Tag(name = "Security", description = "Security APIs") @@ -31,13 +34,12 @@ public class PasswordController { summary = "Remove password from a PDF file", description = "This endpoint removes the password from a protected PDF file. Users need to provide the existing password. Input:PDF Output:PDF Type:SISO" ) - public ResponseEntity removePassword( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The input PDF file from which the password should be removed", required = true) - MultipartFile fileInput, - @RequestParam(name = "password") - @Parameter(description = "The password of the PDF file", required = true) - String password) throws IOException { + public ResponseEntity removePassword(@ModelAttribute PDFPasswordRequest request) throws IOException { + MultipartFile fileInput = request.getFileInput(); + String password = request.getPassword(); + + + PDDocument document = PDDocument.load(fileInput.getBytes(), password); document.setAllSecurityToBeRemoved(true); return WebResponseUtils.pdfDocToWebResponse(document, fileInput.getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_password_removed.pdf"); @@ -48,44 +50,19 @@ public class PasswordController { summary = "Add password to a PDF file", description = "This endpoint adds password protection to a PDF file. Users can specify a set of permissions that should be applied to the file. Input:PDF Output:PDF" ) - public ResponseEntity addPassword( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The input PDF file to which the password should be added", required = true) - MultipartFile fileInput, - @RequestParam(value = "", name = "ownerPassword", required = false, defaultValue = "") - @Parameter(description = "The owner password to be added to the PDF file (Restricts what can be done with the document once it is opened)") - String ownerPassword, - @RequestParam( name = "password", required = false, defaultValue = "") - @Parameter(description = "The password to be added to the PDF file (Restricts the opening of the document itself.)") - String password, - @RequestParam( name = "keyLength", required = false, defaultValue = "256") - @Parameter(description = "The length of the encryption key", schema = @Schema(allowableValues = {"40", "128", "256"})) - int keyLength, - @RequestParam( name = "canAssembleDocument", required = false) - @Parameter(description = "Whether the document assembly is allowed", example = "false") - boolean canAssembleDocument, - @RequestParam( name = "canExtractContent", required = false) - @Parameter(description = "Whether content extraction for accessibility is allowed", example = "false") - boolean canExtractContent, - @RequestParam( name = "canExtractForAccessibility", required = false) - @Parameter(description = "Whether content extraction for accessibility is allowed", example = "false") - boolean canExtractForAccessibility, - @RequestParam( name = "canFillInForm", required = false) - @Parameter(description = "Whether form filling is allowed", example = "false") - boolean canFillInForm, - @RequestParam( name = "canModify", required = false) - @Parameter(description = "Whether the document modification is allowed", example = "false") - boolean canModify, - @RequestParam( name = "canModifyAnnotations", required = false) - @Parameter(description = "Whether modification of annotations is allowed", example = "false") - boolean canModifyAnnotations, - @RequestParam(name = "canPrint", required = false) - @Parameter(description = "Whether printing of the document is allowed", example = "false") - boolean canPrint, - @RequestParam( name = "canPrintFaithful", required = false) - @Parameter(description = "Whether faithful printing is allowed", example = "false") - boolean canPrintFaithful - ) throws IOException { + public ResponseEntity addPassword(@ModelAttribute AddPasswordRequest request) throws IOException { + MultipartFile fileInput = request.getFileInput(); + String ownerPassword = request.getOwnerPassword(); + String password = request.getPassword(); + int keyLength = request.getKeyLength(); + boolean canAssembleDocument = request.isCanAssembleDocument(); + boolean canExtractContent = request.isCanExtractContent(); + boolean canExtractForAccessibility = request.isCanExtractForAccessibility(); + boolean canFillInForm = request.isCanFillInForm(); + boolean canModify = request.isCanModify(); + boolean canModifyAnnotations = request.isCanModifyAnnotations(); + boolean canPrint = request.isCanPrint(); + boolean canPrintFaithful = request.isCanPrintFaithful(); PDDocument document = PDDocument.load(fileInput.getBytes()); AccessPermission ap = new AccessPermission(); diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java b/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java index 006968ae..6c0a5526 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java @@ -18,6 +18,7 @@ import org.apache.pdfbox.rendering.PDFRenderer; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; @@ -28,6 +29,7 @@ import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.PDFText; +import stirling.software.SPDF.model.api.security.RedactPdfRequest; import stirling.software.SPDF.pdf.TextFinder; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @@ -40,14 +42,14 @@ public class RedactController { @PostMapping(value = "/auto-redact", consumes = "multipart/form-data") @Operation(summary = "Redacts listOfText in a PDF document", description = "This operation takes an input PDF file and redacts the provided listOfText. Input:PDF, Output:PDF, Type:SISO") - public ResponseEntity redactPdf( - @Parameter(description = "The input PDF file", required = true) @RequestParam("fileInput") MultipartFile file, - @Parameter(description = "List of listOfText to redact from the PDF", required = true, schema = @Schema(type = "string")) @RequestParam("listOfText") String listOfTextString, - @RequestParam(value = "useRegex", required = false) boolean useRegex, - @RequestParam(value = "wholeWordSearch", required = false) boolean wholeWordSearchBool, - @RequestParam(value = "redactColor", required = false, defaultValue = "#000000") String colorString, - @RequestParam(value = "customPadding", required = false) float customPadding, - @RequestParam(value = "convertPDFToImage", required = false) boolean convertPDFToImage) throws Exception { + public ResponseEntity redactPdf(@ModelAttribute RedactPdfRequest request) throws Exception { + MultipartFile file = request.getFileInput(); + String listOfTextString = request.getListOfText(); + boolean useRegex = request.isUseRegex(); + boolean wholeWordSearchBool = request.isWholeWordSearch(); + String colorString = request.getRedactColor(); + float customPadding = request.getCustomPadding(); + boolean convertPDFToImage = request.isConvertPDFToImage(); System.out.println(listOfTextString); String[] listOfText = listOfTextString.split("\n"); diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java b/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java index fa49c6ad..ccf088de 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java @@ -20,6 +20,7 @@ import org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget; import org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm; import org.apache.pdfbox.pdmodel.interactive.form.PDField; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -28,6 +29,7 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; +import stirling.software.SPDF.model.api.security.SanitizePdfRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @@ -36,25 +38,13 @@ public class SanitizeController { @PostMapping(consumes = "multipart/form-data", value = "/sanitize-pdf") @Operation(summary = "Sanitize a PDF file", description = "This endpoint processes a PDF file and removes specific elements based on the provided options. Input:PDF Output:PDF Type:SISO") - public ResponseEntity sanitizePDF( - @RequestPart(required = true, value = "fileInput") - @Parameter(description = "The input PDF file to be sanitized") - MultipartFile inputFile, - @RequestParam(name = "removeJavaScript", required = false, defaultValue = "false") - @Parameter(description = "Remove JavaScript actions from the PDF if set to true") - Boolean removeJavaScript, - @RequestParam(name = "removeEmbeddedFiles", required = false, defaultValue = "false") - @Parameter(description = "Remove embedded files from the PDF if set to true") - Boolean removeEmbeddedFiles, - @RequestParam(name = "removeMetadata", required = false, defaultValue = "false") - @Parameter(description = "Remove metadata from the PDF if set to true") - Boolean removeMetadata, - @RequestParam(name = "removeLinks", required = false, defaultValue = "false") - @Parameter(description = "Remove links from the PDF if set to true") - Boolean removeLinks, - @RequestParam(name = "removeFonts", required = false, defaultValue = "false") - @Parameter(description = "Remove fonts from the PDF if set to true") - Boolean removeFonts) throws IOException { + public ResponseEntity sanitizePDF(@ModelAttribute SanitizePdfRequest request) throws IOException { + MultipartFile inputFile = request.getFileInput(); + Boolean removeJavaScript = request.getRemoveJavaScript(); + Boolean removeEmbeddedFiles = request.getRemoveEmbeddedFiles(); + Boolean removeMetadata = request.getRemoveMetadata(); + Boolean removeLinks = request.getRemoveLinks(); + Boolean removeFonts = request.getRemoveFonts(); try (PDDocument document = PDDocument.load(inputFile.getInputStream())) { if (removeJavaScript) { diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java b/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java index efc263f5..a46f4ff4 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java @@ -22,6 +22,7 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; @@ -32,6 +33,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; +import stirling.software.SPDF.model.api.security.AddWatermarkRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @@ -40,22 +42,17 @@ public class WatermarkController { @PostMapping(consumes = "multipart/form-data", value = "/add-watermark") @Operation(summary = "Add watermark to a PDF file", description = "This endpoint adds a watermark 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 addWatermark( - @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file to add a watermark") MultipartFile pdfFile, - @RequestParam(required = true) @Parameter(description = "The watermark type (text or image)") String watermarkType, - @RequestParam(required = false) @Parameter(description = "The watermark text") String watermarkText, - @RequestPart(required = false) @Parameter(description = "The watermark image") MultipartFile watermarkImage, - - @RequestParam(defaultValue = "roman", name = "alphabet") @Parameter(description = "The selected alphabet", - schema = @Schema(type = "string", - allowableValues = {"roman","arabic","japanese","korean","chinese"}, - defaultValue = "roman")) String alphabet, - @RequestParam(defaultValue = "30", name = "fontSize") @Parameter(description = "The font size of the watermark text", example = "30") float fontSize, - @RequestParam(defaultValue = "0", name = "rotation") @Parameter(description = "The rotation of the watermark in degrees", example = "0") float rotation, - @RequestParam(defaultValue = "0.5", name = "opacity") @Parameter(description = "The opacity of the watermark (0.0 - 1.0)", example = "0.5") float opacity, - @RequestParam(defaultValue = "50", name = "widthSpacer") @Parameter(description = "The width spacer between watermark elements", example = "50") int widthSpacer, - @RequestParam(defaultValue = "50", name = "heightSpacer") @Parameter(description = "The height spacer between watermark elements", example = "50") int heightSpacer) - throws IOException, Exception { + public ResponseEntity addWatermark(@ModelAttribute AddWatermarkRequest request) throws IOException, Exception { + MultipartFile pdfFile = request.getFileInput(); + String watermarkType = request.getWatermarkType(); + String watermarkText = request.getWatermarkText(); + MultipartFile watermarkImage = request.getWatermarkImage(); + String alphabet = request.getAlphabet(); + float fontSize = request.getFontSize(); + float rotation = request.getRotation(); + float opacity = request.getOpacity(); + int widthSpacer = request.getWidthSpacer(); + int heightSpacer = request.getHeightSpacer(); // Load the input PDF PDDocument document = PDDocument.load(pdfFile.getInputStream()); diff --git a/src/main/java/stirling/software/SPDF/model/api/HandleDataRequest.java b/src/main/java/stirling/software/SPDF/model/api/HandleDataRequest.java new file mode 100644 index 00000000..d22c8f67 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/HandleDataRequest.java @@ -0,0 +1,15 @@ +package stirling.software.SPDF.model.api; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.web.multipart.MultipartFile; + +@Data +public class HandleDataRequest { + + @Schema(description = "The input files") + private MultipartFile[] fileInputs; + + @Schema(description = "JSON String") + private String jsonString; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/AddPageNumbersRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/AddPageNumbersRequest.java new file mode 100644 index 00000000..e258b59a --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/misc/AddPageNumbersRequest.java @@ -0,0 +1,26 @@ +package stirling.software.SPDF.model.api.misc; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import stirling.software.SPDF.model.api.PDFWithPageNums; + +import org.springframework.web.multipart.MultipartFile; + +@Data +public class AddPageNumbersRequest extends PDFWithPageNums { + + @Schema(description = "Custom margin: small/medium/large", allowableValues = {"small", "medium", "large"}) + private String customMargin; + + @Schema(description = "Position: 1 of 9 positions", minimum = "1", maximum = "9") + private int position; + + @Schema(description = "Starting number", minimum = "1") + private int startingNumber; + + @Schema(description = "Which pages to number, default all") + private String pagesToNumber; + + @Schema(description = "Custom text: defaults to just number but can have things like \"Page {n} of {p}\"") + private String customText; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/OverlayImageRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/OverlayImageRequest.java new file mode 100644 index 00000000..29350519 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/misc/OverlayImageRequest.java @@ -0,0 +1,23 @@ +package stirling.software.SPDF.model.api.misc; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import stirling.software.SPDF.model.api.PDFFile; + +import org.springframework.web.multipart.MultipartFile; + +@Data +public class OverlayImageRequest extends PDFFile { + + @Schema(description = "The image file to be overlaid onto the PDF.") + private MultipartFile imageFile; + + @Schema(description = "The x-coordinate at which to place the top-left corner of the image.", example = "0") + private float x; + + @Schema(description = "The y-coordinate at which to place the top-left corner of the image.", example = "0") + private float y; + + @Schema(description = "Whether to overlay the image onto every page of the PDF.", example = "false") + private boolean everyPage; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/ProcessPdfWithOcrRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/ProcessPdfWithOcrRequest.java new file mode 100644 index 00000000..a332a7ff --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/misc/ProcessPdfWithOcrRequest.java @@ -0,0 +1,36 @@ +package stirling.software.SPDF.model.api.misc; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.web.multipart.MultipartFile; +import stirling.software.SPDF.model.api.PDFFile; + +import java.util.List; + +@Data +public class ProcessPdfWithOcrRequest extends PDFFile { + + @Schema(description = "List of languages to use in OCR processing") + private List selectedLanguages; + + @Schema(description = "Include OCR text in a sidecar text file if set to true") + private Boolean sidecar; + + @Schema(description = "Deskew the input file if set to true") + private Boolean deskew; + + @Schema(description = "Clean the input file if set to true") + private Boolean clean; + + @Schema(description = "Clean the final output if set to true") + private Boolean cleanFinal; + + @Schema(description = "Specify the OCR type, e.g., 'skip-text', 'force-ocr', or 'Normal'", allowableValues = {"skip-text", "force-ocr", "Normal"}) + private String ocrType; + + @Schema(description = "Specify the OCR render type, either 'hocr' or 'sandwich'", allowableValues = {"hocr", "sandwich"}, defaultValue = "hocr") + private String ocrRenderType; + + @Schema(description = "Remove images from the output PDF if set to true") + private Boolean removeImagesAfter; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/security/AddPasswordRequest.java b/src/main/java/stirling/software/SPDF/model/api/security/AddPasswordRequest.java new file mode 100644 index 00000000..60bbcc6b --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/security/AddPasswordRequest.java @@ -0,0 +1,43 @@ +package stirling.software.SPDF.model.api.security; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.web.multipart.MultipartFile; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class AddPasswordRequest extends PDFFile { + + @Schema(description = "The owner password to be added to the PDF file (Restricts what can be done with the document once it is opened)", defaultValue = "") + private String ownerPassword; + + @Schema(description = "The password to be added to the PDF file (Restricts the opening of the document itself.)", defaultValue = "") + private String password; + + @Schema(description = "The length of the encryption key", allowableValues = {"40", "128", "256"}, defaultValue = "256") + private int keyLength; + + @Schema(description = "Whether the document assembly is allowed", example = "false") + private boolean canAssembleDocument; + + @Schema(description = "Whether content extraction for accessibility is allowed", example = "false") + private boolean canExtractContent; + + @Schema(description = "Whether content extraction for accessibility is allowed", example = "false") + private boolean canExtractForAccessibility; + + @Schema(description = "Whether form filling is allowed", example = "false") + private boolean canFillInForm; + + @Schema(description = "Whether the document modification is allowed", example = "false") + private boolean canModify; + + @Schema(description = "Whether modification of annotations is allowed", example = "false") + private boolean canModifyAnnotations; + + @Schema(description = "Whether printing of the document is allowed", example = "false") + private boolean canPrint; + + @Schema(description = "Whether faithful printing is allowed", example = "false") + private boolean canPrintFaithful; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/security/AddWatermarkRequest.java b/src/main/java/stirling/software/SPDF/model/api/security/AddWatermarkRequest.java new file mode 100644 index 00000000..42d34af4 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/security/AddWatermarkRequest.java @@ -0,0 +1,39 @@ +package stirling.software.SPDF.model.api.security; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.web.multipart.MultipartFile; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class AddWatermarkRequest extends PDFFile { + + @Schema(description = "The watermark type (text or image)", required = true) + private String watermarkType; + + @Schema(description = "The watermark text") + private String watermarkText; + + @Schema(description = "The watermark image") + private MultipartFile watermarkImage; + + @Schema(description = "The selected alphabet", + allowableValues = {"roman", "arabic", "japanese", "korean", "chinese"}, + defaultValue = "roman") + private String alphabet; + + @Schema(description = "The font size of the watermark text", example = "30") + private float fontSize; + + @Schema(description = "The rotation of the watermark in degrees", example = "0") + private float rotation; + + @Schema(description = "The opacity of the watermark (0.0 - 1.0)", example = "0.5") + private float opacity; + + @Schema(description = "The width spacer between watermark elements", example = "50") + private int widthSpacer; + + @Schema(description = "The height spacer between watermark elements", example = "50") + private int heightSpacer; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/security/PDFPasswordRequest.java b/src/main/java/stirling/software/SPDF/model/api/security/PDFPasswordRequest.java new file mode 100644 index 00000000..c1acd32c --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/security/PDFPasswordRequest.java @@ -0,0 +1,13 @@ +package stirling.software.SPDF.model.api.security; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.web.multipart.MultipartFile; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class PDFPasswordRequest extends PDFFile { + + @Schema(description = "The password of the PDF file", required = true) + private String password; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/security/RedactPdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/security/RedactPdfRequest.java new file mode 100644 index 00000000..fff02ff5 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/security/RedactPdfRequest.java @@ -0,0 +1,28 @@ +package stirling.software.SPDF.model.api.security; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.web.multipart.MultipartFile; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class RedactPdfRequest extends PDFFile { + + @Schema(description = "List of text to redact from the PDF", type = "string", required = true) + private String listOfText; + + @Schema(description = "Whether to use regex for the listOfText", defaultValue = "false") + private boolean useRegex; + + @Schema(description = "Whether to use whole word search", defaultValue = "false") + private boolean wholeWordSearch; + + @Schema(description = "The color for redaction", defaultValue = "#000000") + private String redactColor; + + @Schema(description = "Custom padding for redaction", type = "number") + private float customPadding; + + @Schema(description = "Convert the redacted PDF to an image", defaultValue = "false") + private boolean convertPDFToImage; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/security/SanitizePdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/security/SanitizePdfRequest.java new file mode 100644 index 00000000..280f2021 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/security/SanitizePdfRequest.java @@ -0,0 +1,25 @@ +package stirling.software.SPDF.model.api.security; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.web.multipart.MultipartFile; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class SanitizePdfRequest extends PDFFile { + + @Schema(description = "Remove JavaScript actions from the PDF", defaultValue = "false") + private Boolean removeJavaScript; + + @Schema(description = "Remove embedded files from the PDF", defaultValue = "false") + private Boolean removeEmbeddedFiles; + + @Schema(description = "Remove metadata from the PDF", defaultValue = "false") + private Boolean removeMetadata; + + @Schema(description = "Remove links from the PDF", defaultValue = "false") + private Boolean removeLinks; + + @Schema(description = "Remove fonts from the PDF", defaultValue = "false") + private Boolean removeFonts; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/security/SignPDFWithCertRequest.java b/src/main/java/stirling/software/SPDF/model/api/security/SignPDFWithCertRequest.java new file mode 100644 index 00000000..5344bf4d --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/security/SignPDFWithCertRequest.java @@ -0,0 +1,40 @@ +package stirling.software.SPDF.model.api.security; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.web.multipart.MultipartFile; +import stirling.software.SPDF.model.api.PDFFile; + +@Data +public class SignPDFWithCertRequest extends PDFFile { + + @Schema(description = "The type of the digital certificate", allowableValues = { "PKCS12", "PEM" }) + private String certType; + + @Schema(description = "The private key for the digital certificate (required for PEM type certificates)") + private MultipartFile privateKeyFile; + + @Schema(description = "The digital certificate (required for PEM type certificates)") + private MultipartFile certFile; + + @Schema(description = "The PKCS12 keystore file (required for PKCS12 type certificates)") + private MultipartFile p12File; + + @Schema(description = "The password for the keystore or the private key") + private String password; + + @Schema(description = "Whether to visually show the signature in the PDF file") + private Boolean showSignature; + + @Schema(description = "The reason for signing the PDF") + private String reason; + + @Schema(description = "The location where the PDF is signed") + private String location; + + @Schema(description = "The name of the signer") + private String name; + + @Schema(description = "The page number where the signature should be visible. This is required if showSignature is set to true") + private Integer pageNumber; +} From 80b4c67e3547f9f81d9647d7c0d72afa83d55b0c Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 10 Sep 2023 09:24:20 +0100 Subject: [PATCH 07/57] super call --- .../software/SPDF/controller/api/CropController.java | 4 ---- .../software/SPDF/controller/api/MergeController.java | 5 ----- .../controller/api/MultiPageLayoutController.java | 3 --- .../controller/api/RearrangePagesPDFController.java | 5 ++--- .../SPDF/controller/api/RotationController.java | 3 --- .../SPDF/controller/api/ScalePagesController.java | 3 --- .../SPDF/controller/api/SplitPDFController.java | 4 ---- .../SPDF/controller/api/ToSinglePageController.java | 3 --- .../controller/api/converters/ConvertEpubToPdf.java | 2 -- .../controller/api/converters/ConvertHtmlToPDF.java | 3 --- .../api/converters/ConvertImgPDFController.java | 4 ---- .../api/converters/ConvertMarkdownToPdf.java | 3 --- .../api/converters/ConvertOfficeController.java | 2 -- .../controller/api/converters/ConvertPDFToOffice.java | 5 ----- .../controller/api/converters/ConvertPDFToPDFA.java | 3 --- .../api/converters/ConvertWebsiteToPDF.java | 2 -- .../SPDF/controller/api/filters/FilterController.java | 3 --- .../controller/api/misc/AutoRenameController.java | 3 --- .../controller/api/misc/AutoSplitPdfController.java | 2 -- .../SPDF/controller/api/misc/BlankPageController.java | 3 --- .../SPDF/controller/api/misc/CompressController.java | 4 ---- .../api/misc/ExtractImageScansController.java | 8 ++------ .../controller/api/misc/ExtractImagesController.java | 4 ---- .../controller/api/misc/FakeScanControllerWIP.java | 2 -- .../SPDF/controller/api/misc/MetadataController.java | 3 --- .../SPDF/controller/api/misc/OCRController.java | 4 ---- .../controller/api/misc/OverlayImageController.java | 3 --- .../controller/api/misc/PageNumbersController.java | 3 --- .../SPDF/controller/api/misc/RepairController.java | 3 --- .../SPDF/controller/api/misc/ShowJavascript.java | 1 - .../controller/api/pipeline/PipelineController.java | 2 -- .../controller/api/security/CertSignController.java | 4 ---- .../SPDF/controller/api/security/GetInfoOnPDF.java | 2 -- .../controller/api/security/PasswordController.java | 4 ---- .../controller/api/security/RedactController.java | 3 --- .../controller/api/security/SanitizeController.java | 3 --- .../controller/api/security/WatermarkController.java | 4 ---- .../SPDF/controller/web/GeneralWebController.java | 4 +++- .../stirling/software/SPDF/model/api/GeneralFile.java | 4 ++++ .../software/SPDF/model/api/HandleDataRequest.java | 7 ++++++- .../stirling/software/SPDF/model/api/ImageFile.java | 4 ++++ .../software/SPDF/model/api/MultiplePDFFiles.java | 4 ++++ .../software/SPDF/model/api/PDFComparison.java | 7 ++----- .../SPDF/model/api/PDFComparisonAndCount.java | 7 ++----- .../stirling/software/SPDF/model/api/PDFFile.java | 2 ++ .../SPDF/model/api/PDFWithImageFormatRequest.java | 2 ++ .../software/SPDF/model/api/PDFWithPageNums.java | 3 +++ .../model/api/converters/ConvertToImageRequest.java | 3 ++- .../model/api/converters/ConvertToPdfRequest.java | 5 ++++- .../api/converters/PdfToPresentationRequest.java | 3 ++- .../model/api/converters/PdfToTextOrRTFRequest.java | 2 ++ .../SPDF/model/api/converters/PdfToWordRequest.java | 2 ++ .../SPDF/model/api/converters/UrlToPdfRequest.java | 2 ++ .../SPDF/model/api/filter/ContainsTextRequest.java | 2 ++ .../SPDF/model/api/filter/FileSizeRequest.java | 3 ++- .../SPDF/model/api/filter/PageRotationRequest.java | 3 ++- .../SPDF/model/api/filter/PageSizeRequest.java | 3 ++- .../software/SPDF/model/api/general/CropPdfForm.java | 8 +++----- .../model/api/general/MergeMultiplePagesRequest.java | 2 ++ .../SPDF/model/api/general/MergePdfsRequest.java | 2 ++ .../SPDF/model/api/general/RearrangePagesRequest.java | 6 +++--- .../SPDF/model/api/general/RotatePDFRequest.java | 3 ++- .../SPDF/model/api/general/ScalePagesRequest.java | 3 ++- .../SPDF/model/api/misc/AddPageNumbersRequest.java | 4 ++-- .../SPDF/model/api/misc/AutoSplitPdfRequest.java | 2 ++ .../SPDF/model/api/misc/ExtractHeaderRequest.java | 2 ++ .../SPDF/model/api/misc/ExtractImageScansRequest.java | 2 ++ .../software/SPDF/model/api/misc/MetadataRequest.java | 10 ++++++---- .../SPDF/model/api/misc/OptimizePdfRequest.java | 2 ++ .../SPDF/model/api/misc/OverlayImageRequest.java | 10 ++++++---- .../SPDF/model/api/misc/ProcessPdfWithOcrRequest.java | 11 ++++++----- .../SPDF/model/api/misc/RemoveBlankPagesRequest.java | 2 ++ .../SPDF/model/api/security/AddPasswordRequest.java | 3 ++- .../SPDF/model/api/security/AddWatermarkRequest.java | 5 ++++- .../SPDF/model/api/security/PDFPasswordRequest.java | 3 ++- .../SPDF/model/api/security/RedactPdfRequest.java | 3 ++- .../SPDF/model/api/security/SanitizePdfRequest.java | 3 ++- .../model/api/security/SignPDFWithCertRequest.java | 5 ++++- 78 files changed, 118 insertions(+), 167 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/controller/api/CropController.java b/src/main/java/stirling/software/SPDF/controller/api/CropController.java index 38d68420..008f21bf 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/CropController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/CropController.java @@ -15,13 +15,9 @@ 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.RequestParam; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.general.CropPdfForm; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/MergeController.java b/src/main/java/stirling/software/SPDF/controller/api/MergeController.java index 03bf4066..df0e553b 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/MergeController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/MergeController.java @@ -17,16 +17,11 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; -import stirling.software.SPDF.model.api.general.CropPdfForm; import stirling.software.SPDF.model.api.general.MergePdfsRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java b/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java index 12c262cd..99558886 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java @@ -16,13 +16,10 @@ 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.RequestParam; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.general.MergeMultiplePagesRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java b/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java index 294df38d..6d8a7a8f 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java @@ -18,12 +18,11 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; -import stirling.software.SPDF.utils.GeneralUtils; -import stirling.software.SPDF.utils.WebResponseUtils; import stirling.software.SPDF.model.SortTypes; import stirling.software.SPDF.model.api.general.RearrangePagesRequest; +import stirling.software.SPDF.utils.GeneralUtils; +import stirling.software.SPDF.utils.WebResponseUtils; @RestController @Tag(name = "General", description = "General APIs") public class RearrangePagesPDFController { diff --git a/src/main/java/stirling/software/SPDF/controller/api/RotationController.java b/src/main/java/stirling/software/SPDF/controller/api/RotationController.java index ef32df4e..04011ee9 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/RotationController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/RotationController.java @@ -10,13 +10,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.general.RotatePDFRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java b/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java index 2dcb26af..2a102858 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java @@ -17,13 +17,10 @@ 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.RequestParam; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.general.ScalePagesRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java b/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java index fe3a1cc5..90279962 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java @@ -19,16 +19,12 @@ import org.springframework.http.MediaType; 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFWithPageNums; -import stirling.software.SPDF.utils.GeneralUtils; import stirling.software.SPDF.utils.WebResponseUtils; @RestController diff --git a/src/main/java/stirling/software/SPDF/controller/api/ToSinglePageController.java b/src/main/java/stirling/software/SPDF/controller/api/ToSinglePageController.java index ea64d55b..f645c319 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/ToSinglePageController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/ToSinglePageController.java @@ -15,12 +15,9 @@ 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.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertEpubToPdf.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertEpubToPdf.java index 77262cce..366eb8da 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertEpubToPdf.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertEpubToPdf.java @@ -16,7 +16,6 @@ import javax.xml.parsers.DocumentBuilderFactory; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import org.w3c.dom.Document; @@ -28,7 +27,6 @@ import io.swagger.v3.oas.annotations.Hidden; 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.PDFFile; import stirling.software.SPDF.utils.FileToPdf; import stirling.software.SPDF.utils.WebResponseUtils; 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 d9308d09..a333e2f1 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 @@ -1,11 +1,8 @@ package stirling.software.SPDF.controller.api.converters; -import java.io.IOException; - 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; 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 5a4dab2c..e24df3a2 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 @@ -13,14 +13,10 @@ import org.springframework.http.MediaType; 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.converters.ConvertToImageRequest; import stirling.software.SPDF.model.api.converters.ConvertToPdfRequest; 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 02ff1e27..87c831ad 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 @@ -1,14 +1,11 @@ package stirling.software.SPDF.controller.api.converters; -import java.io.IOException; - import org.commonmark.node.Node; import org.commonmark.parser.Parser; import org.commonmark.renderer.html.HtmlRenderer; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertOfficeController.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertOfficeController.java index 9ee5cdd5..8f732e58 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertOfficeController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertOfficeController.java @@ -12,12 +12,10 @@ import org.apache.commons.io.FilenameUtils; 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.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.GeneralFile; import stirling.software.SPDF.utils.ProcessExecutor; diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToOffice.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToOffice.java index b61549ff..40cdc6d5 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToOffice.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToOffice.java @@ -5,16 +5,11 @@ import java.io.IOException; 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; -import stirling.software.SPDF.model.api.GeneralFile; import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.model.api.converters.PdfToPresentationRequest; import stirling.software.SPDF.model.api.converters.PdfToTextOrRTFRequest; diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToPDFA.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToPDFA.java index ca83d4ed..7e95e311 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToPDFA.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToPDFA.java @@ -1,6 +1,5 @@ package stirling.software.SPDF.controller.api.converters; -import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; @@ -9,12 +8,10 @@ import java.util.List; 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.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.utils.ProcessExecutor; diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java index 3d4fd368..f9d8e584 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java @@ -9,11 +9,9 @@ import java.util.List; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.converters.UrlToPdfRequest; import stirling.software.SPDF.utils.GeneralUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/filters/FilterController.java b/src/main/java/stirling/software/SPDF/controller/api/filters/FilterController.java index dbb20bfe..ce3fc651 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/filters/FilterController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/filters/FilterController.java @@ -8,13 +8,10 @@ import org.apache.pdfbox.pdmodel.common.PDRectangle; 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.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFComparisonAndCount; import stirling.software.SPDF.model.api.PDFWithPageNums; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java index 8059062c..c1f204ba 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java @@ -13,13 +13,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.ExtractHeaderRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/AutoSplitPdfController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoSplitPdfController.java index 3ba81f78..59a2777f 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/AutoSplitPdfController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoSplitPdfController.java @@ -18,7 +18,6 @@ import org.springframework.http.MediaType; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -31,7 +30,6 @@ import com.google.zxing.Result; import com.google.zxing.common.HybridBinarizer; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; import stirling.software.SPDF.model.api.misc.AutoSplitPdfRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/BlankPageController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/BlankPageController.java index 5107d8c0..a8025af9 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/BlankPageController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/BlankPageController.java @@ -22,13 +22,10 @@ import org.springframework.http.HttpStatus; 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.RemoveBlankPagesRequest; import stirling.software.SPDF.utils.PdfUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java index 89147056..188689a1 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java @@ -24,14 +24,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.OptimizePdfRequest; import stirling.software.SPDF.utils.GeneralUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java index 5a1bbf8a..51c02084 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java @@ -24,21 +24,17 @@ import org.slf4j.LoggerFactory; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.parameters.RequestBody; -import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.ExtractImageScansRequest; import stirling.software.SPDF.utils.ProcessExecutor; import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; import stirling.software.SPDF.utils.WebResponseUtils; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; @RestController @Tag(name = "Other", description = "Other APIs") public class ExtractImageScansController { diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java index 91bbff09..ac6b1b99 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java @@ -22,14 +22,10 @@ import org.springframework.http.MediaType; 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFWithImageFormatRequest; import stirling.software.SPDF.utils.WebResponseUtils; 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 70fc2e88..270f9615 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 @@ -32,13 +32,11 @@ 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.Hidden; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java index aa9b5395..3b3ccb5c 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java @@ -13,13 +13,10 @@ import org.apache.pdfbox.pdmodel.PDDocumentInformation; 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.MetadataRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java index aa25b9b4..8c646809 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java @@ -20,14 +20,10 @@ import org.springframework.http.MediaType; 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.ProcessPdfWithOcrRequest; import stirling.software.SPDF.utils.ProcessExecutor; 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 44c16fd7..47829221 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 @@ -8,13 +8,10 @@ import org.springframework.http.HttpStatus; 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.OverlayImageRequest; import stirling.software.SPDF.utils.PdfUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java index d1ecc9df..cee21db8 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java @@ -15,13 +15,10 @@ import org.springframework.http.MediaType; 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.RequestParam; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.AddPageNumbersRequest; import stirling.software.SPDF.utils.GeneralUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java index 819f8f70..f713d4b1 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java @@ -11,15 +11,12 @@ 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.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFFile; -import stirling.software.SPDF.model.api.misc.AddPageNumbersRequest; import stirling.software.SPDF.utils.ProcessExecutor; import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java index d3101ff2..9558115c 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java @@ -11,7 +11,6 @@ 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; diff --git a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java index 0e5d8de3..f300b0a6 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java @@ -39,8 +39,6 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; import org.springframework.web.multipart.MultipartFile; 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 d9eb68a3..a5054a6c 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 @@ -46,14 +46,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.security.SignPDFWithCertRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java b/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java index 48f1c655..53c9744e 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java @@ -62,7 +62,6 @@ import org.springframework.http.MediaType; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -71,7 +70,6 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java b/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java index 9634143b..ad323849 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java @@ -10,14 +10,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.security.AddPasswordRequest; import stirling.software.SPDF.model.api.security.PDFPasswordRequest; diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java b/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java index 6c0a5526..2f946ec4 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java @@ -20,13 +20,10 @@ 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.RequestParam; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.PDFText; import stirling.software.SPDF.model.api.security.RedactPdfRequest; diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java b/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java index ccf088de..33afd430 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java @@ -22,13 +22,10 @@ import org.apache.pdfbox.pdmodel.interactive.form.PDField; 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; import stirling.software.SPDF.model.api.security.SanitizePdfRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java b/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java index a46f4ff4..2fe52ab1 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java @@ -24,14 +24,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.security.AddWatermarkRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java b/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java index e04626da..2571c785 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java +++ b/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java @@ -21,6 +21,7 @@ import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; +import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import io.swagger.v3.oas.annotations.Hidden; @@ -51,7 +52,8 @@ public class GeneralWebController { } List> pipelineConfigsWithNames = new ArrayList<>(); for (String config : pipelineConfigs) { - Map jsonContent = new ObjectMapper().readValue(config, Map.class); + Map jsonContent = new ObjectMapper().readValue(config, new TypeReference>(){}); + String name = (String) jsonContent.get("name"); Map configWithName = new HashMap<>(); configWithName.put("json", config); diff --git a/src/main/java/stirling/software/SPDF/model/api/GeneralFile.java b/src/main/java/stirling/software/SPDF/model/api/GeneralFile.java index 84710585..441d904a 100644 --- a/src/main/java/stirling/software/SPDF/model/api/GeneralFile.java +++ b/src/main/java/stirling/software/SPDF/model/api/GeneralFile.java @@ -4,8 +4,12 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; @Data +@EqualsAndHashCode +@NoArgsConstructor public class GeneralFile { @Schema(description = "The input file") diff --git a/src/main/java/stirling/software/SPDF/model/api/HandleDataRequest.java b/src/main/java/stirling/software/SPDF/model/api/HandleDataRequest.java index d22c8f67..1d7a8afe 100644 --- a/src/main/java/stirling/software/SPDF/model/api/HandleDataRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/HandleDataRequest.java @@ -1,10 +1,15 @@ package stirling.software.SPDF.model.api; +import org.springframework.web.multipart.MultipartFile; + import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import org.springframework.web.multipart.MultipartFile; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; @Data +@NoArgsConstructor +@EqualsAndHashCode public class HandleDataRequest { @Schema(description = "The input files") diff --git a/src/main/java/stirling/software/SPDF/model/api/ImageFile.java b/src/main/java/stirling/software/SPDF/model/api/ImageFile.java index 8c4c0cff..02079843 100644 --- a/src/main/java/stirling/software/SPDF/model/api/ImageFile.java +++ b/src/main/java/stirling/software/SPDF/model/api/ImageFile.java @@ -4,8 +4,12 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; @Data +@NoArgsConstructor +@EqualsAndHashCode public class ImageFile { @Schema(description = "The input image file") private MultipartFile fileInput; diff --git a/src/main/java/stirling/software/SPDF/model/api/MultiplePDFFiles.java b/src/main/java/stirling/software/SPDF/model/api/MultiplePDFFiles.java index 17bec404..937a4265 100644 --- a/src/main/java/stirling/software/SPDF/model/api/MultiplePDFFiles.java +++ b/src/main/java/stirling/software/SPDF/model/api/MultiplePDFFiles.java @@ -4,7 +4,11 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; @Data +@NoArgsConstructor +@EqualsAndHashCode public class MultiplePDFFiles { @Schema(description = "The input PDF files", type = "array", format = "binary") private MultipartFile[] fileInput; diff --git a/src/main/java/stirling/software/SPDF/model/api/PDFComparison.java b/src/main/java/stirling/software/SPDF/model/api/PDFComparison.java index 5d7871b0..1f902d88 100644 --- a/src/main/java/stirling/software/SPDF/model/api/PDFComparison.java +++ b/src/main/java/stirling/software/SPDF/model/api/PDFComparison.java @@ -1,15 +1,12 @@ package stirling.software.SPDF.model.api; -import java.io.IOException; -import java.util.List; - -import org.apache.pdfbox.pdmodel.PDDocument; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import stirling.software.SPDF.utils.GeneralUtils; @Data @NoArgsConstructor +@EqualsAndHashCode(callSuper=true) public class PDFComparison extends PDFFile { @Schema(description = "The comparison type, accepts Greater, Equal, Less than", allowableValues = { diff --git a/src/main/java/stirling/software/SPDF/model/api/PDFComparisonAndCount.java b/src/main/java/stirling/software/SPDF/model/api/PDFComparisonAndCount.java index 8779ba57..14462f0a 100644 --- a/src/main/java/stirling/software/SPDF/model/api/PDFComparisonAndCount.java +++ b/src/main/java/stirling/software/SPDF/model/api/PDFComparisonAndCount.java @@ -1,15 +1,12 @@ package stirling.software.SPDF.model.api; -import java.io.IOException; -import java.util.List; - -import org.apache.pdfbox.pdmodel.PDDocument; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import stirling.software.SPDF.utils.GeneralUtils; @Data @NoArgsConstructor +@EqualsAndHashCode(callSuper=true) public class PDFComparisonAndCount extends PDFComparison { @Schema(description = "Count") private String pageCount; diff --git a/src/main/java/stirling/software/SPDF/model/api/PDFFile.java b/src/main/java/stirling/software/SPDF/model/api/PDFFile.java index 0b304747..378b3c03 100644 --- a/src/main/java/stirling/software/SPDF/model/api/PDFFile.java +++ b/src/main/java/stirling/software/SPDF/model/api/PDFFile.java @@ -4,7 +4,9 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; @Data +@EqualsAndHashCode public class PDFFile { @Schema(description = "The input PDF file") private MultipartFile fileInput; diff --git a/src/main/java/stirling/software/SPDF/model/api/PDFWithImageFormatRequest.java b/src/main/java/stirling/software/SPDF/model/api/PDFWithImageFormatRequest.java index 9766fdbf..aa8fe08b 100644 --- a/src/main/java/stirling/software/SPDF/model/api/PDFWithImageFormatRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/PDFWithImageFormatRequest.java @@ -2,8 +2,10 @@ package stirling.software.SPDF.model.api; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; @Data +@EqualsAndHashCode(callSuper=true) public class PDFWithImageFormatRequest extends PDFFile { @Schema(description = "The output image format e.g., 'png', 'jpeg', or 'gif'", diff --git a/src/main/java/stirling/software/SPDF/model/api/PDFWithPageNums.java b/src/main/java/stirling/software/SPDF/model/api/PDFWithPageNums.java index 4de315de..d53d8d12 100644 --- a/src/main/java/stirling/software/SPDF/model/api/PDFWithPageNums.java +++ b/src/main/java/stirling/software/SPDF/model/api/PDFWithPageNums.java @@ -4,12 +4,15 @@ import java.io.IOException; import java.util.List; import org.apache.pdfbox.pdmodel.PDDocument; + import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import stirling.software.SPDF.utils.GeneralUtils; @Data @NoArgsConstructor +@EqualsAndHashCode(callSuper=true) public class PDFWithPageNums extends PDFFile { @Schema(description = "The pages to select, Supports ranges (e.g., '1,3,5-9'), or 'all' or functions in the format 'an+b' where 'a' is the multiplier of the page number 'n', and 'b' is a constant (e.g., '2n+1', '3n', '6n-5')\"") diff --git a/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToImageRequest.java b/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToImageRequest.java index 34e36379..18026618 100644 --- a/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToImageRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToImageRequest.java @@ -2,10 +2,11 @@ package stirling.software.SPDF.model.api.converters; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import org.springframework.web.multipart.MultipartFile; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.PDFFile; @Data +@EqualsAndHashCode(callSuper=true) public class ConvertToImageRequest extends PDFFile { @Schema(description = "The output image format", allowableValues = {"png", "jpeg", "jpg", "gif"}) diff --git a/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToPdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToPdfRequest.java index 90325ed6..dba2dc5e 100644 --- a/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToPdfRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToPdfRequest.java @@ -1,10 +1,13 @@ package stirling.software.SPDF.model.api.converters; +import org.springframework.web.multipart.MultipartFile; + import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import org.springframework.web.multipart.MultipartFile; +import lombok.EqualsAndHashCode; @Data +@EqualsAndHashCode public class ConvertToPdfRequest { @Schema(description = "The input images to be converted to a PDF file") diff --git a/src/main/java/stirling/software/SPDF/model/api/converters/PdfToPresentationRequest.java b/src/main/java/stirling/software/SPDF/model/api/converters/PdfToPresentationRequest.java index f1bf7a9d..0e8b79ad 100644 --- a/src/main/java/stirling/software/SPDF/model/api/converters/PdfToPresentationRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/converters/PdfToPresentationRequest.java @@ -2,10 +2,11 @@ package stirling.software.SPDF.model.api.converters; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import org.springframework.web.multipart.MultipartFile; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.PDFFile; @Data +@EqualsAndHashCode(callSuper=true) public class PdfToPresentationRequest extends PDFFile { @Schema(description = "The output Presentation format", allowableValues = {"ppt", "pptx", "odp"}) diff --git a/src/main/java/stirling/software/SPDF/model/api/converters/PdfToTextOrRTFRequest.java b/src/main/java/stirling/software/SPDF/model/api/converters/PdfToTextOrRTFRequest.java index 8093cd45..687ed621 100644 --- a/src/main/java/stirling/software/SPDF/model/api/converters/PdfToTextOrRTFRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/converters/PdfToTextOrRTFRequest.java @@ -2,9 +2,11 @@ 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 PdfToTextOrRTFRequest extends PDFFile { @Schema(description = "The output Text or RTF format", allowableValues = {"rtf", "txt:Text"}) diff --git a/src/main/java/stirling/software/SPDF/model/api/converters/PdfToWordRequest.java b/src/main/java/stirling/software/SPDF/model/api/converters/PdfToWordRequest.java index de5a7c4e..87150c73 100644 --- a/src/main/java/stirling/software/SPDF/model/api/converters/PdfToWordRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/converters/PdfToWordRequest.java @@ -2,9 +2,11 @@ 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 PdfToWordRequest extends PDFFile { @Schema(description = "The output Word document format", allowableValues = {"doc", "docx", "odt"}) diff --git a/src/main/java/stirling/software/SPDF/model/api/converters/UrlToPdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/converters/UrlToPdfRequest.java index 7d4e69ed..4607c153 100644 --- a/src/main/java/stirling/software/SPDF/model/api/converters/UrlToPdfRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/converters/UrlToPdfRequest.java @@ -2,8 +2,10 @@ package stirling.software.SPDF.model.api.converters; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; @Data +@EqualsAndHashCode public class UrlToPdfRequest { @Schema(description = "The input URL to be converted to a PDF file", required = true) diff --git a/src/main/java/stirling/software/SPDF/model/api/filter/ContainsTextRequest.java b/src/main/java/stirling/software/SPDF/model/api/filter/ContainsTextRequest.java index 4dc4e137..0b6cb1cb 100644 --- a/src/main/java/stirling/software/SPDF/model/api/filter/ContainsTextRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/filter/ContainsTextRequest.java @@ -2,9 +2,11 @@ package stirling.software.SPDF.model.api.filter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.PDFWithPageNums; @Data +@EqualsAndHashCode(callSuper=true) public class ContainsTextRequest extends PDFWithPageNums { @Schema(description = "The text to check for", required = true) diff --git a/src/main/java/stirling/software/SPDF/model/api/filter/FileSizeRequest.java b/src/main/java/stirling/software/SPDF/model/api/filter/FileSizeRequest.java index cffcd9a4..ce9a9236 100644 --- a/src/main/java/stirling/software/SPDF/model/api/filter/FileSizeRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/filter/FileSizeRequest.java @@ -2,10 +2,11 @@ package stirling.software.SPDF.model.api.filter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.PDFComparison; -import stirling.software.SPDF.model.api.PDFFile; @Data +@EqualsAndHashCode(callSuper=true) public class FileSizeRequest extends PDFComparison { @Schema(description = "File Size", required = true) diff --git a/src/main/java/stirling/software/SPDF/model/api/filter/PageRotationRequest.java b/src/main/java/stirling/software/SPDF/model/api/filter/PageRotationRequest.java index 8f36ae5d..d5fb9739 100644 --- a/src/main/java/stirling/software/SPDF/model/api/filter/PageRotationRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/filter/PageRotationRequest.java @@ -2,10 +2,11 @@ package stirling.software.SPDF.model.api.filter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.PDFComparison; -import stirling.software.SPDF.model.api.PDFFile; @Data +@EqualsAndHashCode(callSuper=true) public class PageRotationRequest extends PDFComparison { @Schema(description = "Rotation in degrees", required = true) diff --git a/src/main/java/stirling/software/SPDF/model/api/filter/PageSizeRequest.java b/src/main/java/stirling/software/SPDF/model/api/filter/PageSizeRequest.java index 0184ac90..12083636 100644 --- a/src/main/java/stirling/software/SPDF/model/api/filter/PageSizeRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/filter/PageSizeRequest.java @@ -2,10 +2,11 @@ package stirling.software.SPDF.model.api.filter; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.PDFComparison; -import stirling.software.SPDF.model.api.PDFFile; @Data +@EqualsAndHashCode(callSuper=true) public class PageSizeRequest extends PDFComparison { @Schema(description = "Standard Page Size", required = true) diff --git a/src/main/java/stirling/software/SPDF/model/api/general/CropPdfForm.java b/src/main/java/stirling/software/SPDF/model/api/general/CropPdfForm.java index 52c0f269..52821515 100644 --- a/src/main/java/stirling/software/SPDF/model/api/general/CropPdfForm.java +++ b/src/main/java/stirling/software/SPDF/model/api/general/CropPdfForm.java @@ -1,13 +1,11 @@ package stirling.software.SPDF.model.api.general; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.PDFFile; -import org.springframework.web.multipart.MultipartFile; - -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; - @Data +@EqualsAndHashCode(callSuper=true) public class CropPdfForm extends PDFFile { diff --git a/src/main/java/stirling/software/SPDF/model/api/general/MergeMultiplePagesRequest.java b/src/main/java/stirling/software/SPDF/model/api/general/MergeMultiplePagesRequest.java index 6752b1b7..ab6e3510 100644 --- a/src/main/java/stirling/software/SPDF/model/api/general/MergeMultiplePagesRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/general/MergeMultiplePagesRequest.java @@ -2,9 +2,11 @@ package stirling.software.SPDF.model.api.general; 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 MergeMultiplePagesRequest extends PDFFile { @Schema(description = "The number of pages to fit onto a single sheet in the output PDF.", diff --git a/src/main/java/stirling/software/SPDF/model/api/general/MergePdfsRequest.java b/src/main/java/stirling/software/SPDF/model/api/general/MergePdfsRequest.java index 4e1ed397..c6d3f98c 100644 --- a/src/main/java/stirling/software/SPDF/model/api/general/MergePdfsRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/general/MergePdfsRequest.java @@ -2,9 +2,11 @@ package stirling.software.SPDF.model.api.general; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.MultiplePDFFiles; @Data +@EqualsAndHashCode(callSuper=true) public class MergePdfsRequest extends MultiplePDFFiles { @Schema(description = "The type of sorting to be applied on the input files before merging.", diff --git a/src/main/java/stirling/software/SPDF/model/api/general/RearrangePagesRequest.java b/src/main/java/stirling/software/SPDF/model/api/general/RearrangePagesRequest.java index 4e054343..3e5b4f23 100644 --- a/src/main/java/stirling/software/SPDF/model/api/general/RearrangePagesRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/general/RearrangePagesRequest.java @@ -2,11 +2,11 @@ package stirling.software.SPDF.model.api.general; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import org.springframework.web.multipart.MultipartFile; -import stirling.software.SPDF.model.api.PDFFile; -import stirling.software.SPDF.model.api.PDFWithPageNums; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.SortTypes; +import stirling.software.SPDF.model.api.PDFWithPageNums; @Data +@EqualsAndHashCode(callSuper=true) public class RearrangePagesRequest extends PDFWithPageNums { @Schema(implementation = SortTypes.class, description = "The custom mode for page rearrangement. Valid values are:\n" diff --git a/src/main/java/stirling/software/SPDF/model/api/general/RotatePDFRequest.java b/src/main/java/stirling/software/SPDF/model/api/general/RotatePDFRequest.java index 58d268a8..8f48c605 100644 --- a/src/main/java/stirling/software/SPDF/model/api/general/RotatePDFRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/general/RotatePDFRequest.java @@ -2,10 +2,11 @@ package stirling.software.SPDF.model.api.general; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import org.springframework.web.multipart.MultipartFile; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.PDFFile; @Data +@EqualsAndHashCode(callSuper=true) public class RotatePDFRequest extends PDFFile { @Schema(description = "The angle by which to rotate the PDF file. This should be a multiple of 90.", example = "90") diff --git a/src/main/java/stirling/software/SPDF/model/api/general/ScalePagesRequest.java b/src/main/java/stirling/software/SPDF/model/api/general/ScalePagesRequest.java index 3411e1d2..51bdc5fc 100644 --- a/src/main/java/stirling/software/SPDF/model/api/general/ScalePagesRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/general/ScalePagesRequest.java @@ -2,10 +2,11 @@ package stirling.software.SPDF.model.api.general; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import org.springframework.web.multipart.MultipartFile; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.PDFFile; @Data +@EqualsAndHashCode(callSuper=true) public class ScalePagesRequest extends PDFFile { @Schema(description = "The scale of pages in the output PDF. Acceptable values are A0-A10, B0-B9, LETTER, TABLOID, LEDGER, LEGAL, EXECUTIVE.", diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/AddPageNumbersRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/AddPageNumbersRequest.java index e258b59a..313d42ab 100644 --- a/src/main/java/stirling/software/SPDF/model/api/misc/AddPageNumbersRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/misc/AddPageNumbersRequest.java @@ -2,11 +2,11 @@ package stirling.software.SPDF.model.api.misc; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.PDFWithPageNums; -import org.springframework.web.multipart.MultipartFile; - @Data +@EqualsAndHashCode(callSuper=true) public class AddPageNumbersRequest extends PDFWithPageNums { @Schema(description = "Custom margin: small/medium/large", allowableValues = {"small", "medium", "large"}) diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/AutoSplitPdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/AutoSplitPdfRequest.java index 822eb7a6..c4923746 100644 --- a/src/main/java/stirling/software/SPDF/model/api/misc/AutoSplitPdfRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/misc/AutoSplitPdfRequest.java @@ -2,9 +2,11 @@ package stirling.software.SPDF.model.api.misc; 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 AutoSplitPdfRequest extends PDFFile { @Schema(description = "Flag indicating if the duplex mode is active, where the page after the divider also gets removed.", required = false, defaultValue = "false") diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/ExtractHeaderRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/ExtractHeaderRequest.java index d05b865e..9dda0d6f 100644 --- a/src/main/java/stirling/software/SPDF/model/api/misc/ExtractHeaderRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/misc/ExtractHeaderRequest.java @@ -2,9 +2,11 @@ package stirling.software.SPDF.model.api.misc; 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 ExtractHeaderRequest extends PDFFile { @Schema(description = "Flag indicating whether to use the first text as a fallback if no suitable title is found. Defaults to false.", required = false, defaultValue = "false") diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/ExtractImageScansRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/ExtractImageScansRequest.java index 8a12fc47..f063e4fc 100644 --- a/src/main/java/stirling/software/SPDF/model/api/misc/ExtractImageScansRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/misc/ExtractImageScansRequest.java @@ -4,8 +4,10 @@ import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import lombok.EqualsAndHashCode; @Data +@EqualsAndHashCode public class ExtractImageScansRequest { @Schema(description = "The input file containing image scans", required = true) private MultipartFile fileInput; diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/MetadataRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/MetadataRequest.java index 586f83f5..0d909613 100644 --- a/src/main/java/stirling/software/SPDF/model/api/misc/MetadataRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/misc/MetadataRequest.java @@ -1,12 +1,14 @@ package stirling.software.SPDF.model.api.misc; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import stirling.software.SPDF.model.api.PDFFile; - import java.util.Map; +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 MetadataRequest extends PDFFile { @Schema(description = "Delete all metadata if set to true") diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/OptimizePdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/OptimizePdfRequest.java index 65028a7f..ca43b1eb 100644 --- a/src/main/java/stirling/software/SPDF/model/api/misc/OptimizePdfRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/misc/OptimizePdfRequest.java @@ -2,9 +2,11 @@ package stirling.software.SPDF.model.api.misc; 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 OptimizePdfRequest extends PDFFile { @Schema(description = "The level of optimization to apply to the PDF file. Higher values indicate greater compression but may reduce quality.", diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/OverlayImageRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/OverlayImageRequest.java index 29350519..50ec4abb 100644 --- a/src/main/java/stirling/software/SPDF/model/api/misc/OverlayImageRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/misc/OverlayImageRequest.java @@ -1,12 +1,14 @@ package stirling.software.SPDF.model.api.misc; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import stirling.software.SPDF.model.api.PDFFile; - import org.springframework.web.multipart.MultipartFile; +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 OverlayImageRequest extends PDFFile { @Schema(description = "The image file to be overlaid onto the PDF.") diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/ProcessPdfWithOcrRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/ProcessPdfWithOcrRequest.java index a332a7ff..689e4211 100644 --- a/src/main/java/stirling/software/SPDF/model/api/misc/ProcessPdfWithOcrRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/misc/ProcessPdfWithOcrRequest.java @@ -1,13 +1,14 @@ package stirling.software.SPDF.model.api.misc; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import org.springframework.web.multipart.MultipartFile; -import stirling.software.SPDF.model.api.PDFFile; - import java.util.List; +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 ProcessPdfWithOcrRequest extends PDFFile { @Schema(description = "List of languages to use in OCR processing") diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/RemoveBlankPagesRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/RemoveBlankPagesRequest.java index a7a92897..3f20e2f7 100644 --- a/src/main/java/stirling/software/SPDF/model/api/misc/RemoveBlankPagesRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/misc/RemoveBlankPagesRequest.java @@ -2,9 +2,11 @@ package stirling.software.SPDF.model.api.misc; 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 RemoveBlankPagesRequest extends PDFFile { @Schema(description = "The threshold value to determine blank pages", example = "10", defaultValue = "10") diff --git a/src/main/java/stirling/software/SPDF/model/api/security/AddPasswordRequest.java b/src/main/java/stirling/software/SPDF/model/api/security/AddPasswordRequest.java index 60bbcc6b..06a52d4f 100644 --- a/src/main/java/stirling/software/SPDF/model/api/security/AddPasswordRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/security/AddPasswordRequest.java @@ -2,10 +2,11 @@ package stirling.software.SPDF.model.api.security; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import org.springframework.web.multipart.MultipartFile; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.PDFFile; @Data +@EqualsAndHashCode(callSuper=true) public class AddPasswordRequest extends PDFFile { @Schema(description = "The owner password to be added to the PDF file (Restricts what can be done with the document once it is opened)", defaultValue = "") diff --git a/src/main/java/stirling/software/SPDF/model/api/security/AddWatermarkRequest.java b/src/main/java/stirling/software/SPDF/model/api/security/AddWatermarkRequest.java index 42d34af4..5fa3f0fb 100644 --- a/src/main/java/stirling/software/SPDF/model/api/security/AddWatermarkRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/security/AddWatermarkRequest.java @@ -1,11 +1,14 @@ package stirling.software.SPDF.model.api.security; +import org.springframework.web.multipart.MultipartFile; + import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import org.springframework.web.multipart.MultipartFile; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.PDFFile; @Data +@EqualsAndHashCode(callSuper=true) public class AddWatermarkRequest extends PDFFile { @Schema(description = "The watermark type (text or image)", required = true) diff --git a/src/main/java/stirling/software/SPDF/model/api/security/PDFPasswordRequest.java b/src/main/java/stirling/software/SPDF/model/api/security/PDFPasswordRequest.java index c1acd32c..94d04d1e 100644 --- a/src/main/java/stirling/software/SPDF/model/api/security/PDFPasswordRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/security/PDFPasswordRequest.java @@ -2,10 +2,11 @@ package stirling.software.SPDF.model.api.security; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import org.springframework.web.multipart.MultipartFile; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.PDFFile; @Data +@EqualsAndHashCode(callSuper=true) public class PDFPasswordRequest extends PDFFile { @Schema(description = "The password of the PDF file", required = true) diff --git a/src/main/java/stirling/software/SPDF/model/api/security/RedactPdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/security/RedactPdfRequest.java index fff02ff5..1f77bd03 100644 --- a/src/main/java/stirling/software/SPDF/model/api/security/RedactPdfRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/security/RedactPdfRequest.java @@ -2,10 +2,11 @@ package stirling.software.SPDF.model.api.security; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import org.springframework.web.multipart.MultipartFile; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.PDFFile; @Data +@EqualsAndHashCode(callSuper=true) public class RedactPdfRequest extends PDFFile { @Schema(description = "List of text to redact from the PDF", type = "string", required = true) diff --git a/src/main/java/stirling/software/SPDF/model/api/security/SanitizePdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/security/SanitizePdfRequest.java index 280f2021..310ee59c 100644 --- a/src/main/java/stirling/software/SPDF/model/api/security/SanitizePdfRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/security/SanitizePdfRequest.java @@ -2,10 +2,11 @@ package stirling.software.SPDF.model.api.security; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import org.springframework.web.multipart.MultipartFile; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.PDFFile; @Data +@EqualsAndHashCode(callSuper=true) public class SanitizePdfRequest extends PDFFile { @Schema(description = "Remove JavaScript actions from the PDF", defaultValue = "false") diff --git a/src/main/java/stirling/software/SPDF/model/api/security/SignPDFWithCertRequest.java b/src/main/java/stirling/software/SPDF/model/api/security/SignPDFWithCertRequest.java index 5344bf4d..5b2122c6 100644 --- a/src/main/java/stirling/software/SPDF/model/api/security/SignPDFWithCertRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/security/SignPDFWithCertRequest.java @@ -1,11 +1,14 @@ package stirling.software.SPDF.model.api.security; +import org.springframework.web.multipart.MultipartFile; + import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import org.springframework.web.multipart.MultipartFile; +import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.PDFFile; @Data +@EqualsAndHashCode(callSuper=true) public class SignPDFWithCertRequest extends PDFFile { @Schema(description = "The type of the digital certificate", allowableValues = { "PKCS12", "PEM" }) From 0b1fd61188ffbd96e3f2dc7b3dd1b48a4aa97f25 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Mon, 11 Sep 2023 23:19:50 +0100 Subject: [PATCH 08/57] api /api/v1/ --- .../software/SPDF/controller/api/CropController.java | 2 ++ .../SPDF/controller/api/MergeController.java | 2 ++ .../controller/api/MultiPageLayoutController.java | 2 ++ .../controller/api/RearrangePagesPDFController.java | 2 ++ .../SPDF/controller/api/RotationController.java | 2 ++ .../SPDF/controller/api/ScalePagesController.java | 2 ++ .../SPDF/controller/api/SplitPDFController.java | 2 ++ .../SPDF/controller/api/ToSinglePageController.java | 2 ++ .../software/SPDF/controller/api/UserController.java | 2 ++ .../controller/api/converters/ConvertEpubToPdf.java | 2 ++ .../controller/api/converters/ConvertHtmlToPDF.java | 4 +++- .../api/converters/ConvertImgPDFController.java | 6 ++++-- .../api/converters/ConvertMarkdownToPdf.java | 4 +++- .../api/converters/ConvertOfficeController.java | 4 +++- .../api/converters/ConvertPDFToOffice.java | 12 +++++++----- .../controller/api/converters/ConvertPDFToPDFA.java | 4 +++- .../api/converters/ConvertWebsiteToPDF.java | 4 +++- .../controller/api/filters/FilterController.java | 2 ++ .../controller/api/misc/AutoRenameController.java | 4 +++- .../controller/api/misc/AutoSplitPdfController.java | 4 ++++ .../controller/api/misc/BlankPageController.java | 4 +++- .../SPDF/controller/api/misc/CompressController.java | 4 +++- .../api/misc/ExtractImageScansController.java | 4 +++- .../controller/api/misc/ExtractImagesController.java | 4 +++- .../controller/api/misc/FakeScanControllerWIP.java | 4 +++- .../SPDF/controller/api/misc/MetadataController.java | 4 +++- .../SPDF/controller/api/misc/OCRController.java | 4 +++- .../controller/api/misc/OverlayImageController.java | 4 +++- .../controller/api/misc/PageNumbersController.java | 4 +++- .../SPDF/controller/api/misc/RepairController.java | 4 +++- .../SPDF/controller/api/misc/ShowJavascript.java | 4 +++- .../controller/api/pipeline/PipelineController.java | 2 ++ .../controller/api/security/CertSignController.java | 2 ++ .../SPDF/controller/api/security/GetInfoOnPDF.java | 2 ++ .../controller/api/security/PasswordController.java | 2 ++ .../controller/api/security/RedactController.java | 2 ++ .../controller/api/security/SanitizeController.java | 2 ++ .../controller/api/security/WatermarkController.java | 2 ++ src/main/resources/templates/account.html | 8 ++++---- src/main/resources/templates/addUsers.html | 4 ++-- src/main/resources/templates/change-creds.html | 2 +- .../resources/templates/convert/file-to-pdf.html | 2 +- .../resources/templates/convert/html-to-pdf.html | 2 +- src/main/resources/templates/convert/img-to-pdf.html | 2 +- .../resources/templates/convert/markdown-to-pdf.html | 2 +- .../resources/templates/convert/pdf-to-html.html | 2 +- src/main/resources/templates/convert/pdf-to-img.html | 2 +- .../resources/templates/convert/pdf-to-pdfa.html | 2 +- .../templates/convert/pdf-to-presentation.html | 2 +- .../resources/templates/convert/pdf-to-text.html | 2 +- .../resources/templates/convert/pdf-to-word.html | 2 +- src/main/resources/templates/convert/pdf-to-xml.html | 2 +- src/main/resources/templates/convert/url-to-pdf.html | 2 +- src/main/resources/templates/crop.html | 2 +- src/main/resources/templates/extract-page.html | 2 +- src/main/resources/templates/merge-pdfs.html | 2 +- .../templates/{other => misc}/add-image.html | 0 .../templates/{other => misc}/add-page-numbers.html | 2 +- .../templates/{other => misc}/adjust-contrast.html | 0 .../templates/{other => misc}/auto-crop.html | 2 +- .../templates/{other => misc}/auto-rename.html | 2 +- .../templates/{ => misc}/auto-split-pdf.html | 2 +- .../templates/{other => misc}/change-metadata.html | 2 +- .../resources/templates/{other => misc}/compare.html | 0 .../templates/{other => misc}/compress-pdf.html | 2 +- .../{other => misc}/extract-image-scans.html | 2 +- .../templates/{other => misc}/extract-images.html | 2 +- .../resources/templates/{other => misc}/flatten.html | 0 .../templates/{other => misc}/multi-page-layout.html | 2 +- .../resources/templates/{other => misc}/ocr-pdf.html | 2 +- .../templates/{other => misc}/remove-blanks.html | 2 +- .../resources/templates/{other => misc}/repair.html | 2 +- .../templates/{other => misc}/scale-pages.html | 2 +- .../templates/{other => misc}/show-javascript.html | 2 +- src/main/resources/templates/pdf-organizer.html | 2 +- src/main/resources/templates/pdf-to-single-page.html | 2 +- src/main/resources/templates/remove-pages.html | 2 +- src/main/resources/templates/rotate-pdf.html | 2 +- src/main/resources/templates/split-pdfs.html | 2 +- 79 files changed, 143 insertions(+), 65 deletions(-) rename src/main/resources/templates/{other => misc}/add-image.html (100%) rename src/main/resources/templates/{other => misc}/add-page-numbers.html (96%) rename src/main/resources/templates/{other => misc}/adjust-contrast.html (100%) rename src/main/resources/templates/{other => misc}/auto-crop.html (96%) rename src/main/resources/templates/{other => misc}/auto-rename.html (93%) rename src/main/resources/templates/{ => misc}/auto-split-pdf.html (98%) rename src/main/resources/templates/{other => misc}/change-metadata.html (97%) rename src/main/resources/templates/{other => misc}/compare.html (100%) rename src/main/resources/templates/{other => misc}/compress-pdf.html (95%) rename src/main/resources/templates/{other => misc}/extract-image-scans.html (95%) rename src/main/resources/templates/{other => misc}/extract-images.html (91%) rename src/main/resources/templates/{other => misc}/flatten.html (100%) rename src/main/resources/templates/{other => misc}/multi-page-layout.html (91%) rename src/main/resources/templates/{other => misc}/ocr-pdf.html (98%) rename src/main/resources/templates/{other => misc}/remove-blanks.html (93%) rename src/main/resources/templates/{other => misc}/repair.html (89%) rename src/main/resources/templates/{other => misc}/scale-pages.html (96%) rename src/main/resources/templates/{other => misc}/show-javascript.html (98%) diff --git a/src/main/java/stirling/software/SPDF/controller/api/CropController.java b/src/main/java/stirling/software/SPDF/controller/api/CropController.java index 38d68420..8f8deafc 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/CropController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/CropController.java @@ -15,6 +15,7 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -27,6 +28,7 @@ import stirling.software.SPDF.model.api.general.CropPdfForm; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/general") @Tag(name = "General", description = "General APIs") public class CropController { diff --git a/src/main/java/stirling/software/SPDF/controller/api/MergeController.java b/src/main/java/stirling/software/SPDF/controller/api/MergeController.java index 03bf4066..f256b692 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/MergeController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/MergeController.java @@ -17,6 +17,7 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -31,6 +32,7 @@ import stirling.software.SPDF.model.api.general.MergePdfsRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/general") @Tag(name = "General", description = "General APIs") public class MergeController { diff --git a/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java b/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java index 12c262cd..4264f844 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java @@ -16,6 +16,7 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -28,6 +29,7 @@ import stirling.software.SPDF.model.api.general.MergeMultiplePagesRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/general") @Tag(name = "General", description = "General APIs") public class MultiPageLayoutController { diff --git a/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java b/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java index 294df38d..9530a39b 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java @@ -11,6 +11,7 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -25,6 +26,7 @@ import stirling.software.SPDF.utils.WebResponseUtils; import stirling.software.SPDF.model.SortTypes; import stirling.software.SPDF.model.api.general.RearrangePagesRequest; @RestController +@RequestMapping("/api/v1/general") @Tag(name = "General", description = "General APIs") public class RearrangePagesPDFController { diff --git a/src/main/java/stirling/software/SPDF/controller/api/RotationController.java b/src/main/java/stirling/software/SPDF/controller/api/RotationController.java index ef32df4e..be3fcbff 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/RotationController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/RotationController.java @@ -10,6 +10,7 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -22,6 +23,7 @@ import stirling.software.SPDF.model.api.general.RotatePDFRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/general") @Tag(name = "General", description = "General APIs") public class RotationController { diff --git a/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java b/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java index 2dcb26af..4e155d1d 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java @@ -17,6 +17,7 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -28,6 +29,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.general.ScalePagesRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/general") @Tag(name = "General", description = "General APIs") public class ScalePagesController { diff --git a/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java b/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java index fe3a1cc5..6ddf42f4 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java @@ -19,6 +19,7 @@ import org.springframework.http.MediaType; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -32,6 +33,7 @@ import stirling.software.SPDF.utils.GeneralUtils; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/general") @Tag(name = "General", description = "General APIs") public class SplitPDFController { diff --git a/src/main/java/stirling/software/SPDF/controller/api/ToSinglePageController.java b/src/main/java/stirling/software/SPDF/controller/api/ToSinglePageController.java index ea64d55b..28697531 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/ToSinglePageController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/ToSinglePageController.java @@ -15,6 +15,7 @@ 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -25,6 +26,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/general") @Tag(name = "General", description = "General APIs") public class ToSinglePageController { diff --git a/src/main/java/stirling/software/SPDF/controller/api/UserController.java b/src/main/java/stirling/software/SPDF/controller/api/UserController.java index bd4452da..bf451567 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/UserController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/UserController.java @@ -15,6 +15,7 @@ import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import org.springframework.web.servlet.view.RedirectView; @@ -25,6 +26,7 @@ import stirling.software.SPDF.config.security.UserService; import stirling.software.SPDF.model.User; @Controller +@RequestMapping("/api/v1/user") public class UserController { @Autowired diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertEpubToPdf.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertEpubToPdf.java index 77262cce..8fd9d809 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertEpubToPdf.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertEpubToPdf.java @@ -16,6 +16,7 @@ import javax.xml.parsers.DocumentBuilderFactory; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -33,6 +34,7 @@ import stirling.software.SPDF.utils.FileToPdf; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/convert") @Tag(name = "Convert", description = "Convert APIs") public class ConvertEpubToPdf { //TODO 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 d9308d09..f6a2036b 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 @@ -5,6 +5,7 @@ import java.io.IOException; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -17,10 +18,11 @@ import stirling.software.SPDF.utils.WebResponseUtils; @RestController @Tag(name = "Convert", description = "Convert APIs") +@RequestMapping("/api/v1/convert") public class ConvertHtmlToPDF { - @PostMapping(consumes = "multipart/form-data", value = "/html-to-pdf") + @PostMapping(consumes = "multipart/form-data", value = "/html/pdf") @Operation( summary = "Convert an HTML or ZIP (containing HTML and CSS) to PDF", description = "This endpoint takes an HTML or ZIP file input and converts it to a PDF format." 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 5a4dab2c..e65d1f3c 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 @@ -13,6 +13,7 @@ import org.springframework.http.MediaType; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -27,12 +28,13 @@ import stirling.software.SPDF.model.api.converters.ConvertToPdfRequest; import stirling.software.SPDF.utils.PdfUtils; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/convert") @Tag(name = "Convert", description = "Convert APIs") public class ConvertImgPDFController { private static final Logger logger = LoggerFactory.getLogger(ConvertImgPDFController.class); - @PostMapping(consumes = "multipart/form-data", value = "/pdf-to-img") + @PostMapping(consumes = "multipart/form-data", value = "/pdf/img") @Operation(summary = "Convert PDF to image(s)", description = "This endpoint converts a PDF file to image(s) with the specified image format, color type, and DPI. Users can choose to get a single image or multiple images. Input:PDF Output:Image Type:SI-Conditional") public ResponseEntity convertToImage(@ModelAttribute ConvertToImageRequest request) throws IOException { @@ -76,7 +78,7 @@ public class ConvertImgPDFController { } } - @PostMapping(consumes = "multipart/form-data", value = "/img-to-pdf") + @PostMapping(consumes = "multipart/form-data", value = "/img/pdf") @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?") public ResponseEntity convertToPdf(@ModelAttribute ConvertToPdfRequest request) throws IOException { 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 02ff1e27..4726562f 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 @@ -8,6 +8,7 @@ import org.commonmark.renderer.html.HtmlRenderer; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -20,9 +21,10 @@ import stirling.software.SPDF.utils.WebResponseUtils; @RestController @Tag(name = "Convert", description = "Convert APIs") +@RequestMapping("/api/v1/convert") public class ConvertMarkdownToPdf { - @PostMapping(consumes = "multipart/form-data", value = "/markdown-to-pdf") + @PostMapping(consumes = "multipart/form-data", value = "/markdown/pdf") @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." diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertOfficeController.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertOfficeController.java index 9ee5cdd5..f5f5bc27 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertOfficeController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertOfficeController.java @@ -12,6 +12,7 @@ import org.apache.commons.io.FilenameUtils; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -26,6 +27,7 @@ import stirling.software.SPDF.utils.WebResponseUtils; @RestController @Tag(name = "Convert", description = "Convert APIs") +@RequestMapping("/api/v1/convert") public class ConvertOfficeController { public byte[] convertToPdf(MultipartFile inputFile) throws IOException, InterruptedException { @@ -60,7 +62,7 @@ public class ConvertOfficeController { return fileExtension.matches(extensionPattern); } - @PostMapping(consumes = "multipart/form-data", value = "/file-to-pdf") + @PostMapping(consumes = "multipart/form-data", value = "/file/pdf") @Operation( summary = "Convert a file to a PDF using LibreOffice", description = "This endpoint converts a given file to a PDF using LibreOffice API Input:Any Output:PDF Type:SISO" diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToOffice.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToOffice.java index b61549ff..52ac5a8d 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToOffice.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToOffice.java @@ -5,6 +5,7 @@ import java.io.IOException; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -22,10 +23,11 @@ import stirling.software.SPDF.model.api.converters.PdfToWordRequest; import stirling.software.SPDF.utils.PDFToFile; @RestController +@RequestMapping("/api/v1/convert") @Tag(name = "Convert", description = "Convert APIs") public class ConvertPDFToOffice { - @PostMapping(consumes = "multipart/form-data", value = "/pdf-to-html") + @PostMapping(consumes = "multipart/form-data", value = "/pdf/html") @Operation(summary = "Convert PDF to HTML", description = "This endpoint converts a PDF file to HTML format. Input:PDF Output:HTML Type:SISO") public ResponseEntity processPdfToHTML(@ModelAttribute PDFFile request) throws Exception { @@ -34,7 +36,7 @@ public class ConvertPDFToOffice { return pdfToFile.processPdfToOfficeFormat(inputFile, "html", "writer_pdf_import"); } - @PostMapping(consumes = "multipart/form-data", value = "/pdf-to-presentation") + @PostMapping(consumes = "multipart/form-data", value = "/pdf/presentation") @Operation(summary = "Convert PDF to Presentation format", description = "This endpoint converts a given PDF file to a Presentation format. Input:PDF Output:PPT Type:SISO") public ResponseEntity processPdfToPresentation(@ModelAttribute PdfToPresentationRequest request) throws IOException, InterruptedException { MultipartFile inputFile = request.getFileInput(); @@ -43,7 +45,7 @@ public class ConvertPDFToOffice { return pdfToFile.processPdfToOfficeFormat(inputFile, outputFormat, "impress_pdf_import"); } - @PostMapping(consumes = "multipart/form-data", value = "/pdf-to-text") + @PostMapping(consumes = "multipart/form-data", value = "/pdf/text") @Operation(summary = "Convert PDF to Text or RTF format", description = "This endpoint converts a given PDF file to Text or RTF format. Input:PDF Output:TXT Type:SISO") public ResponseEntity processPdfToRTForTXT(@ModelAttribute PdfToTextOrRTFRequest request) throws IOException, InterruptedException { MultipartFile inputFile = request.getFileInput(); @@ -53,7 +55,7 @@ public class ConvertPDFToOffice { return pdfToFile.processPdfToOfficeFormat(inputFile, outputFormat, "writer_pdf_import"); } - @PostMapping(consumes = "multipart/form-data", value = "/pdf-to-word") + @PostMapping(consumes = "multipart/form-data", value = "/pdf/word") @Operation(summary = "Convert PDF to Word document", description = "This endpoint converts a given PDF file to a Word document format. Input:PDF Output:WORD Type:SISO") public ResponseEntity processPdfToWord(@ModelAttribute PdfToWordRequest request) throws IOException, InterruptedException { MultipartFile inputFile = request.getFileInput(); @@ -62,7 +64,7 @@ public class ConvertPDFToOffice { return pdfToFile.processPdfToOfficeFormat(inputFile, outputFormat, "writer_pdf_import"); } - @PostMapping(consumes = "multipart/form-data", value = "/pdf-to-xml") + @PostMapping(consumes = "multipart/form-data", value = "/pdf/xml") @Operation(summary = "Convert PDF to XML", description = "This endpoint converts a PDF file to an XML file. Input:PDF Output:XML Type:SISO") public ResponseEntity processPdfToXML(@ModelAttribute PDFFile request) throws Exception { diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToPDFA.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToPDFA.java index ca83d4ed..90f4f06d 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToPDFA.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToPDFA.java @@ -9,6 +9,7 @@ import java.util.List; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -22,10 +23,11 @@ import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/convert") @Tag(name = "Convert", description = "Convert APIs") public class ConvertPDFToPDFA { - @PostMapping(consumes = "multipart/form-data", value = "/pdf-to-pdfa") + @PostMapping(consumes = "multipart/form-data", value = "/pdf/pdfa") @Operation( summary = "Convert a PDF to a PDF/A", description = "This endpoint converts a PDF file to a PDF/A file. PDF/A is a format designed for long-term archiving of digital documents. Input:PDF Output:PDF Type:SISO" diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java index 3d4fd368..580fe3a5 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java @@ -9,6 +9,7 @@ import java.util.List; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; @@ -23,9 +24,10 @@ import stirling.software.SPDF.utils.WebResponseUtils; @RestController @Tag(name = "Convert", description = "Convert APIs") +@RequestMapping("/api/v1/convert") public class ConvertWebsiteToPDF { - @PostMapping(consumes = "multipart/form-data", value = "/url-to-pdf") + @PostMapping(consumes = "multipart/form-data", value = "/url/pdf") @Operation( summary = "Convert a URL to a PDF", description = "This endpoint fetches content from a URL and converts it to a PDF format." diff --git a/src/main/java/stirling/software/SPDF/controller/api/filters/FilterController.java b/src/main/java/stirling/software/SPDF/controller/api/filters/FilterController.java index dbb20bfe..8218da33 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/filters/FilterController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/filters/FilterController.java @@ -8,6 +8,7 @@ import org.apache.pdfbox.pdmodel.common.PDRectangle; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -26,6 +27,7 @@ import stirling.software.SPDF.utils.PdfUtils; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/filter") @Tag(name = "Filter", description = "Filter APIs") public class FilterController { diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java index 8059062c..d26b0fee 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java @@ -13,6 +13,7 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -24,7 +25,8 @@ import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.ExtractHeaderRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController -@Tag(name = "Other", description = "Other APIs") +@RequestMapping("/api/v1/misc") +@Tag(name = "Misc", description = "Miscellaneous APIs") public class AutoRenameController { private static final Logger logger = LoggerFactory.getLogger(AutoRenameController.class); diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/AutoSplitPdfController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoSplitPdfController.java index 3ba81f78..821fbec1 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/AutoSplitPdfController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoSplitPdfController.java @@ -18,6 +18,7 @@ import org.springframework.http.MediaType; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -32,10 +33,13 @@ import com.google.zxing.common.HybridBinarizer; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.AutoSplitPdfRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/misc") +@Tag(name = "Misc", description = "Miscellaneous APIs") public class AutoSplitPdfController { private static final String QR_CONTENT = "https://github.com/Frooodle/Stirling-PDF"; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/BlankPageController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/BlankPageController.java index 5107d8c0..afad69e3 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/BlankPageController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/BlankPageController.java @@ -22,6 +22,7 @@ import org.springframework.http.HttpStatus; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -37,7 +38,8 @@ import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; import stirling.software.SPDF.utils.WebResponseUtils; @RestController -@Tag(name = "Other", description = "Other APIs") +@RequestMapping("/api/v1/misc") +@Tag(name = "Misc", description = "Miscellaneous APIs") public class BlankPageController { @PostMapping(consumes = "multipart/form-data", value = "/remove-blanks") diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java index 89147056..d8fdb0d4 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java @@ -24,6 +24,7 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -40,7 +41,8 @@ import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; import stirling.software.SPDF.utils.WebResponseUtils; @RestController -@Tag(name = "Other", description = "Other APIs") +@RequestMapping("/api/v1/misc") +@Tag(name = "Misc", description = "Miscellaneous APIs") public class CompressController { private static final Logger logger = LoggerFactory.getLogger(CompressController.class); diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java index 5a1bbf8a..c725ea1a 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java @@ -24,6 +24,7 @@ import org.slf4j.LoggerFactory; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -40,7 +41,8 @@ import stirling.software.SPDF.utils.WebResponseUtils; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; @RestController -@Tag(name = "Other", description = "Other APIs") +@RequestMapping("/api/v1/misc") +@Tag(name = "Misc", description = "Miscellaneous APIs") public class ExtractImageScansController { private static final Logger logger = LoggerFactory.getLogger(ExtractImageScansController.class); diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java index 91bbff09..6546363c 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java @@ -22,6 +22,7 @@ import org.springframework.http.MediaType; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -34,7 +35,8 @@ import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFWithImageFormatRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController -@Tag(name = "Other", description = "Other APIs") +@RequestMapping("/api/v1/misc") +@Tag(name = "Misc", description = "Miscellaneous APIs") public class ExtractImagesController { private static final Logger logger = LoggerFactory.getLogger(ExtractImagesController.class); 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 70fc2e88..21b3d4e2 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 @@ -32,6 +32,7 @@ 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -44,7 +45,8 @@ import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.utils.WebResponseUtils; @RestController -@Tag(name = "Other", description = "Other APIs") +@RequestMapping("/api/v1/misc") +@Tag(name = "Misc", description = "Miscellaneous APIs") public class FakeScanControllerWIP { private static final Logger logger = LoggerFactory.getLogger(FakeScanControllerWIP.class); diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java index aa9b5395..836e2200 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java @@ -13,6 +13,7 @@ import org.apache.pdfbox.pdmodel.PDDocumentInformation; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -25,7 +26,8 @@ import stirling.software.SPDF.model.api.misc.MetadataRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController -@Tag(name = "Other", description = "Other APIs") +@RequestMapping("/api/v1/misc") +@Tag(name = "Misc", description = "Miscellaneous APIs") public class MetadataController { diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java index aa25b9b4..bc0e7938 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java @@ -20,6 +20,7 @@ import org.springframework.http.MediaType; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -35,7 +36,8 @@ import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; import stirling.software.SPDF.utils.WebResponseUtils; @RestController -@Tag(name = "Other", description = "Other APIs") +@RequestMapping("/api/v1/misc") +@Tag(name = "Misc", description = "Miscellaneous APIs") public class OCRController { private static final Logger logger = LoggerFactory.getLogger(OCRController.class); 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 44c16fd7..5cf6af8d 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 @@ -8,6 +8,7 @@ import org.springframework.http.HttpStatus; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -21,7 +22,8 @@ import stirling.software.SPDF.utils.PdfUtils; import stirling.software.SPDF.utils.WebResponseUtils; @RestController -@Tag(name = "Other", description = "Other APIs") +@RequestMapping("/api/v1/misc") +@Tag(name = "Misc", description = "Miscellaneous APIs") public class OverlayImageController { private static final Logger logger = LoggerFactory.getLogger(OverlayImageController.class); diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java index d1ecc9df..e7f7f4cb 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java @@ -15,6 +15,7 @@ import org.springframework.http.MediaType; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -28,7 +29,8 @@ import stirling.software.SPDF.utils.GeneralUtils; import stirling.software.SPDF.utils.WebResponseUtils; @RestController -@Tag(name = "Other", description = "Other APIs") +@RequestMapping("/api/v1/misc") +@Tag(name = "Misc", description = "Miscellaneous APIs") public class PageNumbersController { private static final Logger logger = LoggerFactory.getLogger(PageNumbersController.class); diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java index 819f8f70..1a0b73b5 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java @@ -11,6 +11,7 @@ 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -25,7 +26,8 @@ import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; import stirling.software.SPDF.utils.WebResponseUtils; @RestController -@Tag(name = "Other", description = "Other APIs") +@RequestMapping("/api/v1/misc") +@Tag(name = "Misc", description = "Miscellaneous APIs") public class RepairController { private static final Logger logger = LoggerFactory.getLogger(RepairController.class); diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java index d3101ff2..8295f034 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java @@ -11,6 +11,7 @@ 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -19,7 +20,8 @@ import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.utils.WebResponseUtils; @RestController -@Tag(name = "Other", description = "Other APIs") +@RequestMapping("/api/v1/misc") +@Tag(name = "Misc", description = "Miscellaneous APIs") public class ShowJavascript { private static final Logger logger = LoggerFactory.getLogger(ShowJavascript.class); diff --git a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java index 0e5d8de3..5a3f1389 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java @@ -39,6 +39,7 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -56,6 +57,7 @@ import stirling.software.SPDF.model.api.HandleDataRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/pipeline") @Tag(name = "Pipeline", description = "Pipeline APIs") public class PipelineController { 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 d9eb68a3..9e17f2fe 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 @@ -46,6 +46,7 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -59,6 +60,7 @@ import stirling.software.SPDF.model.api.security.SignPDFWithCertRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/security") @Tag(name = "Security", description = "Security APIs") public class CertSignController { diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java b/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java index 48f1c655..638d7cf6 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java @@ -62,6 +62,7 @@ import org.springframework.http.MediaType; 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -76,6 +77,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/security") @Tag(name = "Security", description = "Security APIs") public class GetInfoOnPDF { diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java b/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java index 9634143b..8bec2e82 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java @@ -10,6 +10,7 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -23,6 +24,7 @@ import stirling.software.SPDF.model.api.security.AddPasswordRequest; import stirling.software.SPDF.model.api.security.PDFPasswordRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/security") @Tag(name = "Security", description = "Security APIs") public class PasswordController { diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java b/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java index 6c0a5526..d66e3003 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java @@ -20,6 +20,7 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -33,6 +34,7 @@ import stirling.software.SPDF.model.api.security.RedactPdfRequest; import stirling.software.SPDF.pdf.TextFinder; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/security") @Tag(name = "Security", description = "Security APIs") public class RedactController { diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java b/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java index ccf088de..d867cf1d 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java @@ -22,6 +22,7 @@ import org.apache.pdfbox.pdmodel.interactive.form.PDField; 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -33,6 +34,7 @@ import stirling.software.SPDF.model.api.security.SanitizePdfRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/security") public class SanitizeController { @PostMapping(consumes = "multipart/form-data", value = "/sanitize-pdf") diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java b/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java index a46f4ff4..eee30119 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java @@ -24,6 +24,7 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -37,6 +38,7 @@ import stirling.software.SPDF.model.api.security.AddWatermarkRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController +@RequestMapping("/api/v1/security") @Tag(name = "Security", description = "Security APIs") public class WatermarkController { diff --git a/src/main/resources/templates/account.html b/src/main/resources/templates/account.html index 4a7a3174..b7beed7f 100644 --- a/src/main/resources/templates/account.html +++ b/src/main/resources/templates/account.html @@ -42,7 +42,7 @@

-
+
@@ -60,7 +60,7 @@

Change Password?

- +
@@ -129,7 +129,7 @@ document.addEventListener("DOMContentLoaded", async function() { try { - let response = await fetch('/get-api-key', { method: 'POST' }); + let response = await fetch('/api/v1/user/get-api-key', { method: 'POST' }); if (response.status === 200) { let apiKey = await response.text(); manageUIState(apiKey); @@ -143,7 +143,7 @@ async function refreshApiKey() { try { - let response = await fetch('/update-api-key', { method: 'POST' }); + let response = await fetch('/api/v1/user/update-api-key', { method: 'POST' }); if (response.status === 200) { let apiKey = await response.text(); manageUIState(apiKey); diff --git a/src/main/resources/templates/addUsers.html b/src/main/resources/templates/addUsers.html index 094ede17..4ab59a8b 100644 --- a/src/main/resources/templates/addUsers.html +++ b/src/main/resources/templates/addUsers.html @@ -32,7 +32,7 @@ - + @@ -46,7 +46,7 @@
Default message if not found
-
+
diff --git a/src/main/resources/templates/change-creds.html b/src/main/resources/templates/change-creds.html index 6e19bcef..5c62fe1d 100644 --- a/src/main/resources/templates/change-creds.html +++ b/src/main/resources/templates/change-creds.html @@ -37,7 +37,7 @@

Change Username and password

- +
diff --git a/src/main/resources/templates/convert/file-to-pdf.html b/src/main/resources/templates/convert/file-to-pdf.html index f90572f0..fe56c164 100644 --- a/src/main/resources/templates/convert/file-to-pdf.html +++ b/src/main/resources/templates/convert/file-to-pdf.html @@ -15,7 +15,7 @@

- +


diff --git a/src/main/resources/templates/convert/html-to-pdf.html b/src/main/resources/templates/convert/html-to-pdf.html index 7a384d19..546ef1fc 100644 --- a/src/main/resources/templates/convert/html-to-pdf.html +++ b/src/main/resources/templates/convert/html-to-pdf.html @@ -12,7 +12,7 @@

- +

diff --git a/src/main/resources/templates/convert/img-to-pdf.html b/src/main/resources/templates/convert/img-to-pdf.html index 78da1934..c6a2d037 100644 --- a/src/main/resources/templates/convert/img-to-pdf.html +++ b/src/main/resources/templates/convert/img-to-pdf.html @@ -15,7 +15,7 @@

- + diff --git a/src/main/resources/templates/convert/markdown-to-pdf.html b/src/main/resources/templates/convert/markdown-to-pdf.html index 4637d129..7b8be463 100644 --- a/src/main/resources/templates/convert/markdown-to-pdf.html +++ b/src/main/resources/templates/convert/markdown-to-pdf.html @@ -12,7 +12,7 @@

- +

diff --git a/src/main/resources/templates/convert/pdf-to-html.html b/src/main/resources/templates/convert/pdf-to-html.html index 4e28471c..671ff034 100644 --- a/src/main/resources/templates/convert/pdf-to-html.html +++ b/src/main/resources/templates/convert/pdf-to-html.html @@ -12,7 +12,7 @@

- +

diff --git a/src/main/resources/templates/convert/pdf-to-img.html b/src/main/resources/templates/convert/pdf-to-img.html index 443334f4..1d6db966 100644 --- a/src/main/resources/templates/convert/pdf-to-img.html +++ b/src/main/resources/templates/convert/pdf-to-img.html @@ -16,7 +16,7 @@

- +
diff --git a/src/main/resources/templates/convert/pdf-to-pdfa.html b/src/main/resources/templates/convert/pdf-to-pdfa.html index 6a5a17c6..dfddb792 100644 --- a/src/main/resources/templates/convert/pdf-to-pdfa.html +++ b/src/main/resources/templates/convert/pdf-to-pdfa.html @@ -15,7 +15,7 @@

Currently doesn't work for multiple inputs at once

- +

diff --git a/src/main/resources/templates/convert/pdf-to-presentation.html b/src/main/resources/templates/convert/pdf-to-presentation.html index 4c784017..51a0440b 100644 --- a/src/main/resources/templates/convert/pdf-to-presentation.html +++ b/src/main/resources/templates/convert/pdf-to-presentation.html @@ -12,7 +12,7 @@

- +
diff --git a/src/main/resources/templates/convert/pdf-to-text.html b/src/main/resources/templates/convert/pdf-to-text.html index a31dad74..0f479178 100644 --- a/src/main/resources/templates/convert/pdf-to-text.html +++ b/src/main/resources/templates/convert/pdf-to-text.html @@ -12,7 +12,7 @@

- +
diff --git a/src/main/resources/templates/convert/pdf-to-word.html b/src/main/resources/templates/convert/pdf-to-word.html index a10ca12f..d2531084 100644 --- a/src/main/resources/templates/convert/pdf-to-word.html +++ b/src/main/resources/templates/convert/pdf-to-word.html @@ -12,7 +12,7 @@

- +
diff --git a/src/main/resources/templates/convert/pdf-to-xml.html b/src/main/resources/templates/convert/pdf-to-xml.html index 4aecbc66..d32ba5dc 100644 --- a/src/main/resources/templates/convert/pdf-to-xml.html +++ b/src/main/resources/templates/convert/pdf-to-xml.html @@ -12,7 +12,7 @@

- +

diff --git a/src/main/resources/templates/convert/url-to-pdf.html b/src/main/resources/templates/convert/url-to-pdf.html index fb59b4ba..09a0d35a 100644 --- a/src/main/resources/templates/convert/url-to-pdf.html +++ b/src/main/resources/templates/convert/url-to-pdf.html @@ -12,7 +12,7 @@

- +
diff --git a/src/main/resources/templates/crop.html b/src/main/resources/templates/crop.html index 911a8f32..b0347477 100644 --- a/src/main/resources/templates/crop.html +++ b/src/main/resources/templates/crop.html @@ -13,7 +13,7 @@

- +
diff --git a/src/main/resources/templates/extract-page.html b/src/main/resources/templates/extract-page.html index 06900be2..a243461e 100644 --- a/src/main/resources/templates/extract-page.html +++ b/src/main/resources/templates/extract-page.html @@ -13,7 +13,7 @@

- +
diff --git a/src/main/resources/templates/merge-pdfs.html b/src/main/resources/templates/merge-pdfs.html index efd5949b..05982d26 100644 --- a/src/main/resources/templates/merge-pdfs.html +++ b/src/main/resources/templates/merge-pdfs.html @@ -13,7 +13,7 @@

- +
diff --git a/src/main/resources/templates/other/add-image.html b/src/main/resources/templates/misc/add-image.html similarity index 100% rename from src/main/resources/templates/other/add-image.html rename to src/main/resources/templates/misc/add-image.html diff --git a/src/main/resources/templates/other/add-page-numbers.html b/src/main/resources/templates/misc/add-page-numbers.html similarity index 96% rename from src/main/resources/templates/other/add-page-numbers.html rename to src/main/resources/templates/misc/add-page-numbers.html index c7bc5514..1ede15f8 100644 --- a/src/main/resources/templates/other/add-page-numbers.html +++ b/src/main/resources/templates/misc/add-page-numbers.html @@ -18,7 +18,7 @@

+ th:action="@{api/v1/misc/add-page-numbers}">

diff --git a/src/main/resources/templates/other/adjust-contrast.html b/src/main/resources/templates/misc/adjust-contrast.html similarity index 100% rename from src/main/resources/templates/other/adjust-contrast.html rename to src/main/resources/templates/misc/adjust-contrast.html diff --git a/src/main/resources/templates/other/auto-crop.html b/src/main/resources/templates/misc/auto-crop.html similarity index 96% rename from src/main/resources/templates/other/auto-crop.html rename to src/main/resources/templates/misc/auto-crop.html index a7ba407a..d3a8970f 100644 --- a/src/main/resources/templates/other/auto-crop.html +++ b/src/main/resources/templates/misc/auto-crop.html @@ -14,7 +14,7 @@

- +

diff --git a/src/main/resources/templates/other/auto-rename.html b/src/main/resources/templates/misc/auto-rename.html similarity index 93% rename from src/main/resources/templates/other/auto-rename.html rename to src/main/resources/templates/misc/auto-rename.html index 5f3b9dba..137c4290 100644 --- a/src/main/resources/templates/other/auto-rename.html +++ b/src/main/resources/templates/misc/auto-rename.html @@ -14,7 +14,7 @@

- +

diff --git a/src/main/resources/templates/auto-split-pdf.html b/src/main/resources/templates/misc/auto-split-pdf.html similarity index 98% rename from src/main/resources/templates/auto-split-pdf.html rename to src/main/resources/templates/misc/auto-split-pdf.html index cd2596e5..4cc39c99 100644 --- a/src/main/resources/templates/auto-split-pdf.html +++ b/src/main/resources/templates/misc/auto-split-pdf.html @@ -22,7 +22,7 @@
  • - +

    diff --git a/src/main/resources/templates/other/change-metadata.html b/src/main/resources/templates/misc/change-metadata.html similarity index 97% rename from src/main/resources/templates/other/change-metadata.html rename to src/main/resources/templates/misc/change-metadata.html index e341c1eb..68e4fa1c 100644 --- a/src/main/resources/templates/other/change-metadata.html +++ b/src/main/resources/templates/misc/change-metadata.html @@ -13,7 +13,7 @@

    - +

    diff --git a/src/main/resources/templates/other/compare.html b/src/main/resources/templates/misc/compare.html similarity index 100% rename from src/main/resources/templates/other/compare.html rename to src/main/resources/templates/misc/compare.html diff --git a/src/main/resources/templates/other/compress-pdf.html b/src/main/resources/templates/misc/compress-pdf.html similarity index 95% rename from src/main/resources/templates/other/compress-pdf.html rename to src/main/resources/templates/misc/compress-pdf.html index 99612271..ab8e3964 100644 --- a/src/main/resources/templates/other/compress-pdf.html +++ b/src/main/resources/templates/misc/compress-pdf.html @@ -15,7 +15,7 @@

    - +
    diff --git a/src/main/resources/templates/other/extract-image-scans.html b/src/main/resources/templates/misc/extract-image-scans.html similarity index 95% rename from src/main/resources/templates/other/extract-image-scans.html rename to src/main/resources/templates/misc/extract-image-scans.html index 80a2d7fb..42a0544b 100644 --- a/src/main/resources/templates/other/extract-image-scans.html +++ b/src/main/resources/templates/misc/extract-image-scans.html @@ -14,7 +14,7 @@

    - +
    diff --git a/src/main/resources/templates/other/extract-images.html b/src/main/resources/templates/misc/extract-images.html similarity index 91% rename from src/main/resources/templates/other/extract-images.html rename to src/main/resources/templates/misc/extract-images.html index 66a35036..f3f1d4a5 100644 --- a/src/main/resources/templates/other/extract-images.html +++ b/src/main/resources/templates/misc/extract-images.html @@ -14,7 +14,7 @@

    - +
    diff --git a/src/main/resources/templates/other/flatten.html b/src/main/resources/templates/misc/flatten.html similarity index 100% rename from src/main/resources/templates/other/flatten.html rename to src/main/resources/templates/misc/flatten.html diff --git a/src/main/resources/templates/other/multi-page-layout.html b/src/main/resources/templates/misc/multi-page-layout.html similarity index 91% rename from src/main/resources/templates/other/multi-page-layout.html rename to src/main/resources/templates/misc/multi-page-layout.html index a0fc2615..9f2f5373 100644 --- a/src/main/resources/templates/other/multi-page-layout.html +++ b/src/main/resources/templates/misc/multi-page-layout.html @@ -14,7 +14,7 @@

    - +
    diff --git a/src/main/resources/templates/other/ocr-pdf.html b/src/main/resources/templates/misc/ocr-pdf.html similarity index 98% rename from src/main/resources/templates/other/ocr-pdf.html rename to src/main/resources/templates/misc/ocr-pdf.html index 52836b9e..8b9dc454 100644 --- a/src/main/resources/templates/other/ocr-pdf.html +++ b/src/main/resources/templates/misc/ocr-pdf.html @@ -38,7 +38,7 @@

    - +
    diff --git a/src/main/resources/templates/other/remove-blanks.html b/src/main/resources/templates/misc/remove-blanks.html similarity index 93% rename from src/main/resources/templates/other/remove-blanks.html rename to src/main/resources/templates/misc/remove-blanks.html index a464754f..a4d017ec 100644 --- a/src/main/resources/templates/other/remove-blanks.html +++ b/src/main/resources/templates/misc/remove-blanks.html @@ -14,7 +14,7 @@

    - +
    diff --git a/src/main/resources/templates/other/repair.html b/src/main/resources/templates/misc/repair.html similarity index 89% rename from src/main/resources/templates/other/repair.html rename to src/main/resources/templates/misc/repair.html index 8ce329b6..c8ecef40 100644 --- a/src/main/resources/templates/other/repair.html +++ b/src/main/resources/templates/misc/repair.html @@ -14,7 +14,7 @@

    - +
    diff --git a/src/main/resources/templates/other/scale-pages.html b/src/main/resources/templates/misc/scale-pages.html similarity index 96% rename from src/main/resources/templates/other/scale-pages.html rename to src/main/resources/templates/misc/scale-pages.html index c0c4f78e..c252b9e1 100644 --- a/src/main/resources/templates/other/scale-pages.html +++ b/src/main/resources/templates/misc/scale-pages.html @@ -14,7 +14,7 @@

    -
    +
    diff --git a/src/main/resources/templates/other/show-javascript.html b/src/main/resources/templates/misc/show-javascript.html similarity index 98% rename from src/main/resources/templates/other/show-javascript.html rename to src/main/resources/templates/misc/show-javascript.html index ef9e014e..eab3e99b 100644 --- a/src/main/resources/templates/other/show-javascript.html +++ b/src/main/resources/templates/misc/show-javascript.html @@ -49,7 +49,7 @@ // Fetch the formData const formData = new FormData(event.target); - fetch('show-javascript', { + fetch('api/v1/misc/show-javascript', { method: 'POST', body: formData }).then(response => response.text()) diff --git a/src/main/resources/templates/pdf-organizer.html b/src/main/resources/templates/pdf-organizer.html index c6e1508f..696245cb 100644 --- a/src/main/resources/templates/pdf-organizer.html +++ b/src/main/resources/templates/pdf-organizer.html @@ -14,7 +14,7 @@

    - +
    diff --git a/src/main/resources/templates/pdf-to-single-page.html b/src/main/resources/templates/pdf-to-single-page.html index 75007224..e95a5d43 100644 --- a/src/main/resources/templates/pdf-to-single-page.html +++ b/src/main/resources/templates/pdf-to-single-page.html @@ -13,7 +13,7 @@

    - +
    diff --git a/src/main/resources/templates/remove-pages.html b/src/main/resources/templates/remove-pages.html index 271158f9..749a1c2f 100644 --- a/src/main/resources/templates/remove-pages.html +++ b/src/main/resources/templates/remove-pages.html @@ -14,7 +14,7 @@

    -
    +
    diff --git a/src/main/resources/templates/rotate-pdf.html b/src/main/resources/templates/rotate-pdf.html index 9485efc8..edf93d70 100644 --- a/src/main/resources/templates/rotate-pdf.html +++ b/src/main/resources/templates/rotate-pdf.html @@ -15,7 +15,7 @@

    - +
    diff --git a/src/main/resources/templates/split-pdfs.html b/src/main/resources/templates/split-pdfs.html index 718f5cd4..a8a59e02 100644 --- a/src/main/resources/templates/split-pdfs.html +++ b/src/main/resources/templates/split-pdfs.html @@ -23,7 +23,7 @@

    - +
    From 24e665bfd51ec22aebdafa829b1a4793a5063a95 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Mon, 11 Sep 2023 23:42:18 +0100 Subject: [PATCH 09/57] cleanup and defaults --- .../software/SPDF/controller/api/CropController.java | 4 ---- .../software/SPDF/controller/api/MergeController.java | 5 ----- .../SPDF/controller/api/MultiPageLayoutController.java | 3 --- .../SPDF/controller/api/RotationController.java | 3 --- .../SPDF/controller/api/ScalePagesController.java | 3 --- .../SPDF/controller/api/SplitPDFController.java | 4 ---- .../SPDF/controller/api/ToSinglePageController.java | 3 --- .../controller/api/converters/ConvertEpubToPdf.java | 2 -- .../controller/api/converters/ConvertHtmlToPDF.java | 3 --- .../api/converters/ConvertImgPDFController.java | 4 ---- .../api/converters/ConvertMarkdownToPdf.java | 3 --- .../api/converters/ConvertOfficeController.java | 2 -- .../controller/api/converters/ConvertPDFToOffice.java | 5 ----- .../controller/api/converters/ConvertPDFToPDFA.java | 3 --- .../controller/api/converters/ConvertWebsiteToPDF.java | 2 -- .../SPDF/controller/api/filters/FilterController.java | 3 --- .../SPDF/controller/api/misc/AutoRenameController.java | 3 --- .../controller/api/misc/AutoSplitPdfController.java | 2 -- .../SPDF/controller/api/misc/BlankPageController.java | 3 --- .../SPDF/controller/api/misc/CompressController.java | 4 ---- .../api/misc/ExtractImageScansController.java | 8 ++------ .../controller/api/misc/ExtractImagesController.java | 4 ---- .../controller/api/misc/FakeScanControllerWIP.java | 2 -- .../SPDF/controller/api/misc/MetadataController.java | 3 --- .../SPDF/controller/api/misc/OCRController.java | 4 ---- .../controller/api/misc/OverlayImageController.java | 3 --- .../controller/api/misc/PageNumbersController.java | 3 --- .../SPDF/controller/api/misc/RepairController.java | 3 --- .../SPDF/controller/api/misc/ShowJavascript.java | 1 - .../controller/api/pipeline/PipelineController.java | 2 -- .../controller/api/security/CertSignController.java | 4 ---- .../SPDF/controller/api/security/GetInfoOnPDF.java | 2 -- .../controller/api/security/PasswordController.java | 4 ---- .../SPDF/controller/api/security/RedactController.java | 3 --- .../controller/api/security/SanitizeController.java | 3 --- .../controller/api/security/WatermarkController.java | 4 ---- .../SPDF/model/api/general/MergePdfsRequest.java | 2 +- .../SPDF/model/api/misc/ExtractImageScansRequest.java | 10 +++++----- .../SPDF/model/api/misc/ProcessPdfWithOcrRequest.java | 2 +- .../SPDF/model/api/misc/RemoveBlankPagesRequest.java | 4 ++-- .../SPDF/model/api/security/AddPasswordRequest.java | 2 +- .../SPDF/model/api/security/AddWatermarkRequest.java | 10 ++++++---- .../SPDF/model/api/security/RedactPdfRequest.java | 2 +- .../resources/templates/security/add-password.html | 2 +- .../resources/templates/security/add-watermark.html | 2 +- src/main/resources/templates/security/auto-redact.html | 2 +- src/main/resources/templates/security/cert-sign.html | 2 +- .../templates/security/change-permissions.html | 2 +- .../resources/templates/security/get-info-on-pdf.html | 2 +- .../resources/templates/security/remove-password.html | 2 +- .../resources/templates/security/remove-watermark.html | 2 +- .../resources/templates/security/sanitize-pdf.html | 2 +- 52 files changed, 28 insertions(+), 139 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/controller/api/CropController.java b/src/main/java/stirling/software/SPDF/controller/api/CropController.java index 8f8deafc..d2723cce 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/CropController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/CropController.java @@ -16,13 +16,9 @@ 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.RequestParam; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.general.CropPdfForm; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/MergeController.java b/src/main/java/stirling/software/SPDF/controller/api/MergeController.java index f256b692..4727e195 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/MergeController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/MergeController.java @@ -18,16 +18,11 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; -import stirling.software.SPDF.model.api.general.CropPdfForm; import stirling.software.SPDF.model.api.general.MergePdfsRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java b/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java index 4264f844..2f990381 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java @@ -17,13 +17,10 @@ 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.RequestParam; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.general.MergeMultiplePagesRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/RotationController.java b/src/main/java/stirling/software/SPDF/controller/api/RotationController.java index be3fcbff..ed527549 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/RotationController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/RotationController.java @@ -11,13 +11,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.general.RotatePDFRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java b/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java index 4e155d1d..e47aa6c5 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java @@ -18,13 +18,10 @@ 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.RequestParam; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.general.ScalePagesRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java b/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java index 6ddf42f4..8d64ca07 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java @@ -20,16 +20,12 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFWithPageNums; -import stirling.software.SPDF.utils.GeneralUtils; import stirling.software.SPDF.utils.WebResponseUtils; @RestController diff --git a/src/main/java/stirling/software/SPDF/controller/api/ToSinglePageController.java b/src/main/java/stirling/software/SPDF/controller/api/ToSinglePageController.java index 28697531..22bf1d70 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/ToSinglePageController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/ToSinglePageController.java @@ -16,12 +16,9 @@ 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.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertEpubToPdf.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertEpubToPdf.java index 8fd9d809..e821a36a 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertEpubToPdf.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertEpubToPdf.java @@ -17,7 +17,6 @@ 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import org.w3c.dom.Document; @@ -29,7 +28,6 @@ import io.swagger.v3.oas.annotations.Hidden; 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.PDFFile; import stirling.software.SPDF.utils.FileToPdf; import stirling.software.SPDF.utils.WebResponseUtils; 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 f6a2036b..5839dd2d 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 @@ -1,12 +1,9 @@ package stirling.software.SPDF.controller.api.converters; -import java.io.IOException; - 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; 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 e65d1f3c..6c100519 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 @@ -14,14 +14,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.converters.ConvertToImageRequest; import stirling.software.SPDF.model.api.converters.ConvertToPdfRequest; 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 4726562f..4191ecdf 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 @@ -1,7 +1,5 @@ package stirling.software.SPDF.controller.api.converters; -import java.io.IOException; - import org.commonmark.node.Node; import org.commonmark.parser.Parser; import org.commonmark.renderer.html.HtmlRenderer; @@ -9,7 +7,6 @@ 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertOfficeController.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertOfficeController.java index f5f5bc27..e1c18a49 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertOfficeController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertOfficeController.java @@ -13,12 +13,10 @@ 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.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.GeneralFile; import stirling.software.SPDF.utils.ProcessExecutor; diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToOffice.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToOffice.java index 52ac5a8d..11279a27 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToOffice.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToOffice.java @@ -6,16 +6,11 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; -import stirling.software.SPDF.model.api.GeneralFile; import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.model.api.converters.PdfToPresentationRequest; import stirling.software.SPDF.model.api.converters.PdfToTextOrRTFRequest; diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToPDFA.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToPDFA.java index 90f4f06d..32ccb84a 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToPDFA.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertPDFToPDFA.java @@ -1,6 +1,5 @@ package stirling.software.SPDF.controller.api.converters; -import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; @@ -10,12 +9,10 @@ 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.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.utils.ProcessExecutor; diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java index 580fe3a5..7c81edf2 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertWebsiteToPDF.java @@ -10,11 +10,9 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RestController; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.converters.UrlToPdfRequest; import stirling.software.SPDF.utils.GeneralUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/filters/FilterController.java b/src/main/java/stirling/software/SPDF/controller/api/filters/FilterController.java index 8218da33..bdbb6613 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/filters/FilterController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/filters/FilterController.java @@ -9,13 +9,10 @@ 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.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFComparisonAndCount; import stirling.software.SPDF.model.api.PDFWithPageNums; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java index d26b0fee..fc576fd5 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java @@ -14,13 +14,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.ExtractHeaderRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/AutoSplitPdfController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoSplitPdfController.java index 821fbec1..b4b9b951 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/AutoSplitPdfController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoSplitPdfController.java @@ -19,7 +19,6 @@ 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.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -32,7 +31,6 @@ import com.google.zxing.Result; import com.google.zxing.common.HybridBinarizer; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.AutoSplitPdfRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/BlankPageController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/BlankPageController.java index afad69e3..c52ff61a 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/BlankPageController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/BlankPageController.java @@ -23,13 +23,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.RemoveBlankPagesRequest; import stirling.software.SPDF.utils.PdfUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java index d8fdb0d4..1d66674a 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java @@ -25,14 +25,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.OptimizePdfRequest; import stirling.software.SPDF.utils.GeneralUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java index c725ea1a..d5906970 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImageScansController.java @@ -25,21 +25,17 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.parameters.RequestBody; -import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.ExtractImageScansRequest; import stirling.software.SPDF.utils.ProcessExecutor; import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; import stirling.software.SPDF.utils.WebResponseUtils; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; @RestController @RequestMapping("/api/v1/misc") @Tag(name = "Misc", description = "Miscellaneous APIs") diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java index 6546363c..03d21e64 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java @@ -23,14 +23,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFWithImageFormatRequest; import stirling.software.SPDF.utils.WebResponseUtils; 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 21b3d4e2..68e026ab 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 @@ -33,13 +33,11 @@ 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import io.swagger.v3.oas.annotations.Hidden; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java index 836e2200..6ab7c92b 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java @@ -14,13 +14,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.MetadataRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java index bc0e7938..22db7fc3 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java @@ -21,14 +21,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.ProcessPdfWithOcrRequest; import stirling.software.SPDF.utils.ProcessExecutor; 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 5cf6af8d..e28f7535 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 @@ -9,13 +9,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.OverlayImageRequest; import stirling.software.SPDF.utils.PdfUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java index e7f7f4cb..61a1ec97 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/PageNumbersController.java @@ -16,13 +16,10 @@ 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.RequestParam; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.AddPageNumbersRequest; import stirling.software.SPDF.utils.GeneralUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java index 1a0b73b5..f9ae541d 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/RepairController.java @@ -12,15 +12,12 @@ 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.RequestPart; 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.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFFile; -import stirling.software.SPDF.model.api.misc.AddPageNumbersRequest; import stirling.software.SPDF.utils.ProcessExecutor; import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java index 8295f034..27431346 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ShowJavascript.java @@ -12,7 +12,6 @@ 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; diff --git a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java index 5a3f1389..c12fe724 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/pipeline/PipelineController.java @@ -40,8 +40,6 @@ import org.springframework.util.MultiValueMap; 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; import org.springframework.web.multipart.MultipartFile; 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 9e17f2fe..34ee0ec2 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 @@ -47,14 +47,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.security.SignPDFWithCertRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java b/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java index 638d7cf6..7b4aed65 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java @@ -63,7 +63,6 @@ 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.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -72,7 +71,6 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFFile; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java b/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java index 8bec2e82..639b6973 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java @@ -11,14 +11,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.security.AddPasswordRequest; import stirling.software.SPDF.model.api.security.PDFPasswordRequest; diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java b/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java index d66e3003..825544dc 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java @@ -21,13 +21,10 @@ 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.RequestParam; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.PDFText; import stirling.software.SPDF.model.api.security.RedactPdfRequest; diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java b/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java index d867cf1d..b7fbfb0d 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java @@ -23,13 +23,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; import stirling.software.SPDF.model.api.security.SanitizePdfRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java b/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java index eee30119..b19636cd 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java @@ -25,14 +25,10 @@ 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.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; 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.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.security.AddWatermarkRequest; import stirling.software.SPDF.utils.WebResponseUtils; diff --git a/src/main/java/stirling/software/SPDF/model/api/general/MergePdfsRequest.java b/src/main/java/stirling/software/SPDF/model/api/general/MergePdfsRequest.java index c6d3f98c..b7b3bda7 100644 --- a/src/main/java/stirling/software/SPDF/model/api/general/MergePdfsRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/general/MergePdfsRequest.java @@ -18,5 +18,5 @@ public class MergePdfsRequest extends MultiplePDFFiles { "byPDFTitle" }, defaultValue = "orderProvided") - private String sortType; + private String sortType = "orderProvided"; } diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/ExtractImageScansRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/ExtractImageScansRequest.java index f063e4fc..1a575fe6 100644 --- a/src/main/java/stirling/software/SPDF/model/api/misc/ExtractImageScansRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/misc/ExtractImageScansRequest.java @@ -13,17 +13,17 @@ public class ExtractImageScansRequest { private MultipartFile fileInput; @Schema(description = "The angle threshold for the image scan extraction", defaultValue = "5", example = "5") - private int angleThreshold; + private int angleThreshold = 5; @Schema(description = "The tolerance for the image scan extraction", defaultValue = "20", example = "20") - private int tolerance; + private int tolerance = 20; @Schema(description = "The minimum area for the image scan extraction", defaultValue = "8000", example = "8000") - private int minArea; + private int minArea = 8000; @Schema(description = "The minimum contour area for the image scan extraction", defaultValue = "500", example = "500") - private int minContourArea; + private int minContourArea = 500; @Schema(description = "The border size for the image scan extraction", defaultValue = "1", example = "1") - private int borderSize; + private int borderSize =1; } diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/ProcessPdfWithOcrRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/ProcessPdfWithOcrRequest.java index 689e4211..da2703e5 100644 --- a/src/main/java/stirling/software/SPDF/model/api/misc/ProcessPdfWithOcrRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/misc/ProcessPdfWithOcrRequest.java @@ -30,7 +30,7 @@ public class ProcessPdfWithOcrRequest extends PDFFile { private String ocrType; @Schema(description = "Specify the OCR render type, either 'hocr' or 'sandwich'", allowableValues = {"hocr", "sandwich"}, defaultValue = "hocr") - private String ocrRenderType; + private String ocrRenderType = "hocr"; @Schema(description = "Remove images from the output PDF if set to true") private Boolean removeImagesAfter; diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/RemoveBlankPagesRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/RemoveBlankPagesRequest.java index 3f20e2f7..0d2e11c7 100644 --- a/src/main/java/stirling/software/SPDF/model/api/misc/RemoveBlankPagesRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/misc/RemoveBlankPagesRequest.java @@ -10,8 +10,8 @@ import stirling.software.SPDF.model.api.PDFFile; public class RemoveBlankPagesRequest extends PDFFile { @Schema(description = "The threshold value to determine blank pages", example = "10", defaultValue = "10") - private int threshold; + private int threshold = 10; @Schema(description = "The percentage of white color on a page to consider it as blank", example = "99.9", defaultValue = "99.9") - private float whitePercent; + private float whitePercent = 99.9f; } diff --git a/src/main/java/stirling/software/SPDF/model/api/security/AddPasswordRequest.java b/src/main/java/stirling/software/SPDF/model/api/security/AddPasswordRequest.java index 06a52d4f..ea83e470 100644 --- a/src/main/java/stirling/software/SPDF/model/api/security/AddPasswordRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/security/AddPasswordRequest.java @@ -16,7 +16,7 @@ public class AddPasswordRequest extends PDFFile { private String password; @Schema(description = "The length of the encryption key", allowableValues = {"40", "128", "256"}, defaultValue = "256") - private int keyLength; + private int keyLength = 256; @Schema(description = "Whether the document assembly is allowed", example = "false") private boolean canAssembleDocument; diff --git a/src/main/java/stirling/software/SPDF/model/api/security/AddWatermarkRequest.java b/src/main/java/stirling/software/SPDF/model/api/security/AddWatermarkRequest.java index 5fa3f0fb..cd800948 100644 --- a/src/main/java/stirling/software/SPDF/model/api/security/AddWatermarkRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/security/AddWatermarkRequest.java @@ -11,7 +11,9 @@ import stirling.software.SPDF.model.api.PDFFile; @EqualsAndHashCode(callSuper=true) public class AddWatermarkRequest extends PDFFile { - @Schema(description = "The watermark type (text or image)", required = true) + @Schema(description = "The watermark type (text or image)", + allowableValues = {"text", "image"}, + required = true) private String watermarkType; @Schema(description = "The watermark text") @@ -23,13 +25,13 @@ public class AddWatermarkRequest extends PDFFile { @Schema(description = "The selected alphabet", allowableValues = {"roman", "arabic", "japanese", "korean", "chinese"}, defaultValue = "roman") - private String alphabet; + private String alphabet = "roman"; @Schema(description = "The font size of the watermark text", example = "30") - private float fontSize; + private float fontSize = 30; @Schema(description = "The rotation of the watermark in degrees", example = "0") - private float rotation; + private float rotation = 0; @Schema(description = "The opacity of the watermark (0.0 - 1.0)", example = "0.5") private float opacity; diff --git a/src/main/java/stirling/software/SPDF/model/api/security/RedactPdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/security/RedactPdfRequest.java index 1f77bd03..1966c53a 100644 --- a/src/main/java/stirling/software/SPDF/model/api/security/RedactPdfRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/security/RedactPdfRequest.java @@ -19,7 +19,7 @@ public class RedactPdfRequest extends PDFFile { private boolean wholeWordSearch; @Schema(description = "The color for redaction", defaultValue = "#000000") - private String redactColor; + private String redactColor = "#000000"; @Schema(description = "Custom padding for redaction", type = "number") private float customPadding; diff --git a/src/main/resources/templates/security/add-password.html b/src/main/resources/templates/security/add-password.html index b0201158..093f226c 100644 --- a/src/main/resources/templates/security/add-password.html +++ b/src/main/resources/templates/security/add-password.html @@ -13,7 +13,7 @@

    - +
    diff --git a/src/main/resources/templates/security/add-watermark.html b/src/main/resources/templates/security/add-watermark.html index 6a0619ec..1943b365 100644 --- a/src/main/resources/templates/security/add-watermark.html +++ b/src/main/resources/templates/security/add-watermark.html @@ -13,7 +13,7 @@

    - +
    diff --git a/src/main/resources/templates/security/auto-redact.html b/src/main/resources/templates/security/auto-redact.html index 2af1fa45..ec355781 100644 --- a/src/main/resources/templates/security/auto-redact.html +++ b/src/main/resources/templates/security/auto-redact.html @@ -11,7 +11,7 @@

    - +
    diff --git a/src/main/resources/templates/security/cert-sign.html b/src/main/resources/templates/security/cert-sign.html index 9435e67e..fc2e0b8f 100644 --- a/src/main/resources/templates/security/cert-sign.html +++ b/src/main/resources/templates/security/cert-sign.html @@ -16,7 +16,7 @@

    -
    diff --git a/src/main/resources/templates/security/change-permissions.html b/src/main/resources/templates/security/change-permissions.html index 196f05ab..f40ee7b2 100644 --- a/src/main/resources/templates/security/change-permissions.html +++ b/src/main/resources/templates/security/change-permissions.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 d5cc3eca..b1d52335 100644 --- a/src/main/resources/templates/security/get-info-on-pdf.html +++ b/src/main/resources/templates/security/get-info-on-pdf.html @@ -14,7 +14,7 @@

    + th:action="@{api/v1/security/get-info-on-pdf}">

    diff --git a/src/main/resources/templates/security/remove-password.html b/src/main/resources/templates/security/remove-password.html index 1e95f403..cec61959 100644 --- a/src/main/resources/templates/security/remove-password.html +++ b/src/main/resources/templates/security/remove-password.html @@ -13,7 +13,7 @@

    - +
    diff --git a/src/main/resources/templates/security/remove-watermark.html b/src/main/resources/templates/security/remove-watermark.html index 83c83937..8f818998 100644 --- a/src/main/resources/templates/security/remove-watermark.html +++ b/src/main/resources/templates/security/remove-watermark.html @@ -13,7 +13,7 @@

    - +
    diff --git a/src/main/resources/templates/security/sanitize-pdf.html b/src/main/resources/templates/security/sanitize-pdf.html index dfd1f310..bac18a2e 100644 --- a/src/main/resources/templates/security/sanitize-pdf.html +++ b/src/main/resources/templates/security/sanitize-pdf.html @@ -13,7 +13,7 @@

    - +
    From 2c0fb335482cb717d86dd200b71a087518255f26 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Tue, 12 Sep 2023 00:42:22 +0100 Subject: [PATCH 10/57] slow rework testing, still on multipage --- .../api/RearrangePagesPDFController.java | 2 -- .../controller/api/SplitPDFController.java | 2 ++ .../controller/web/GeneralWebController.java | 9 +++++ .../controller/web/OtherWebController.java | 35 ++++++++----------- .../software/SPDF/utils/GeneralUtils.java | 2 +- .../{misc => }/multi-page-layout.html | 2 +- .../resources/templates/pdf-organizer.html | 2 +- src/main/resources/templates/split-pdfs.html | 2 +- 8 files changed, 29 insertions(+), 27 deletions(-) rename src/main/resources/templates/{misc => }/multi-page-layout.html (95%) diff --git a/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java b/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java index 8ca5fc0f..0f045161 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java @@ -180,8 +180,6 @@ public class RearrangePagesPDFController { // Split the page order string into an array of page numbers or range of numbers String[] pageOrderArr = pageOrder != null ? pageOrder.split(",") : new String[0]; int totalPages = document.getNumberOfPages(); - System.out.println("pageOrder=" + pageOrder); - System.out.println("SortTypes length =" + sortType.length()); List newPageOrder; if (sortType != null && sortType.length() > 0) { newPageOrder = processSortTypes(sortType, totalPages); diff --git a/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java b/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java index 8d64ca07..d633bf40 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java @@ -46,6 +46,8 @@ public class SplitPDFController { PDDocument document = PDDocument.load(inputStream); List pageNumbers = request.getPageNumbersList(document); + if(!pageNumbers.contains(document.getNumberOfPages() - 1)) + pageNumbers.add(document.getNumberOfPages()- 1); logger.info("Splitting PDF into pages: {}", pageNumbers.stream().map(String::valueOf).collect(Collectors.joining(","))); // split the document diff --git a/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java b/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java index 2571c785..38bdd9e8 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java +++ b/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java @@ -140,6 +140,15 @@ public class GeneralWebController { return "sign"; } + @GetMapping("/multi-page-layout") + @Hidden + public String multiPageLayoutForm(Model model) { + model.addAttribute("currentPage", "multi-page-layout"); + return "multi-page-layout"; + } + + + @Autowired private ResourceLoader resourceLoader; 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 157f76e4..450d662c 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java +++ b/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java @@ -21,7 +21,7 @@ public class OtherWebController { @Hidden public String compressPdfForm(Model model) { model.addAttribute("currentPage", "compress-pdf"); - return "other/compress-pdf"; + return "misc/compress-pdf"; } @GetMapping("/extract-image-scans") @@ -36,7 +36,7 @@ public class OtherWebController { @Hidden public String extractJavascriptForm(Model model) { model.addAttribute("currentPage", "show-javascript"); - return "other/show-javascript"; + return "misc/show-javascript"; } @@ -44,21 +44,21 @@ public class OtherWebController { @Hidden public String addPageNumbersForm(Model model) { model.addAttribute("currentPage", "add-page-numbers"); - return "other/add-page-numbers"; + return "misc/add-page-numbers"; } @GetMapping("/extract-images") @Hidden public String extractImagesForm(Model model) { model.addAttribute("currentPage", "extract-images"); - return "other/extract-images"; + return "misc/extract-images"; } @GetMapping("/flatten") @Hidden public String flattenForm(Model model) { model.addAttribute("currentPage", "flatten"); - return "other/flatten"; + return "misc/flatten"; } @@ -67,14 +67,14 @@ public class OtherWebController { @Hidden public String addWatermarkForm(Model model) { model.addAttribute("currentPage", "change-metadata"); - return "other/change-metadata"; + return "misc/change-metadata"; } @GetMapping("/compare") @Hidden public String compareForm(Model model) { model.addAttribute("currentPage", "compare"); - return "other/compare"; + return "misc/compare"; } public List getAvailableTesseractLanguages() { @@ -103,56 +103,49 @@ public class OtherWebController { @Hidden public String overlayImage(Model model) { model.addAttribute("currentPage", "add-image"); - return "other/add-image"; + return "misc/add-image"; } @GetMapping("/adjust-contrast") @Hidden public String contrast(Model model) { model.addAttribute("currentPage", "adjust-contrast"); - return "other/adjust-contrast"; + return "misc/adjust-contrast"; } @GetMapping("/repair") @Hidden public String repairForm(Model model) { model.addAttribute("currentPage", "repair"); - return "other/repair"; + return "misc/repair"; } @GetMapping("/remove-blanks") @Hidden public String removeBlanksForm(Model model) { model.addAttribute("currentPage", "remove-blanks"); - return "other/remove-blanks"; - } - - @GetMapping("/multi-page-layout") - @Hidden - public String multiPageLayoutForm(Model model) { - model.addAttribute("currentPage", "multi-page-layout"); - return "other/multi-page-layout"; + return "misc/remove-blanks"; } @GetMapping("/scale-pages") @Hidden public String scalePagesFrom(Model model) { model.addAttribute("currentPage", "scale-pages"); - return "other/scale-pages"; + return "misc/scale-pages"; } @GetMapping("/auto-crop") @Hidden public String autoCropForm(Model model) { model.addAttribute("currentPage", "auto-crop"); - return "other/auto-crop"; + return "misc/auto-crop"; } @GetMapping("/auto-rename") @Hidden public String autoRenameForm(Model model) { model.addAttribute("currentPage", "auto-rename"); - return "other/auto-rename"; + return "misc/auto-rename"; } diff --git a/src/main/java/stirling/software/SPDF/utils/GeneralUtils.java b/src/main/java/stirling/software/SPDF/utils/GeneralUtils.java index b4377039..3097fc1b 100644 --- a/src/main/java/stirling/software/SPDF/utils/GeneralUtils.java +++ b/src/main/java/stirling/software/SPDF/utils/GeneralUtils.java @@ -76,7 +76,7 @@ public class GeneralUtils { } public static List parsePageString(String pageOrder, int totalPages) { - return parsePageList(pageOrder.split(","), 100); + return parsePageList(pageOrder.split(","), totalPages); } public static List parsePageList(String[] pageOrderArr, int totalPages) { List newPageOrder = new ArrayList<>(); diff --git a/src/main/resources/templates/misc/multi-page-layout.html b/src/main/resources/templates/multi-page-layout.html similarity index 95% rename from src/main/resources/templates/misc/multi-page-layout.html rename to src/main/resources/templates/multi-page-layout.html index 9f2f5373..6b1de771 100644 --- a/src/main/resources/templates/misc/multi-page-layout.html +++ b/src/main/resources/templates/multi-page-layout.html @@ -14,7 +14,7 @@

    - +
    diff --git a/src/main/resources/templates/pdf-organizer.html b/src/main/resources/templates/pdf-organizer.html index 696245cb..67b9ba94 100644 --- a/src/main/resources/templates/pdf-organizer.html +++ b/src/main/resources/templates/pdf-organizer.html @@ -32,7 +32,7 @@
    - +
    diff --git a/src/main/resources/templates/split-pdfs.html b/src/main/resources/templates/split-pdfs.html index a8a59e02..5ba3a57a 100644 --- a/src/main/resources/templates/split-pdfs.html +++ b/src/main/resources/templates/split-pdfs.html @@ -28,7 +28,7 @@
    - +

    From 82b641458f9a8525d0e8d714374d0da97398d490 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Wed, 13 Sep 2023 00:46:30 +0100 Subject: [PATCH 11/57] fixes --- .../api/MultiPageLayoutController.java | 100 ++++++++++-------- .../api/RearrangePagesPDFController.java | 3 +- .../controller/api/ScalePagesController.java | 2 +- .../api/misc/AutoRenameController.java | 2 +- .../api/misc/CompressController.java | 2 +- .../api/misc/MetadataController.java | 6 +- .../controller/api/misc/OCRController.java | 12 +-- .../api/security/CertSignController.java | 2 +- .../api/security/SanitizeController.java | 10 +- .../controller/web/GeneralWebController.java | 8 ++ .../controller/web/OtherWebController.java | 12 +-- .../SPDF/model/api/PDFWithPageSize.java | 16 +++ .../model/api/general/ScalePagesRequest.java | 10 +- .../model/api/misc/ExtractHeaderRequest.java | 2 +- .../SPDF/model/api/misc/MetadataRequest.java | 2 +- .../model/api/misc/OptimizePdfRequest.java | 2 +- .../api/misc/ProcessPdfWithOcrRequest.java | 12 +-- .../api/security/SanitizePdfRequest.java | 10 +- .../api/security/SignPDFWithCertRequest.java | 2 +- .../templates/{misc => }/auto-split-pdf.html | 0 .../resources/templates/extract-page.html | 2 +- .../templates/{misc => }/scale-pages.html | 2 +- .../templates/security/get-info-on-pdf.html | 2 +- 23 files changed, 121 insertions(+), 100 deletions(-) create mode 100644 src/main/java/stirling/software/SPDF/model/api/PDFWithPageSize.java rename src/main/resources/templates/{misc => }/auto-split-pdf.html (100%) rename src/main/resources/templates/{misc => }/scale-pages.html (96%) diff --git a/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java b/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java index 2f990381..f899736f 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java @@ -39,63 +39,69 @@ public class MultiPageLayoutController { ) public ResponseEntity mergeMultiplePagesIntoOne(@ModelAttribute MergeMultiplePagesRequest request) throws IOException { - - int pagesPerSheet = request.getPagesPerSheet(); - MultipartFile file = request.getFileInput(); - if (pagesPerSheet != 2 && pagesPerSheet != 3 && pagesPerSheet != (int) Math.sqrt(pagesPerSheet) * Math.sqrt(pagesPerSheet)) { - throw new IllegalArgumentException("pagesPerSheet must be 2, 3 or a perfect square"); - } - int cols = pagesPerSheet == 2 || pagesPerSheet == 3 ? pagesPerSheet : (int) Math.sqrt(pagesPerSheet); - int rows = pagesPerSheet == 2 || pagesPerSheet == 3 ? 1 : (int) Math.sqrt(pagesPerSheet); + int pagesPerSheet = request.getPagesPerSheet(); + MultipartFile file = request.getFileInput(); - PDDocument sourceDocument = PDDocument.load(file.getInputStream()); - PDDocument newDocument = new PDDocument(); - PDPage newPage = new PDPage(PDRectangle.A4); - newDocument.addPage(newPage); + if (pagesPerSheet != 2 && pagesPerSheet != 3 && pagesPerSheet != (int) Math.sqrt(pagesPerSheet) * Math.sqrt(pagesPerSheet)) { + throw new IllegalArgumentException("pagesPerSheet must be 2, 3 or a perfect square"); + } - int totalPages = sourceDocument.getNumberOfPages(); - float cellWidth = newPage.getMediaBox().getWidth() / cols; - float cellHeight = newPage.getMediaBox().getHeight() / rows; + int cols = pagesPerSheet == 2 || pagesPerSheet == 3 ? pagesPerSheet : (int) Math.sqrt(pagesPerSheet); + int rows = pagesPerSheet == 2 || pagesPerSheet == 3 ? 1 : (int) Math.sqrt(pagesPerSheet); - PDPageContentStream contentStream = new PDPageContentStream(newDocument, newPage, PDPageContentStream.AppendMode.APPEND, true, true); + PDDocument sourceDocument = PDDocument.load(file.getInputStream()); + PDDocument newDocument = new PDDocument(); + PDPage newPage = new PDPage(PDRectangle.A4); + newDocument.addPage(newPage); - LayerUtility layerUtility = new LayerUtility(newDocument); + int totalPages = sourceDocument.getNumberOfPages(); + float cellWidth = newPage.getMediaBox().getWidth() / cols; + float cellHeight = newPage.getMediaBox().getHeight() / rows; - for (int i = 0; i < totalPages; i++) { - PDPage sourcePage = sourceDocument.getPage(i); - System.out.println("Reading page " + (i+1)); - PDRectangle rect = sourcePage.getMediaBox(); - float scaleWidth = cellWidth / rect.getWidth(); - float scaleHeight = cellHeight / rect.getHeight(); - float scale = Math.min(scaleWidth, scaleHeight); - System.out.println("Scale for page " + (i+1) + ": " + scale); + PDPageContentStream contentStream = new PDPageContentStream(newDocument, newPage, PDPageContentStream.AppendMode.APPEND, true, true); + LayerUtility layerUtility = new LayerUtility(newDocument); + + for (int i = 0; i < totalPages; i++) { + if (i != 0 && i % pagesPerSheet == 0) { + // Close the current content stream and create a new page and content stream + contentStream.close(); + newPage = new PDPage(PDRectangle.A4); + newDocument.addPage(newPage); + contentStream = new PDPageContentStream(newDocument, newPage, PDPageContentStream.AppendMode.APPEND, true, true); + } + + PDPage sourcePage = sourceDocument.getPage(i); + PDRectangle rect = sourcePage.getMediaBox(); + float scaleWidth = cellWidth / rect.getWidth(); + float scaleHeight = cellHeight / rect.getHeight(); + float scale = Math.min(scaleWidth, scaleHeight); + + int adjustedPageIndex = i % pagesPerSheet; // This will reset the index for every new page + int rowIndex = adjustedPageIndex / cols; + int colIndex = adjustedPageIndex % cols; + + float x = colIndex * cellWidth + (cellWidth - rect.getWidth() * scale) / 2; + float y = newPage.getMediaBox().getHeight() - ((rowIndex + 1) * cellHeight - (cellHeight - rect.getHeight() * scale) / 2); + + contentStream.saveGraphicsState(); + contentStream.transform(Matrix.getTranslateInstance(x, y)); + contentStream.transform(Matrix.getScaleInstance(scale, scale)); + + PDFormXObject formXObject = layerUtility.importPageAsForm(sourceDocument, i); + contentStream.drawForm(formXObject); + + contentStream.restoreGraphicsState(); + } - int rowIndex = i / cols; - int colIndex = i % cols; + contentStream.close(); // Close the final content stream + sourceDocument.close(); - float x = colIndex * cellWidth + (cellWidth - rect.getWidth() * scale) / 2; - float y = newPage.getMediaBox().getHeight() - ((rowIndex + 1) * cellHeight - (cellHeight - rect.getHeight() * scale) / 2); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + newDocument.save(baos); + newDocument.close(); - contentStream.saveGraphicsState(); - contentStream.transform(Matrix.getTranslateInstance(x, y)); - contentStream.transform(Matrix.getScaleInstance(scale, scale)); - - PDFormXObject formXObject = layerUtility.importPageAsForm(sourceDocument, i); - contentStream.drawForm(formXObject); - - contentStream.restoreGraphicsState(); - } - - - contentStream.close(); - sourceDocument.close(); - - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - newDocument.save(baos); - newDocument.close(); - byte[] result = baos.toByteArray(); return WebResponseUtils.bytesToWebResponse(result, file.getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_layoutChanged.pdf"); } diff --git a/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java b/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java index 0f045161..9dd607b8 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java @@ -186,7 +186,8 @@ public class RearrangePagesPDFController { } else { newPageOrder = GeneralUtils.parsePageList(pageOrderArr, totalPages); } - + logger.info("newPageOrder = " +newPageOrder); + logger.info("totalPages = " +totalPages); // Create a new list to hold the pages in the new order List newPages = new ArrayList<>(); for (int i = 0; i < newPageOrder.size(); i++) { diff --git a/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java b/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java index e47aa6c5..743ea6b1 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java @@ -36,7 +36,7 @@ public class ScalePagesController { @Operation(summary = "Change the size of a PDF page/document", description = "This operation takes an input PDF file and the size to scale the pages to in the output PDF file. Input:PDF Output:PDF Type:SISO") public ResponseEntity scalePages(@ModelAttribute ScalePagesRequest request) throws IOException { MultipartFile file = request.getFileInput(); - String targetPDRectangle = request.getTargetPDRectangle(); + String targetPDRectangle = request.getPageSize(); float scaleFactor = request.getScaleFactor(); Map sizeMap = new HashMap<>(); diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java index fc576fd5..fe8337d2 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/AutoRenameController.java @@ -35,7 +35,7 @@ public class AutoRenameController { @Operation(summary = "Extract header from PDF file", description = "This endpoint accepts a PDF file and attempts to extract its title or header based on heuristics. Input:PDF Output:PDF Type:SISO") public ResponseEntity extractHeader(@ModelAttribute ExtractHeaderRequest request) throws Exception { MultipartFile file = request.getFileInput(); - Boolean useFirstTextAsFallback = request.getUseFirstTextAsFallback(); + Boolean useFirstTextAsFallback = request.isUseFirstTextAsFallback(); PDDocument document = PDDocument.load(file.getInputStream()); PDFTextStripper reader = new PDFTextStripper() { diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java index 1d66674a..dd864bc1 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/CompressController.java @@ -48,7 +48,7 @@ public class CompressController { public ResponseEntity optimizePdf(@ModelAttribute OptimizePdfRequest request) throws Exception { MultipartFile inputFile = request.getFileInput(); Integer optimizeLevel = request.getOptimizeLevel(); - String expectedOutputSizeString = request.getExpectedOutputSizeString(); + String expectedOutputSizeString = request.getExpectedOutputSize(); if(expectedOutputSizeString == null && optimizeLevel == null) { diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java index 6ab7c92b..027c6240 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/MetadataController.java @@ -48,7 +48,7 @@ public class MetadataController { MultipartFile pdfFile = request.getFileInput(); // Extract metadata information - Boolean deleteAll = request.getDeleteAll(); + Boolean deleteAll = request.isDeleteAll(); String author = request.getAuthor(); String creationDate = request.getCreationDate(); String creator = request.getCreator(); @@ -61,7 +61,9 @@ public class MetadataController { // Extract additional custom parameters Map allRequestParams = request.getAllRequestParams(); - + if(allRequestParams == null) { + allRequestParams = new java.util.HashMap(); + } // Load the PDF file into a PDDocument PDDocument document = PDDocument.load(pdfFile.getBytes()); diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java index 22db7fc3..5ee06c19 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/OCRController.java @@ -53,14 +53,14 @@ public class OCRController { description = "This endpoint processes a PDF file using OCR (Optical Character Recognition). Users can specify languages, sidecar, deskew, clean, cleanFinal, ocrType, ocrRenderType, and removeImagesAfter options. Input:PDF Output:PDF Type:SI-Conditional") public ResponseEntity processPdfWithOCR(@ModelAttribute ProcessPdfWithOcrRequest request) throws IOException, InterruptedException { MultipartFile inputFile = request.getFileInput(); - List selectedLanguages = request.getSelectedLanguages(); - Boolean sidecar = request.getSidecar(); - Boolean deskew = request.getDeskew(); - Boolean clean = request.getClean(); - Boolean cleanFinal = request.getCleanFinal(); + List selectedLanguages = request.getLanguages(); + Boolean sidecar = request.isSidecar(); + Boolean deskew = request.isDeskew(); + Boolean clean = request.isClean(); + Boolean cleanFinal = request.isCleanFinal(); String ocrType = request.getOcrType(); String ocrRenderType = request.getOcrRenderType(); - Boolean removeImagesAfter = request.getRemoveImagesAfter(); + Boolean removeImagesAfter = request.isRemoveImagesAfter(); // --output-type pdfa if (selectedLanguages == null || selectedLanguages.isEmpty()) { throw new IOException("Please select at least one language."); 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 34ee0ec2..b580b4c9 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 @@ -75,7 +75,7 @@ public class CertSignController { MultipartFile certFile = request.getCertFile(); MultipartFile p12File = request.getP12File(); String password = request.getPassword(); - Boolean showSignature = request.getShowSignature(); + Boolean showSignature = request.isShowSignature(); String reason = request.getReason(); String location = request.getLocation(); String name = request.getName(); diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java b/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java index b7fbfb0d..206a65b4 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java @@ -39,11 +39,11 @@ public class SanitizeController { description = "This endpoint processes a PDF file and removes specific elements based on the provided options. Input:PDF Output:PDF Type:SISO") public ResponseEntity sanitizePDF(@ModelAttribute SanitizePdfRequest request) throws IOException { MultipartFile inputFile = request.getFileInput(); - Boolean removeJavaScript = request.getRemoveJavaScript(); - Boolean removeEmbeddedFiles = request.getRemoveEmbeddedFiles(); - Boolean removeMetadata = request.getRemoveMetadata(); - Boolean removeLinks = request.getRemoveLinks(); - Boolean removeFonts = request.getRemoveFonts(); + boolean removeJavaScript = request.isRemoveJavaScript(); + boolean removeEmbeddedFiles = request.isRemoveEmbeddedFiles(); + boolean removeMetadata = request.isRemoveMetadata(); + boolean removeLinks = request.isRemoveLinks(); + boolean removeFonts = request.isRemoveFonts(); try (PDDocument document = PDDocument.load(inputFile.getInputStream())) { if (removeJavaScript) { diff --git a/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java b/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java index 38bdd9e8..6c934290 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java +++ b/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java @@ -148,6 +148,14 @@ public class GeneralWebController { } + @GetMapping("/scale-pages") + @Hidden + public String scalePagesFrom(Model model) { + model.addAttribute("currentPage", "scale-pages"); + return "scale-pages"; + } + + @Autowired private ResourceLoader resourceLoader; 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 450d662c..721ca83d 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java +++ b/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java @@ -27,7 +27,7 @@ public class OtherWebController { @GetMapping("/extract-image-scans") @Hidden public ModelAndView extractImageScansForm() { - ModelAndView modelAndView = new ModelAndView("other/extract-image-scans"); + ModelAndView modelAndView = new ModelAndView("misc/extract-image-scans"); modelAndView.addObject("currentPage", "extract-image-scans"); return modelAndView; } @@ -90,7 +90,7 @@ public class OtherWebController { @GetMapping("/ocr-pdf") @Hidden public ModelAndView ocrPdfPage() { - ModelAndView modelAndView = new ModelAndView("other/ocr-pdf"); + ModelAndView modelAndView = new ModelAndView("misc/ocr-pdf"); List languages = getAvailableTesseractLanguages(); Collections.sort(languages); modelAndView.addObject("languages", languages); @@ -127,13 +127,7 @@ public class OtherWebController { return "misc/remove-blanks"; } - @GetMapping("/scale-pages") - @Hidden - public String scalePagesFrom(Model model) { - model.addAttribute("currentPage", "scale-pages"); - return "misc/scale-pages"; - } - + @GetMapping("/auto-crop") @Hidden public String autoCropForm(Model model) { diff --git a/src/main/java/stirling/software/SPDF/model/api/PDFWithPageSize.java b/src/main/java/stirling/software/SPDF/model/api/PDFWithPageSize.java new file mode 100644 index 00000000..661a4ffe --- /dev/null +++ b/src/main/java/stirling/software/SPDF/model/api/PDFWithPageSize.java @@ -0,0 +1,16 @@ +package stirling.software.SPDF.model.api; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=true) +public class PDFWithPageSize extends PDFFile { + + @Schema(description = "The scale of pages in the output PDF. Acceptable values are A0-A6, LETTER, LEGAL.", + allowableValues = { + "A0", "A1", "A2", "A3", "A4", "A5", "A6", "LETTER", "LEGAL" + }) + private String pageSize; +} diff --git a/src/main/java/stirling/software/SPDF/model/api/general/ScalePagesRequest.java b/src/main/java/stirling/software/SPDF/model/api/general/ScalePagesRequest.java index 51bdc5fc..28be3990 100644 --- a/src/main/java/stirling/software/SPDF/model/api/general/ScalePagesRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/general/ScalePagesRequest.java @@ -4,17 +4,11 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import stirling.software.SPDF.model.api.PDFFile; +import stirling.software.SPDF.model.api.PDFWithPageSize; @Data @EqualsAndHashCode(callSuper=true) -public class ScalePagesRequest extends PDFFile { - - @Schema(description = "The scale of pages in the output PDF. Acceptable values are A0-A10, B0-B9, LETTER, TABLOID, LEDGER, LEGAL, EXECUTIVE.", - allowableValues = { - "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9", "A10", "B0", "B1", "B2", "B3", "B4", - "B5", "B6", "B7", "B8", "B9", "LETTER", "TABLOID", "LEDGER", "LEGAL", "EXECUTIVE" - }) - private String targetPDRectangle; +public class ScalePagesRequest extends PDFWithPageSize { @Schema(description = "The scale of the content on the pages of the output PDF. Acceptable values are floats.") private float scaleFactor; diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/ExtractHeaderRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/ExtractHeaderRequest.java index 9dda0d6f..f3028445 100644 --- a/src/main/java/stirling/software/SPDF/model/api/misc/ExtractHeaderRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/misc/ExtractHeaderRequest.java @@ -10,5 +10,5 @@ import stirling.software.SPDF.model.api.PDFFile; public class ExtractHeaderRequest extends PDFFile { @Schema(description = "Flag indicating whether to use the first text as a fallback if no suitable title is found. Defaults to false.", required = false, defaultValue = "false") - private Boolean useFirstTextAsFallback; + private boolean useFirstTextAsFallback; } diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/MetadataRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/MetadataRequest.java index 0d909613..d62890aa 100644 --- a/src/main/java/stirling/software/SPDF/model/api/misc/MetadataRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/misc/MetadataRequest.java @@ -12,7 +12,7 @@ import stirling.software.SPDF.model.api.PDFFile; public class MetadataRequest extends PDFFile { @Schema(description = "Delete all metadata if set to true") - private Boolean deleteAll; + private boolean deleteAll; @Schema(description = "The author of the document") private String author; diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/OptimizePdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/OptimizePdfRequest.java index ca43b1eb..bc00cf20 100644 --- a/src/main/java/stirling/software/SPDF/model/api/misc/OptimizePdfRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/misc/OptimizePdfRequest.java @@ -14,5 +14,5 @@ public class OptimizePdfRequest extends PDFFile { private Integer optimizeLevel; @Schema(description = "The expected output size, e.g. '100MB', '25KB', etc.") - private String expectedOutputSizeString; + private String expectedOutputSize; } diff --git a/src/main/java/stirling/software/SPDF/model/api/misc/ProcessPdfWithOcrRequest.java b/src/main/java/stirling/software/SPDF/model/api/misc/ProcessPdfWithOcrRequest.java index da2703e5..392f8d54 100644 --- a/src/main/java/stirling/software/SPDF/model/api/misc/ProcessPdfWithOcrRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/misc/ProcessPdfWithOcrRequest.java @@ -12,19 +12,19 @@ import stirling.software.SPDF.model.api.PDFFile; public class ProcessPdfWithOcrRequest extends PDFFile { @Schema(description = "List of languages to use in OCR processing") - private List selectedLanguages; + private List languages; @Schema(description = "Include OCR text in a sidecar text file if set to true") - private Boolean sidecar; + private boolean sidecar; @Schema(description = "Deskew the input file if set to true") - private Boolean deskew; + private boolean deskew; @Schema(description = "Clean the input file if set to true") - private Boolean clean; + private boolean clean; @Schema(description = "Clean the final output if set to true") - private Boolean cleanFinal; + private boolean cleanFinal; @Schema(description = "Specify the OCR type, e.g., 'skip-text', 'force-ocr', or 'Normal'", allowableValues = {"skip-text", "force-ocr", "Normal"}) private String ocrType; @@ -33,5 +33,5 @@ public class ProcessPdfWithOcrRequest extends PDFFile { private String ocrRenderType = "hocr"; @Schema(description = "Remove images from the output PDF if set to true") - private Boolean removeImagesAfter; + private boolean removeImagesAfter; } diff --git a/src/main/java/stirling/software/SPDF/model/api/security/SanitizePdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/security/SanitizePdfRequest.java index 310ee59c..98c7743f 100644 --- a/src/main/java/stirling/software/SPDF/model/api/security/SanitizePdfRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/security/SanitizePdfRequest.java @@ -10,17 +10,17 @@ import stirling.software.SPDF.model.api.PDFFile; public class SanitizePdfRequest extends PDFFile { @Schema(description = "Remove JavaScript actions from the PDF", defaultValue = "false") - private Boolean removeJavaScript; + private boolean removeJavaScript; @Schema(description = "Remove embedded files from the PDF", defaultValue = "false") - private Boolean removeEmbeddedFiles; + private boolean removeEmbeddedFiles; @Schema(description = "Remove metadata from the PDF", defaultValue = "false") - private Boolean removeMetadata; + private boolean removeMetadata; @Schema(description = "Remove links from the PDF", defaultValue = "false") - private Boolean removeLinks; + private boolean removeLinks; @Schema(description = "Remove fonts from the PDF", defaultValue = "false") - private Boolean removeFonts; + private boolean removeFonts; } diff --git a/src/main/java/stirling/software/SPDF/model/api/security/SignPDFWithCertRequest.java b/src/main/java/stirling/software/SPDF/model/api/security/SignPDFWithCertRequest.java index 5b2122c6..8e537c6a 100644 --- a/src/main/java/stirling/software/SPDF/model/api/security/SignPDFWithCertRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/security/SignPDFWithCertRequest.java @@ -27,7 +27,7 @@ public class SignPDFWithCertRequest extends PDFFile { private String password; @Schema(description = "Whether to visually show the signature in the PDF file") - private Boolean showSignature; + private boolean showSignature; @Schema(description = "The reason for signing the PDF") private String reason; diff --git a/src/main/resources/templates/misc/auto-split-pdf.html b/src/main/resources/templates/auto-split-pdf.html similarity index 100% rename from src/main/resources/templates/misc/auto-split-pdf.html rename to src/main/resources/templates/auto-split-pdf.html diff --git a/src/main/resources/templates/extract-page.html b/src/main/resources/templates/extract-page.html index a243461e..d8ae7fb5 100644 --- a/src/main/resources/templates/extract-page.html +++ b/src/main/resources/templates/extract-page.html @@ -18,7 +18,7 @@
    - +
    diff --git a/src/main/resources/templates/misc/scale-pages.html b/src/main/resources/templates/scale-pages.html similarity index 96% rename from src/main/resources/templates/misc/scale-pages.html rename to src/main/resources/templates/scale-pages.html index c252b9e1..1b59e38f 100644 --- a/src/main/resources/templates/misc/scale-pages.html +++ b/src/main/resources/templates/scale-pages.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 b1d52335..f2de0919 100644 --- a/src/main/resources/templates/security/get-info-on-pdf.html +++ b/src/main/resources/templates/security/get-info-on-pdf.html @@ -40,7 +40,7 @@ const formData = new FormData(event.target); - fetch('get-info-on-pdf', { + fetch('api/v1/security/get-info-on-pdf', { method: 'POST', body: formData }) From fc4feb2096294c74c40cffa40e70374a8d00e767 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Thu, 14 Sep 2023 11:33:02 +0100 Subject: [PATCH 12/57] lang --- README.md | 9 +-- build.gradle | 2 +- src/main/resources/messages_ar_AR.properties | 33 +++++---- src/main/resources/messages_ca_CA.properties | 31 +++++---- src/main/resources/messages_de_DE.properties | 70 ++++++-------------- src/main/resources/messages_en_US.properties | 33 +++++---- src/main/resources/messages_es_ES.properties | 33 +++++---- src/main/resources/messages_eu_ES.properties | 35 +++++----- src/main/resources/messages_fr_FR.properties | 37 ++++++++--- src/main/resources/messages_it_IT.properties | 33 +++++---- src/main/resources/messages_ja_JP.properties | 33 +++++---- src/main/resources/messages_ko_KR.properties | 33 +++++---- src/main/resources/messages_nl_NL.properties | 33 +++++---- src/main/resources/messages_pl_PL.properties | 33 +++++---- src/main/resources/messages_pt_BR.properties | 33 +++++---- src/main/resources/messages_ro_RO.properties | 33 +++++---- src/main/resources/messages_ru_RU.properties | 33 +++++---- src/main/resources/messages_sv_SE.properties | 33 +++++---- src/main/resources/messages_zh_CN.properties | 33 +++++---- 19 files changed, 340 insertions(+), 273 deletions(-) diff --git a/README.md b/README.md index ba032a8d..a034eaf2 100644 --- a/README.md +++ b/README.md @@ -173,9 +173,6 @@ The Current list of settings is ``` security: enableLogin: false # set to 'true' to enable login - initialLogin: - username: 'username' # Specify the initial username for first boot (e.g. 'admin') - password: 'password' # Specify the initial password for first boot (e.g. 'password123') csrfDisabled: true system: @@ -213,11 +210,11 @@ For those wanting to use Stirling-PDFs backend API to link with their own custom ### Prerequisites: - User must have the folder ./configs volumed within docker so that it is retained during updates. - Docker uses must download the security jar version by setting ``DOCKER_ENABLE_SECURITY`` to ``true`` in environment variables. -- Now the initial user must be generated. Navigate to your settings.yaml and configure your security settings along with the username and password (only required on the first boot to create the initial user, ignored after.). Alternatively, you can set these via the environment variables ``SECURITY_ENABLELOGIN : true`` ``SECURITY_INITIALLOGIN_USERNAME: username`` ``SECURITY_INITIALLOGIN_PASSWORD: password`` +- Now the initial user will be generated with username ``admin`` and password ``stirling``. On login you will be forced to change the password to a new one. Once the above has been done, on restart, a new stirling-pdf-DB.mv.db will show if everything worked. -When you login to Stirling PDF you will be redirected to /login page to login with those credentials. After login everything should function as normal +When you login to Stirling PDF you will be redirected to /login page to login with those default credentials. After login everything should function as normal To access your account settings go to Account settings in the settings cog menu (top right in navbar) This Account settings menu is also where you find your API key. @@ -232,7 +229,7 @@ For API usage you must provide a header with 'X-API-Key' and the associated API - Progress bar/Tracking - Full custom logic pipelines to combine multiple operations together. - Folder support with auto scanning to perform operations on -- Redact text (Via UI) +- Redact text (Via UI not just automated way) - Add Forms - Annotations - Multi page layout (Stich PDF pages together) support x rows y columns and custom page sizing diff --git a/build.gradle b/build.gradle index bc62189e..e528ec1c 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { } group = 'stirling.software' -version = '0.13.1' +version = '0.14.0' sourceCompatibility = '17' repositories { diff --git a/src/main/resources/messages_ar_AR.properties b/src/main/resources/messages_ar_AR.properties index 54e816e6..a4d97973 100644 --- a/src/main/resources/messages_ar_AR.properties +++ b/src/main/resources/messages_ar_AR.properties @@ -35,9 +35,6 @@ delete=Delete username=Username password=Password welcome=Welcome -########################## -### TODO: Translate ### -########################## property=Property black=Black white=White @@ -46,7 +43,11 @@ green=Green blue=Blue custom=Custom... - +changedCredsMessage=Credentials changed! +notAuthenticatedMessage=User not authenticated. +userNotFoundMessage=User not found. +incorrectPasswordMessage=Current password is incorrect. +usernameExistsMessage=New Username already exists. @@ -74,6 +75,19 @@ settings.zipThreshold=\u0645\u0644\u0641\u0627\u062A \u0645\u0636\u063A\u0648\u0 settings.signOut=Sign Out settings.accountSettings=Account Settings + + +changeCreds.title=Change Credentials +changeCreds.header=Update Your Account Details +changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) +changeCreds.newUsername=New Username +changeCreds.oldPassword=Current Password +changeCreds.newPassword=New Password +changeCreds.confirmNewPassword=Confirm New Password +changeCreds.submit=Submit Changes + + + account.title=Account Settings account.accountSettings=Account Settings account.adminSettings=Admin Settings - View and Add Users @@ -105,6 +119,7 @@ adminUserSettings.role=Role adminUserSettings.actions=Actions adminUserSettings.apiUser=Limited API User adminUserSettings.webOnlyUser=Web Only User +adminUserSettings.forceChange=Force user to change username/password on login adminUserSettings.submit=Save User ############# @@ -333,9 +348,6 @@ login.signinTitle=Please sign in #auto-redact autoRedact.title=Auto Redact autoRedact.header=Auto Redact -########################## -### TODO: Translate ### -########################## autoRedact.colorLabel=Colour autoRedact.textsToRedactLabel=Text to Redact (line-separated) autoRedact.textsToRedactPlaceholder=e.g. \nConfidential \nTop-Secret @@ -756,13 +768,6 @@ changeMetadata.selectText.5=\u0625\u0636\u0627\u0641\u0629 \u0625\u062F\u062E\u0 changeMetadata.submit=\u062A\u063A\u064A\u064A\u0631 -#xlsToPdf -xlsToPdf.title=\u062A\u062D\u0648\u064A\u0644 Excel \u0625\u0644\u0649 PDF -xlsToPdf.header=\u062A\u062D\u0648\u064A\u0644 Excel \u0625\u0644\u0649 PDF -xlsToPdf.selectText.1=\u062D\u062F\u062F \u0648\u0631\u0642\u0629 \u0625\u0643\u0633\u0644 XLS \u0623\u0648 XLSX \u0644\u0644\u062A\u062D\u0648\u064A\u0644 -xlsToPdf.convert=\u062A\u062D\u0648\u064A\u0644 - - #pdfToPDFA pdfToPDFA.title=PDF \u0625\u0644\u0649 PDF / A pdfToPDFA.header=PDF \u0625\u0644\u0649 PDF / A diff --git a/src/main/resources/messages_ca_CA.properties b/src/main/resources/messages_ca_CA.properties index 23aaabb6..d4141c67 100644 --- a/src/main/resources/messages_ca_CA.properties +++ b/src/main/resources/messages_ca_CA.properties @@ -35,7 +35,6 @@ delete=Esborra username=Usuari password=Contrasenya welcome=Benvingut - property=Propietat black=Negre white=Blanc @@ -44,7 +43,11 @@ green=Verd blue=Blau custom=Personalitzat... - +changedCredsMessage=Credentials changed! +notAuthenticatedMessage=User not authenticated. +userNotFoundMessage=User not found. +incorrectPasswordMessage=Current password is incorrect. +usernameExistsMessage=New Username already exists. @@ -72,6 +75,19 @@ settings.zipThreshold=Comprimiu els fitxers quan el nombre de fitxers baixats su settings.signOut=Sortir settings.accountSettings=Account Settings + + +changeCreds.title=Change Credentials +changeCreds.header=Update Your Account Details +changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) +changeCreds.newUsername=New Username +changeCreds.oldPassword=Current Password +changeCreds.newPassword=New Password +changeCreds.confirmNewPassword=Confirm New Password +changeCreds.submit=Submit Changes + + + account.title=Opcions del compte account.accountSettings=Opcions del compte account.adminSettings=Opcions d'Admin - Veure i afegir usuaris @@ -103,6 +119,7 @@ adminUserSettings.role=Rol adminUserSettings.actions=Accions adminUserSettings.apiUser=Usuari amb API limitada adminUserSettings.webOnlyUser=Usuari només WEB +adminUserSettings.forceChange=Force user to change username/password on login adminUserSettings.submit=Desar Usuari ############# @@ -331,9 +348,6 @@ login.signinTitle=Autenticat #auto-redact autoRedact.title=Auto Redact autoRedact.header=Auto Redact -########################## -### TODO: Translate ### -########################## autoRedact.colorLabel=Colour autoRedact.textsToRedactLabel=Text to Redact (line-separated) autoRedact.textsToRedactPlaceholder=e.g. \nConfidential \nTop-Secret @@ -754,13 +768,6 @@ changeMetadata.selectText.5=Afegir entrada personalizada changeMetadata.submit=Canvia -#xlsToPdf -xlsToPdf.title=Excel a PDF -xlsToPdf.header=Excel a PDF -xlsToPdf.selectText.1=Selecciona arxiu XLS o XLSX a convertir -xlsToPdf.convert=Converteix - - #pdfToPDFA pdfToPDFA.title=PDF a PDF/A pdfToPDFA.header=PDF a PDF/A diff --git a/src/main/resources/messages_de_DE.properties b/src/main/resources/messages_de_DE.properties index a937649b..88fa9ad7 100644 --- a/src/main/resources/messages_de_DE.properties +++ b/src/main/resources/messages_de_DE.properties @@ -4,7 +4,6 @@ # the direction that the language is written (ltr=left to right, rtl = right to left) language.direction=ltr - pdfPrompt=PDF auswählen multiPdfPrompt=PDFs auswählen(2+) multiPdfDropPrompt=Wählen Sie alle gewünschten PDFs aus (oder ziehen Sie sie per Drag & Drop hierhin) @@ -44,6 +43,13 @@ green=Grün blue=Blau custom=benutzerdefiniert... +changedCredsMessage=Credentials changed! +notAuthenticatedMessage=User not authenticated. +userNotFoundMessage=User not found. +incorrectPasswordMessage=Current password is incorrect. +usernameExistsMessage=New Username already exists. + + ############# # NAVBAR # @@ -55,7 +61,6 @@ navbar.darkmode=Dark Mode navbar.pageOps=Seitenoperationen navbar.settings=Einstellungen - ############# # SETTINGS # ############# @@ -71,11 +76,23 @@ settings.signOut=Abmelden settings.accountSettings=Kontoeinstellungen + +changeCreds.title=Change Credentials +changeCreds.header=Update Your Account Details +changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) +changeCreds.newUsername=New Username +changeCreds.oldPassword=Current Password +changeCreds.newPassword=New Password +changeCreds.confirmNewPassword=Confirm New Password +changeCreds.submit=Submit Changes + + + account.title=Kontoeinstellungen account.accountSettings=Kontoeinstellungen account.adminSettings=Admin Einstellungen - Benutzer anzeigen und hinzufügen account.userControlSettings=Benutzerkontrolle -account.changeUsername=Benutzername ändern +account.changeUsername=Passwort ändern account.changeUsername=Passwort ändern account.password=Bestätigungspasswort account.oldPassword=Altes Passwort @@ -102,9 +119,9 @@ adminUserSettings.role=Rolle adminUserSettings.actions=Aktion adminUserSettings.apiUser=Eingeschränkter API-Benutzer adminUserSettings.webOnlyUser=Nur Web-Benutzer +adminUserSettings.forceChange=Force user to change username/password on login adminUserSettings.submit=Benutzer speichern - ############# # HOME-PAGE # ############# @@ -115,17 +132,14 @@ home.multiTool.title=PDF-Multitool home.multiTool.desc=Seiten zusammenführen, drehen, neu anordnen und entfernen multiTool.tags=Multi Tool,Multi operation,UI,click drag,front end,client side - home.merge.title=Zusammenführen home.merge.desc=Mehrere PDF-Dateien zu einer einzigen zusammenführen. merge.tags=merge,Page operations,Back end,server side - home.split.title=Aufteilen home.split.desc=PDFs in mehrere Dokumente aufteilen. split.tags=Page operations,divide,Multi Page,cut,server side - home.rotate.title=Drehen home.rotate.desc=Drehen Sie Ihre PDFs ganz einfach. rotate.tags=server side @@ -135,12 +149,10 @@ home.imageToPdf.title=Bild zu PDF home.imageToPdf.desc=Konvertieren Sie ein Bild (PNG, JPEG, GIF) in ein PDF. imageToPdf.tags=conversion,img,jpg,picture,photo - home.pdfToImage.title=PDF zu Bild home.pdfToImage.desc=Konvertieren Sie ein PDF in ein Bild (PNG, JPEG, GIF). pdfToImage.tags=conversion,img,jpg,picture,photo - home.pdfOrganiser.title=Organisieren home.pdfOrganiser.desc=Seiten entfernen und Seitenreihenfolge ändern. pdfOrganiser.tags=duplex,even,odd,sort,move @@ -150,12 +162,10 @@ home.addImage.title=Bild einfügen home.addImage.desc=Fügt ein Bild an eine bestimmte Stelle im PDF ein (in Arbeit). addImage.tags=img,jpg,picture,photo - home.watermark.title=Wasserzeichen hinzufügen home.watermark.desc=Fügen Sie ein eigenes Wasserzeichen zu Ihrem PDF hinzu. watermark.tags=Text,repeating,label,own,copyright,trademark,img,jpg,picture,photo - home.permissions.title=Berechtigungen ändern home.permissions.desc=Die Berechtigungen für Ihr PDF-Dokument verändern. permissions.tags=read,write,edit,print @@ -165,17 +175,14 @@ home.removePages.title=Entfernen home.removePages.desc=Ungewollte Seiten aus dem PDF entfernen. removePages.tags=Remove pages,delete pages - home.addPassword.title=Passwort hinzufügen home.addPassword.desc=Das PDF mit einem Passwort verschlüsseln. addPassword.tags=secure,security - home.removePassword.title=Passwort entfernen home.removePassword.desc=Den Passwortschutz eines PDFs entfernen. removePassword.tags=secure,Decrypt,security,unpassword,delete password - home.compressPdfs.title=Komprimieren home.compressPdfs.desc=PDF komprimieren um die Dateigröße zu reduzieren. compressPdfs.tags=squish,small,tiny @@ -185,12 +192,10 @@ home.changeMetadata.title=Metadaten ändern home.changeMetadata.desc=Ändern/Entfernen/Hinzufügen von Metadaten aus einem PDF-Dokument changeMetadata.tags==Title,author,date,creation,time,publisher,producer,stats - home.fileToPDF.title=Datei in PDF konvertieren home.fileToPDF.desc=Konvertieren Sie nahezu jede Datei in PDF (DOCX, PNG, XLS, PPT, TXT und mehr) fileToPDF.tags=transformation,format,document,picture,slide,text,conversion,office,docs,word,excel,powerpoint - home.ocr.title=Führe OCR auf PDF- und/oder Cleanup-Scans aus home.ocr.desc=Cleanup scannt und erkennt Text aus Bildern in einer PDF-Datei und fügt ihn erneut als Text hinzu. ocr.tags=recognition,text,image,scan,read,identify,detection,editable @@ -200,27 +205,22 @@ home.extractImages.title=Bilder extrahieren home.extractImages.desc=Extrahiert alle Bilder aus einer PDF-Datei und speichert sie als Zip-Archiv extractImages.tags=picture,photo,save,archive,zip,capture,grab - home.pdfToPDFA.title=PDF zu PDF/A konvertieren home.pdfToPDFA.desc=PDF zu PDF/A für Langzeitarchivierung konvertieren pdfToPDFA.tags=archive,long-term,standard,conversion,storage,preservation - home.PDFToWord.title=PDF zu Word home.PDFToWord.desc=PDF in Word-Formate konvertieren (DOC, DOCX und ODT) PDFToWord.tags=doc,docx,odt,word,transformation,format,conversion,office,microsoft,docfile - home.PDFToPresentation.title=PDF zu Präsentation home.PDFToPresentation.desc=PDF in Präsentationsformate konvertieren (PPT, PPTX und ODP) PDFToPresentation.tags=slides,show,office,microsoft - home.PDFToText.title=PDF in Text/RTF home.PDFToText.desc=PDF in Text- oder RTF-Format konvertieren PDFToText.tags=richformat,richtextformat,rich text format - home.PDFToHTML.title=PDF in HTML home.PDFToHTML.desc=PDF in HTML-Format konvertieren PDFToHTML.tags=web content,browser friendly @@ -230,92 +230,74 @@ home.PDFToXML.title=PDF in XML home.PDFToXML.desc=PDF in XML-Format konvertieren PDFToXML.tags=data-extraction,structured-content,interop,transformation,convert - home.ScannerImageSplit.title=Gescannte Fotos erkennen/aufteilen home.ScannerImageSplit.desc=Teilt mehrere Fotos innerhalb eines Fotos/PDF ScannerImageSplit.tags=separate,auto-detect,scans,multi-photo,organize - home.sign.title=Signieren home.sign.desc=Fügt PDF-Signaturen durch Zeichnung, Text oder Bild hinzu sign.tags=authorize,initials,drawn-signature,text-sign,image-signature - home.flatten.title=Abflachen home.flatten.desc=Alle interaktiven Elemente und Formulare aus einem PDF entfernen flatten.tags=static,deactivate,non-interactive,streamline - home.repair.title=Reparatur home.repair.desc=Versucht, ein beschädigtes/kaputtes PDF zu reparieren repair.tags=fix,restore,correction,recover - home.removeBlanks.title=Leere Seiten entfernen home.removeBlanks.desc=Erkennt und entfernt leere Seiten aus einem Dokument removeBlanks.tags=cleanup,streamline,non-content,organize - home.compare.title=Vergleichen home.compare.desc=Vergleicht und zeigt die Unterschiede zwischen zwei PDF-Dokumenten an compare.tags=differentiate,contrast,changes,analysis - home.certSign.title=Mit Zertifikat signieren home.certSign.desc=Ein PDF mit einem Zertifikat/Schlüssel (PEM/P12) signieren certSign.tags=authenticate,PEM,P12,official,encrypt - home.pageLayout.title=Mehrseitiges Layout home.pageLayout.desc=Mehrere Seiten eines PDF zu einer Seite zusammenführen pageLayout.tags=merge,composite,single-view,organize - home.scalePages.title=Seitengröße/Skalierung anpassen home.scalePages.desc=Größe/Skalierung der Seite und/oder des Inhalts ändern scalePages.tags=resize,modify,dimension,adapt - home.pipeline.title=Pipeline (Fortgeschritten) home.pipeline.desc=Mehrere Aktionen auf ein PDF anwenden, definiert durch einen Pipeline Skript pipeline.tags=automate,sequence,scripted,batch-process - home.add-page-numbers.title=Seitenzahlen hinzufügen home.add-page-numbers.desc=Hinzufügen von Seitenzahlen an einer bestimmten Stelle add-page-numbers.tags=paginate,label,organize,index - home.auto-rename.title=PDF automatisch umbenennen home.auto-rename.desc=PDF-Datei anhand von erkannten Kopfzeilen umbenennen auto-rename.tags=auto-detect,header-based,organize,relabel - home.adjust-contrast.title=Farben/Kontrast anpassen home.adjust-contrast.desc=Kontrast, Sättigung und Helligkeit einer PDF anpassen adjust-contrast.tags=color-correction,tune,modify,enhance - home.crop.title=PDF zuschneiden home.crop.desc=PDF zuschneiden um die Größe zu verändern (Text bleibt erhalten!) crop.tags=trim,shrink,edit,shape - home.autoSplitPDF.title=PDF automatisch teilen home.autoSplitPDF.desc=Physisch gescannte PDF anhand von Splitter-Seiten und QR-Codes aufteilen autoSplitPDF.tags=QR-based,separate,scan-segment,organize - home.sanitizePdf.title=PDF Bereinigen home.sanitizePdf.desc=Entfernen von Skripten und anderen Elementen aus PDF-Dateien sanitizePdf.tags=clean,secure,safe,remove-threats - home.URLToPDF.title=URL/Website zu PDF home.URLToPDF.desc=Konvertiert jede http(s)URL zu PDF URLToPDF.tags=web-capture,save-page,web-to-doc,archive - home.HTMLToPDF.title=HTML zu PDF home.HTMLToPDF.desc=Konvertiert jede HTML-Datei oder Zip-Archiv zu PDF HTMLToPDF.tags=markup,web-content,transformation,convert @@ -345,12 +327,10 @@ home.showJS.title=Javascript anzeigen home.showJS.desc=Alle Javascript Funktionen in einer PDF anzeigen showJS.tags=JS - home.autoRedact.title=Automatisch zensieren/schwärzen home.autoRedact.desc=Automatisches zensiertes (Schwärzen) von Text in einer PDF-Datei basierend auf dem eingegebenen Text showJS.tags=JS - ########################### # # # WEB PAGES # @@ -412,6 +392,7 @@ MarkdownToPDF.help=In Arbeit MarkdownToPDF.credit=Verwendet WeasyPrint + #url-to-pdf URLToPDF.title=URL zu PDF URLToPDF.header=URL zu PDF @@ -787,13 +768,6 @@ changeMetadata.selectText.5=Benutzerdefinierten Metadateneintrag hinzufügen changeMetadata.submit=Ändern -#xlsToPdf -xlsToPdf.title=Excel in PDF -xlsToPdf.header=Excel in PDF -xlsToPdf.selectText.1=XLS- oder XLSX-Excel-Tabelle zum Konvertieren auswählen -xlsToPdf.convert=konvertieren - - #pdfToPDFA pdfToPDFA.title=PDF zu PDF/A pdfToPDFA.header=PDF zu PDF/A diff --git a/src/main/resources/messages_en_US.properties b/src/main/resources/messages_en_US.properties index 38807e3d..e80128c9 100644 --- a/src/main/resources/messages_en_US.properties +++ b/src/main/resources/messages_en_US.properties @@ -35,9 +35,6 @@ delete=Delete username=Username password=Password welcome=Welcome -########################## -### TODO: Translate ### -########################## property=Property black=Black white=White @@ -46,7 +43,11 @@ green=Green blue=Blue custom=Custom... - +changedCredsMessage=Credentials changed! +notAuthenticatedMessage=User not authenticated. +userNotFoundMessage=User not found. +incorrectPasswordMessage=Current password is incorrect. +usernameExistsMessage=New Username already exists. @@ -74,6 +75,19 @@ settings.zipThreshold=Zip files when the number of downloaded files exceeds settings.signOut=Sign Out settings.accountSettings=Account Settings + + +changeCreds.title=Change Credentials +changeCreds.header=Update Your Account Details +changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) +changeCreds.newUsername=New Username +changeCreds.oldPassword=Current Password +changeCreds.newPassword=New Password +changeCreds.confirmNewPassword=Confirm New Password +changeCreds.submit=Submit Changes + + + account.title=Account Settings account.accountSettings=Account Settings account.adminSettings=Admin Settings - View and Add Users @@ -105,6 +119,7 @@ adminUserSettings.role=Role adminUserSettings.actions=Actions adminUserSettings.apiUser=Limited API User adminUserSettings.webOnlyUser=Web Only User +adminUserSettings.forceChange=Force user to change username/password on login adminUserSettings.submit=Save User ############# @@ -333,9 +348,6 @@ login.signinTitle=Please sign in #auto-redact autoRedact.title=Auto Redact autoRedact.header=Auto Redact -########################## -### TODO: Translate ### -########################## autoRedact.colorLabel=Color autoRedact.textsToRedactLabel=Text to Redact (line-separated) autoRedact.textsToRedactPlaceholder=e.g. \nConfidential \nTop-Secret @@ -756,13 +768,6 @@ changeMetadata.selectText.5=Add Custom Metadata Entry changeMetadata.submit=Change -#xlsToPdf -xlsToPdf.title=Excel to PDF -xlsToPdf.header=Excel to PDF -xlsToPdf.selectText.1=Select XLS or XLSX Excel sheet to convert -xlsToPdf.convert=convert - - #pdfToPDFA pdfToPDFA.title=PDF To PDF/A pdfToPDFA.header=PDF To PDF/A diff --git a/src/main/resources/messages_es_ES.properties b/src/main/resources/messages_es_ES.properties index 37edd2cf..370e6859 100644 --- a/src/main/resources/messages_es_ES.properties +++ b/src/main/resources/messages_es_ES.properties @@ -35,9 +35,6 @@ delete=Delete username=Username password=Password welcome=Welcome -########################## -### TODO: Translate ### -########################## property=Property black=Black white=White @@ -46,7 +43,11 @@ green=Green blue=Blue custom=Custom... - +changedCredsMessage=Credentials changed! +notAuthenticatedMessage=User not authenticated. +userNotFoundMessage=User not found. +incorrectPasswordMessage=Current password is incorrect. +usernameExistsMessage=New Username already exists. @@ -74,6 +75,19 @@ settings.zipThreshold=Ficheros ZIP cuando excede el número de ficheros descarga settings.signOut=Sign Out settings.accountSettings=Account Settings + + +changeCreds.title=Change Credentials +changeCreds.header=Update Your Account Details +changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) +changeCreds.newUsername=New Username +changeCreds.oldPassword=Current Password +changeCreds.newPassword=New Password +changeCreds.confirmNewPassword=Confirm New Password +changeCreds.submit=Submit Changes + + + account.title=Account Settings account.accountSettings=Account Settings account.adminSettings=Admin Settings - View and Add Users @@ -105,6 +119,7 @@ adminUserSettings.role=Role adminUserSettings.actions=Actions adminUserSettings.apiUser=Limited API User adminUserSettings.webOnlyUser=Web Only User +adminUserSettings.forceChange=Force user to change username/password on login adminUserSettings.submit=Save User ############# @@ -333,9 +348,6 @@ login.signinTitle=Please sign in #auto-redact autoRedact.title=Auto Redact autoRedact.header=Auto Redact -########################## -### TODO: Translate ### -########################## autoRedact.colorLabel=Colour autoRedact.textsToRedactLabel=Text to Redact (line-separated) autoRedact.textsToRedactPlaceholder=e.g. \nConfidential \nTop-Secret @@ -756,13 +768,6 @@ changeMetadata.selectText.5=Agregar entrada de metadatos personalizados changeMetadata.submit=Cambiar -#xlsToPdf -xlsToPdf.title=Excel a PDF -xlsToPdf.header=Excel a PDF -xlsToPdf.selectText.1=Seleccionar hoja de cálculo de Excel XLS o XLSX para convertir -xlsToPdf.convert=Convertir - - #pdfToPDFA pdfToPDFA.title=PDF a PDF/A pdfToPDFA.header=PDF a PDF/A diff --git a/src/main/resources/messages_eu_ES.properties b/src/main/resources/messages_eu_ES.properties index f7dab20b..2e2540be 100644 --- a/src/main/resources/messages_eu_ES.properties +++ b/src/main/resources/messages_eu_ES.properties @@ -35,9 +35,6 @@ delete=ezabatu username=Erabiltzaile izena password=Pasahitza welcome=Ongi etorria -########################## -### TODO: Translate ### -########################## property=Propietate black=Beltza white=Txuria @@ -46,7 +43,11 @@ green=Berdea blue=Urdina custom=Pertsonalizatu... - +changedCredsMessage=Credentials changed! +notAuthenticatedMessage=User not authenticated. +userNotFoundMessage=User not found. +incorrectPasswordMessage=Current password is incorrect. +usernameExistsMessage=New Username already exists. @@ -74,6 +75,19 @@ settings.zipThreshold=ZIP fitxategiak deskargatutako fitxategi kopurua gainditze settings.signOut=Saioa itxi settings.accountSettings=Kontuaren ezarpenak + + +changeCreds.title=Change Credentials +changeCreds.header=Update Your Account Details +changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) +changeCreds.newUsername=New Username +changeCreds.oldPassword=Current Password +changeCreds.newPassword=New Password +changeCreds.confirmNewPassword=Confirm New Password +changeCreds.submit=Submit Changes + + + account.title=Kontuaren ezarpenak account.accountSettings=Kontuaren ezarpenak account.adminSettings=Admin ezarpenak - Ikusi eta gehitu Erabiltzaileak @@ -105,6 +119,7 @@ adminUserSettings.role=Rol adminUserSettings.actions=Ekintzak adminUserSettings.apiUser=APIren erabiltzaile mugatua adminUserSettings.webOnlyUser=Web-erabiltzailea bakarrik +adminUserSettings.forceChange=Force user to change username/password on login adminUserSettings.submit=Gorde Erabiltzailea ############# @@ -333,9 +348,6 @@ login.signinTitle=Mesedez, hasi saioa #auto-redact autoRedact.title=Auto Idatzi autoRedact.header=Auto Idatzi -########################## -### TODO: Translate ### -########################## autoRedact.colorLabel=Kolorea autoRedact.textsToRedactLabel=Idazteko testua (lerro bidez bereizia) autoRedact.textsToRedactPlaceholder=adib. \nKonfidentziala \nTop-Secret @@ -418,7 +430,7 @@ addPageNumbers.selectText.5=Orrialde kopurua addPageNumbers.selectText.6=Testu pertsonalizatua addPageNumbers.customTextDesc=Testu pertsonalizatua addPageNumbers.numberPagesDesc=Zein orri numeratu, lehenetsita 'denak', 1-5 edo 2,5,9 etab onartzen ditu -addPageNumbers.customNumberDesc=Lehenetsoa {n}-ra, '{n} orria {total}-tik', 'Text-{n}', '{filename}-{n}' ere onartzen du +addPageNumbers.customNumberDesc=Lehenetsoa {n}-ra, '{n} orria {total}-tik', 'Text-{n}', '{filename}-{n}' ere onartzen du addPageNumbers.submit=Gehitu orrialde-zenbakiak @@ -756,13 +768,6 @@ changeMetadata.selectText.5=Gehitu metadatu pertsonalizatuen sarrera changeMetadata.submit=Aldatu -#xlsToPdf -xlsToPdf.title=Excela PDF bihurtu -xlsToPdf.header=Excela PDF bihurtu -xlsToPdf.selectText.1=Hautatu Excel XLSren edo XLSXren kalkulu-orria bihurtzeko -xlsToPdf.convert=Bikurtu - - #pdfToPDFA pdfToPDFA.title=PDFa PDF/A bihurtu pdfToPDFA.header=PDFa PDF/A bihurtu diff --git a/src/main/resources/messages_fr_FR.properties b/src/main/resources/messages_fr_FR.properties index fd302f2e..765afae4 100644 --- a/src/main/resources/messages_fr_FR.properties +++ b/src/main/resources/messages_fr_FR.properties @@ -1,7 +1,7 @@ ########### # Generic # ########### -# the direction that the language is written (ltr = left to right, rtl = right to left) +# the direction that the language is written (ltr=left to right, rtl = right to left) language.direction=ltr pdfPrompt=Sélectionnez le(s) PDF @@ -43,7 +43,11 @@ green=Vert blue=Bleu custom=Personnalisé\u2026 - +changedCredsMessage=Credentials changed! +notAuthenticatedMessage=User not authenticated. +userNotFoundMessage=User not found. +incorrectPasswordMessage=Current password is incorrect. +usernameExistsMessage=New Username already exists. @@ -71,11 +75,25 @@ settings.zipThreshold=Compresser les fichiers en ZIP lorsque le nombre de fichie settings.signOut=Déconnexion settings.accountSettings=Paramètres du compte + + +changeCreds.title=Change Credentials +changeCreds.header=Update Your Account Details +changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) +changeCreds.newUsername=New Username +changeCreds.oldPassword=Current Password +changeCreds.newPassword=New Password +changeCreds.confirmNewPassword=Confirm New Password +changeCreds.submit=Submit Changes + + + account.title=Paramètres du compte account.accountSettings=Paramètres du compte account.adminSettings=Paramètres d\u2019administration \u2013 Voir et ajouter des utilisateurs account.userControlSettings=Contrôle des paramètres des utilisateurs account.changeUsername=Modifier le nom d\u2019utilisateur +account.changeUsername=Modifier le nom d\u2019utilisateur account.password=Mot de passe de confirmation account.oldPassword=Ancien mot de passe account.newPassword=Nouveau mot de passe @@ -101,6 +119,7 @@ adminUserSettings.role=Rôle adminUserSettings.actions=Actions adminUserSettings.apiUser=Utilisateur API limité adminUserSettings.webOnlyUser=Utilisateur Web uniquement +adminUserSettings.forceChange=Force user to change username/password on login adminUserSettings.submit=Ajouter ############# @@ -306,7 +325,7 @@ PdfToSinglePage.tags=fusionner,merge,une seule page,single page home.showJS.title=Afficher le JavaScript home.showJS.desc=Recherche et affiche tout JavaScript injecté dans un PDF. -showJS.tags=afficher,javascript,js +showJS.tags=caviarder,redact,auto home.autoRedact.title=Caviarder automatiquement home.autoRedact.desc=Caviardez automatiquement les informations sensibles d\u2019un PDF. @@ -538,7 +557,7 @@ ScannerImageSplit.selectText.8=Définit la surface de contour minimale pour une ScannerImageSplit.selectText.9=Taille de la bordure ScannerImageSplit.selectText.10=Définit la taille de la bordure ajoutée et supprimée pour éviter les bordures blanches dans la sortie (par défaut\u00a0: 1). - + #OCR ocr.title=OCR / Nettoyage des numérisations ocr.header=OCR (Reconnaissance optique de caractères) / Nettoyage des numérisations @@ -627,7 +646,7 @@ rotate.selectAngle=Angle de rotation (par multiples de 90\u202fdegrés) rotate.submit=Pivoter -#split +#merge split.title=Diviser split.header=Diviser split.desc.1=Les numéros que vous sélectionnez sont le numéro de page sur lequel vous souhaitez faire une division @@ -642,17 +661,17 @@ split.splitPages=Pages sur lesquelles diviser split.submit=Diviser -#imageToPDF +#merge imageToPDF.title=Image en PDF imageToPDF.header=Image en PDF +imageToPDF.submit=Convertir imageToPDF.selectText.1=Étirer pour adapter imageToPDF.selectText.2=Rotation automatique du PDF imageToPDF.selectText.3=Logique multi-fichiers (uniquement activée si vous travaillez avec plusieurs images) imageToPDF.selectText.4=Fusionner en un seul PDF imageToPDF.selectText.5=Convertir en PDF séparés -imageToPDF.submit=Convertir - - + + #pdfToImage pdfToImage.title=Image en PDF pdfToImage.header=Image en PDF diff --git a/src/main/resources/messages_it_IT.properties b/src/main/resources/messages_it_IT.properties index 4594e9f8..35f2627e 100644 --- a/src/main/resources/messages_it_IT.properties +++ b/src/main/resources/messages_it_IT.properties @@ -35,9 +35,6 @@ delete=Elimina username=Username password=Password welcome=Benvenuto -########################## -### TODO: Translate ### -########################## property=Proprietà black=Nero white=Bianco @@ -46,7 +43,11 @@ green=Verde blue=Blu custom=Personalizzato - +changedCredsMessage=Credentials changed! +notAuthenticatedMessage=User not authenticated. +userNotFoundMessage=User not found. +incorrectPasswordMessage=Current password is incorrect. +usernameExistsMessage=New Username already exists. @@ -74,6 +75,19 @@ settings.zipThreshold=Comprimi file in .zip quando il numero di download supera settings.signOut=Logout settings.accountSettings=Impostazioni Account + + +changeCreds.title=Change Credentials +changeCreds.header=Update Your Account Details +changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) +changeCreds.newUsername=New Username +changeCreds.oldPassword=Current Password +changeCreds.newPassword=New Password +changeCreds.confirmNewPassword=Confirm New Password +changeCreds.submit=Submit Changes + + + account.title=Impostazioni Account account.accountSettings=Impostazioni Account account.adminSettings=Impostazioni Admin - Aggiungi e Vedi Utenti @@ -105,6 +119,7 @@ adminUserSettings.role=Ruolo adminUserSettings.actions=Azioni adminUserSettings.apiUser=Utente API limitato adminUserSettings.webOnlyUser=Utente solo Web +adminUserSettings.forceChange=Force user to change username/password on login adminUserSettings.submit=Salva utente ############# @@ -333,9 +348,6 @@ login.signinTitle=Per favore accedi #auto-redact autoRedact.title=Redazione automatica autoRedact.header=Redazione automatica -########################## -### TODO: Translate ### -########################## autoRedact.colorLabel=Colore autoRedact.textsToRedactLabel=Testo da oscurare (separato da righe) autoRedact.textsToRedactPlaceholder=per esempio. \nConfidenziale \nTop-Secret @@ -756,13 +768,6 @@ changeMetadata.selectText.5=Aggiungi proprietà personalizzata: changeMetadata.submit=Cambia Proprietà -#xlsToPdf -xlsToPdf.title=Da Excel a PDF -xlsToPdf.header=Da Excel a PDF -xlsToPdf.selectText.1=Seleziona un foglio XLS o XLSX da convertire -xlsToPdf.convert=Converti - - #pdfToPDFA pdfToPDFA.title=Da PDF a PDF/A pdfToPDFA.header=Da PDF a PDF/A diff --git a/src/main/resources/messages_ja_JP.properties b/src/main/resources/messages_ja_JP.properties index 4a80c08f..9e061f6a 100644 --- a/src/main/resources/messages_ja_JP.properties +++ b/src/main/resources/messages_ja_JP.properties @@ -35,9 +35,6 @@ delete=削除 username=ユーザー名 password=パスワード welcome=ようこそ -########################## -### TODO: Translate ### -########################## property=プロパティ black=黒 white=白 @@ -46,7 +43,11 @@ green=緑 blue=青 custom=カスタム... - +changedCredsMessage=Credentials changed! +notAuthenticatedMessage=User not authenticated. +userNotFoundMessage=User not found. +incorrectPasswordMessage=Current password is incorrect. +usernameExistsMessage=New Username already exists. @@ -74,6 +75,19 @@ settings.zipThreshold=このファイル数を超えたときにファイルを settings.signOut=サインアウト settings.accountSettings=アカウント設定 + + +changeCreds.title=Change Credentials +changeCreds.header=Update Your Account Details +changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) +changeCreds.newUsername=New Username +changeCreds.oldPassword=Current Password +changeCreds.newPassword=New Password +changeCreds.confirmNewPassword=Confirm New Password +changeCreds.submit=Submit Changes + + + account.title=アカウント設定 account.accountSettings=アカウント設定 account.adminSettings=管理者設定 - ユーザーの表示と追加 @@ -105,6 +119,7 @@ adminUserSettings.role=役割 adminUserSettings.actions=アクション adminUserSettings.apiUser=限定されたAPIユーザー adminUserSettings.webOnlyUser=ウェブ専用ユーザー +adminUserSettings.forceChange=Force user to change username/password on login adminUserSettings.submit=ユーザーの保存 ############# @@ -333,9 +348,6 @@ login.signinTitle=サインインしてください #auto-redact autoRedact.title=自動塗りつぶし autoRedact.header=自動塗りつぶし -########################## -### TODO: Translate ### -########################## autoRedact.colorLabel=カラー autoRedact.textsToRedactLabel=編集するテキスト (line-separated) autoRedact.textsToRedactPlaceholder=例 \n機密 \n極秘 @@ -756,13 +768,6 @@ changeMetadata.selectText.5=カスタムメタデータの追加 changeMetadata.submit=変更 -#xlsToPdf -xlsToPdf.title=ExcelをPDFに変換 -xlsToPdf.header=ExcelをPDFに変換 -xlsToPdf.selectText.1=変換するXLSまたはXLSX Execlシートを選択 -xlsToPdf.convert=変換 - - #pdfToPDFA pdfToPDFA.title=PDFをPDF/Aに変換 pdfToPDFA.header=PDFをPDF/Aに変換 diff --git a/src/main/resources/messages_ko_KR.properties b/src/main/resources/messages_ko_KR.properties index 39471e4a..f25c8fb4 100644 --- a/src/main/resources/messages_ko_KR.properties +++ b/src/main/resources/messages_ko_KR.properties @@ -35,9 +35,6 @@ delete=Delete username=Username password=Password welcome=Welcome -########################## -### TODO: Translate ### -########################## property=Property black=Black white=White @@ -46,7 +43,11 @@ green=Green blue=Blue custom=Custom... - +changedCredsMessage=Credentials changed! +notAuthenticatedMessage=User not authenticated. +userNotFoundMessage=User not found. +incorrectPasswordMessage=Current password is incorrect. +usernameExistsMessage=New Username already exists. @@ -74,6 +75,19 @@ settings.zipThreshold=다운로드한 파일 수가 초과된 경우 파일 압 settings.signOut=Sign Out settings.accountSettings=Account Settings + + +changeCreds.title=Change Credentials +changeCreds.header=Update Your Account Details +changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) +changeCreds.newUsername=New Username +changeCreds.oldPassword=Current Password +changeCreds.newPassword=New Password +changeCreds.confirmNewPassword=Confirm New Password +changeCreds.submit=Submit Changes + + + account.title=Account Settings account.accountSettings=Account Settings account.adminSettings=Admin Settings - View and Add Users @@ -105,6 +119,7 @@ adminUserSettings.role=Role adminUserSettings.actions=Actions adminUserSettings.apiUser=Limited API User adminUserSettings.webOnlyUser=Web Only User +adminUserSettings.forceChange=Force user to change username/password on login adminUserSettings.submit=Save User ############# @@ -333,9 +348,6 @@ login.signinTitle=Please sign in #auto-redact autoRedact.title=Auto Redact autoRedact.header=Auto Redact -########################## -### TODO: Translate ### -########################## autoRedact.colorLabel=Colour autoRedact.textsToRedactLabel=Text to Redact (line-separated) autoRedact.textsToRedactPlaceholder=e.g. \nConfidential \nTop-Secret @@ -756,13 +768,6 @@ changeMetadata.selectText.5=사용자 정의 메타데이터 항목 추가 changeMetadata.submit=변경 -#xlsToPdf -xlsToPdf.title=Excel to PDF -xlsToPdf.header=Excel을 PDF로 변환 -xlsToPdf.selectText.1=변환할 XLS 또는 XLSX Excel 시트 선택 -xlsToPdf.convert=변환하기 - - #pdfToPDFA pdfToPDFA.title=PDF To PDF/A pdfToPDFA.header=PDF를 PDF/A로 변환 diff --git a/src/main/resources/messages_nl_NL.properties b/src/main/resources/messages_nl_NL.properties index 1043641a..f39c98e3 100644 --- a/src/main/resources/messages_nl_NL.properties +++ b/src/main/resources/messages_nl_NL.properties @@ -35,9 +35,6 @@ delete=Verwijderen username=Gebruikersnaam password=Wachtwoord welcome=Welkom -########################## -### TODO: Translate ### -########################## property=Property black=Black white=White @@ -46,7 +43,11 @@ green=Green blue=Blue custom=Custom... - +changedCredsMessage=Credentials changed! +notAuthenticatedMessage=User not authenticated. +userNotFoundMessage=User not found. +incorrectPasswordMessage=Current password is incorrect. +usernameExistsMessage=New Username already exists. @@ -74,6 +75,19 @@ settings.zipThreshold=Zip bestanden wanneer het aantal gedownloade bestanden ove settings.signOut=Uitloggen settings.accountSettings=Account instellingen + + +changeCreds.title=Change Credentials +changeCreds.header=Update Your Account Details +changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) +changeCreds.newUsername=New Username +changeCreds.oldPassword=Current Password +changeCreds.newPassword=New Password +changeCreds.confirmNewPassword=Confirm New Password +changeCreds.submit=Submit Changes + + + account.title=Account instellingen account.accountSettings=Account instellingen account.adminSettings=Beheerdersinstellingen - Gebruikers bekijken en toevoegen @@ -105,6 +119,7 @@ adminUserSettings.role=Rol adminUserSettings.actions=Acties adminUserSettings.apiUser=Beperkte API gebruiker adminUserSettings.webOnlyUser=Alleen web gebruiker +adminUserSettings.forceChange=Force user to change username/password on login adminUserSettings.submit=Sla gebruiker op ############# @@ -333,9 +348,6 @@ login.signinTitle=Please sign in #auto-redact autoRedact.title=Auto Redact autoRedact.header=Auto Redact -########################## -### TODO: Translate ### -########################## autoRedact.colorLabel=Colour autoRedact.textsToRedactLabel=Text to Redact (line-separated) autoRedact.textsToRedactPlaceholder=e.g. \nConfidential \nTop-Secret @@ -756,13 +768,6 @@ changeMetadata.selectText.5=Voeg aangepaste metadata-invoer toe changeMetadata.submit=Wijzigen -#xlsToPdf -xlsToPdf.title=Excel naar PDF -xlsToPdf.header=Excel naar PDF -xlsToPdf.selectText.1=Selecteer XLS of XLSX Excel-blad om te converteren -xlsToPdf.convert=Converteren - - #pdfToPDFA pdfToPDFA.title=PDF naar PDF/A pdfToPDFA.header=PDF naar PDF/A diff --git a/src/main/resources/messages_pl_PL.properties b/src/main/resources/messages_pl_PL.properties index 3fa81afb..d2eaa61f 100644 --- a/src/main/resources/messages_pl_PL.properties +++ b/src/main/resources/messages_pl_PL.properties @@ -35,9 +35,6 @@ delete=Delete username=Username password=Password welcome=Welcome -########################## -### TODO: Translate ### -########################## property=Property black=Black white=White @@ -46,7 +43,11 @@ green=Green blue=Blue custom=Custom... - +changedCredsMessage=Credentials changed! +notAuthenticatedMessage=User not authenticated. +userNotFoundMessage=User not found. +incorrectPasswordMessage=Current password is incorrect. +usernameExistsMessage=New Username already exists. @@ -74,6 +75,19 @@ settings.zipThreshold=Spakuj pliki, gdy liczba pobranych plików przekroczy settings.signOut=Sign Out settings.accountSettings=Account Settings + + +changeCreds.title=Change Credentials +changeCreds.header=Update Your Account Details +changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) +changeCreds.newUsername=New Username +changeCreds.oldPassword=Current Password +changeCreds.newPassword=New Password +changeCreds.confirmNewPassword=Confirm New Password +changeCreds.submit=Submit Changes + + + account.title=Account Settings account.accountSettings=Account Settings account.adminSettings=Admin Settings - View and Add Users @@ -105,6 +119,7 @@ adminUserSettings.role=Role adminUserSettings.actions=Actions adminUserSettings.apiUser=Limited API User adminUserSettings.webOnlyUser=Web Only User +adminUserSettings.forceChange=Force user to change username/password on login adminUserSettings.submit=Save User ############# @@ -333,9 +348,6 @@ login.signinTitle=Please sign in #auto-redact autoRedact.title=Auto Redact autoRedact.header=Auto Redact -########################## -### TODO: Translate ### -########################## autoRedact.colorLabel=Colour autoRedact.textsToRedactLabel=Text to Redact (line-separated) autoRedact.textsToRedactPlaceholder=e.g. \nConfidential \nTop-Secret @@ -756,13 +768,6 @@ changeMetadata.selectText.5=Dodaj niestandardowy wpis w metadanych changeMetadata.submit=Zmień -#xlsToPdf -xlsToPdf.title=Excel na PDF -xlsToPdf.header=Excel na PDF -xlsToPdf.selectText.1=Wybierz arkusz Microsoft Excel XLS lub XLSX do konwersji -xlsToPdf.convert=Konwertuj - - #pdfToPDFA pdfToPDFA.title=PDF na PDF/A pdfToPDFA.header=PDF na PDF/A diff --git a/src/main/resources/messages_pt_BR.properties b/src/main/resources/messages_pt_BR.properties index d1645d3e..1c904be9 100644 --- a/src/main/resources/messages_pt_BR.properties +++ b/src/main/resources/messages_pt_BR.properties @@ -35,9 +35,6 @@ delete=Delete username=Username password=Password welcome=Welcome -########################## -### TODO: Translate ### -########################## property=Property black=Black white=White @@ -46,7 +43,11 @@ green=Green blue=Blue custom=Custom... - +changedCredsMessage=Credentials changed! +notAuthenticatedMessage=User not authenticated. +userNotFoundMessage=User not found. +incorrectPasswordMessage=Current password is incorrect. +usernameExistsMessage=New Username already exists. @@ -74,6 +75,19 @@ settings.zipThreshold=Compactar arquivos quando o número de arquivos baixados e settings.signOut=Sign Out settings.accountSettings=Account Settings + + +changeCreds.title=Change Credentials +changeCreds.header=Update Your Account Details +changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) +changeCreds.newUsername=New Username +changeCreds.oldPassword=Current Password +changeCreds.newPassword=New Password +changeCreds.confirmNewPassword=Confirm New Password +changeCreds.submit=Submit Changes + + + account.title=Account Settings account.accountSettings=Account Settings account.adminSettings=Admin Settings - View and Add Users @@ -105,6 +119,7 @@ adminUserSettings.role=Role adminUserSettings.actions=Actions adminUserSettings.apiUser=Limited API User adminUserSettings.webOnlyUser=Web Only User +adminUserSettings.forceChange=Force user to change username/password on login adminUserSettings.submit=Save User ############# @@ -333,9 +348,6 @@ login.signinTitle=Please sign in #auto-redact autoRedact.title=Auto Redact autoRedact.header=Auto Redact -########################## -### TODO: Translate ### -########################## autoRedact.colorLabel=Colour autoRedact.textsToRedactLabel=Text to Redact (line-separated) autoRedact.textsToRedactPlaceholder=e.g. \nConfidential \nTop-Secret @@ -756,13 +768,6 @@ changeMetadata.selectText.5=Adicionar Entrada de Metadados Personalizados changeMetadata.submit=Mudar -#xlsToPdf -xlsToPdf.title=Excel para PDF -xlsToPdf.header=Excel para PDF -xlsToPdf.selectText.1=Selecione a Planilha Excel XLS ou XLSX para Converter -xlsToPdf.convert=Converter - - #pdfToPDFA pdfToPDFA.title=PDF para PDF/A pdfToPDFA.header=PDF para PDF/A diff --git a/src/main/resources/messages_ro_RO.properties b/src/main/resources/messages_ro_RO.properties index 98b58a58..6bf5f1d2 100644 --- a/src/main/resources/messages_ro_RO.properties +++ b/src/main/resources/messages_ro_RO.properties @@ -35,9 +35,6 @@ delete=Delete username=Username password=Password welcome=Welcome -########################## -### TODO: Translate ### -########################## property=Property black=Black white=White @@ -46,7 +43,11 @@ green=Green blue=Blue custom=Custom... - +changedCredsMessage=Credentials changed! +notAuthenticatedMessage=User not authenticated. +userNotFoundMessage=User not found. +incorrectPasswordMessage=Current password is incorrect. +usernameExistsMessage=New Username already exists. @@ -74,6 +75,19 @@ settings.zipThreshold=Împachetează fișierele când numărul de fișiere desc settings.signOut=Sign Out settings.accountSettings=Account Settings + + +changeCreds.title=Change Credentials +changeCreds.header=Update Your Account Details +changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) +changeCreds.newUsername=New Username +changeCreds.oldPassword=Current Password +changeCreds.newPassword=New Password +changeCreds.confirmNewPassword=Confirm New Password +changeCreds.submit=Submit Changes + + + account.title=Account Settings account.accountSettings=Account Settings account.adminSettings=Admin Settings - View and Add Users @@ -105,6 +119,7 @@ adminUserSettings.role=Role adminUserSettings.actions=Actions adminUserSettings.apiUser=Limited API User adminUserSettings.webOnlyUser=Web Only User +adminUserSettings.forceChange=Force user to change username/password on login adminUserSettings.submit=Save User ############# @@ -333,9 +348,6 @@ login.signinTitle=Please sign in #auto-redact autoRedact.title=Auto Redact autoRedact.header=Auto Redact -########################## -### TODO: Translate ### -########################## autoRedact.colorLabel=Colour autoRedact.textsToRedactLabel=Text to Redact (line-separated) autoRedact.textsToRedactPlaceholder=e.g. \nConfidential \nTop-Secret @@ -756,13 +768,6 @@ changeMetadata.selectText.5=Adăugați Intrare Metadate Personalizate changeMetadata.submit=Schimbare -#xlsToPdf -xlsToPdf.title=Excel to PDF -xlsToPdf.header=Excel to PDF -xlsToPdf.selectText.1=Selectați fișierul Excel XLS sau XLSX pentru a converti -xlsToPdf.convert=convert - - #pdfToPDFA pdfToPDFA.title=PDF către PDF/A pdfToPDFA.header=PDF către PDF/A diff --git a/src/main/resources/messages_ru_RU.properties b/src/main/resources/messages_ru_RU.properties index 08f86f6b..f71192dc 100644 --- a/src/main/resources/messages_ru_RU.properties +++ b/src/main/resources/messages_ru_RU.properties @@ -35,9 +35,6 @@ delete=Delete username=Username password=Password welcome=Welcome -########################## -### TODO: Translate ### -########################## property=Property black=Black white=White @@ -46,7 +43,11 @@ green=Green blue=Blue custom=Custom... - +changedCredsMessage=Credentials changed! +notAuthenticatedMessage=User not authenticated. +userNotFoundMessage=User not found. +incorrectPasswordMessage=Current password is incorrect. +usernameExistsMessage=New Username already exists. @@ -74,6 +75,19 @@ settings.zipThreshold=Zip-файлы, когда количество загру settings.signOut=Sign Out settings.accountSettings=Account Settings + + +changeCreds.title=Change Credentials +changeCreds.header=Update Your Account Details +changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) +changeCreds.newUsername=New Username +changeCreds.oldPassword=Current Password +changeCreds.newPassword=New Password +changeCreds.confirmNewPassword=Confirm New Password +changeCreds.submit=Submit Changes + + + account.title=Account Settings account.accountSettings=Account Settings account.adminSettings=Admin Settings - View and Add Users @@ -105,6 +119,7 @@ adminUserSettings.role=Role adminUserSettings.actions=Actions adminUserSettings.apiUser=Limited API User adminUserSettings.webOnlyUser=Web Only User +adminUserSettings.forceChange=Force user to change username/password on login adminUserSettings.submit=Save User ############# @@ -333,9 +348,6 @@ login.signinTitle=Please sign in #auto-redact autoRedact.title=Auto Redact autoRedact.header=Auto Redact -########################## -### TODO: Translate ### -########################## autoRedact.colorLabel=Colour autoRedact.textsToRedactLabel=Text to Redact (line-separated) autoRedact.textsToRedactPlaceholder=e.g. \nConfidential \nTop-Secret @@ -756,13 +768,6 @@ changeMetadata.selectText.5=Добавить пользовательскую з changeMetadata.submit=Изменить -#xlsToPdf -xlsToPdf.title=Excel в PDF -xlsToPdf.header=Excel в PDF -xlsToPdf.selectText.1=Выберите книгу Excel XLS или XLSX для преобразования -xlsToPdf.convert=Конвертировать - - #pdfToPDFA pdfToPDFA.title=PDF в PDF/A pdfToPDFA.header=PDF в PDF/A diff --git a/src/main/resources/messages_sv_SE.properties b/src/main/resources/messages_sv_SE.properties index fd3fbfd0..1e69e50b 100644 --- a/src/main/resources/messages_sv_SE.properties +++ b/src/main/resources/messages_sv_SE.properties @@ -35,9 +35,6 @@ delete=Delete username=Username password=Password welcome=Welcome -########################## -### TODO: Translate ### -########################## property=Property black=Black white=White @@ -46,7 +43,11 @@ green=Green blue=Blue custom=Custom... - +changedCredsMessage=Credentials changed! +notAuthenticatedMessage=User not authenticated. +userNotFoundMessage=User not found. +incorrectPasswordMessage=Current password is incorrect. +usernameExistsMessage=New Username already exists. @@ -74,6 +75,19 @@ settings.zipThreshold=Zip-filer när antalet nedladdade filer överskrider settings.signOut=Sign Out settings.accountSettings=Account Settings + + +changeCreds.title=Change Credentials +changeCreds.header=Update Your Account Details +changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) +changeCreds.newUsername=New Username +changeCreds.oldPassword=Current Password +changeCreds.newPassword=New Password +changeCreds.confirmNewPassword=Confirm New Password +changeCreds.submit=Submit Changes + + + account.title=Account Settings account.accountSettings=Account Settings account.adminSettings=Admin Settings - View and Add Users @@ -105,6 +119,7 @@ adminUserSettings.role=Role adminUserSettings.actions=Actions adminUserSettings.apiUser=Limited API User adminUserSettings.webOnlyUser=Web Only User +adminUserSettings.forceChange=Force user to change username/password on login adminUserSettings.submit=Save User ############# @@ -333,9 +348,6 @@ login.signinTitle=Please sign in #auto-redact autoRedact.title=Auto Redact autoRedact.header=Auto Redact -########################## -### TODO: Translate ### -########################## autoRedact.colorLabel=Colour autoRedact.textsToRedactLabel=Text to Redact (line-separated) autoRedact.textsToRedactPlaceholder=e.g. \nConfidential \nTop-Secret @@ -756,13 +768,6 @@ changeMetadata.selectText.5=Lägg till anpassad metadatapost changeMetadata.submit=Ändra -#xlsToPdf -xlsToPdf.title=Excel till PDF -xlsToPdf.header=Excel till PDF -xlsToPdf.selectText.1=Välj XLS eller XLSX Excel-ark att konvertera -xlsToPdf.convert=konvertera - - #pdfToPDFA pdfToPDFA.title=PDF till PDF/A pdfToPDFA.header=PDF till PDF/A diff --git a/src/main/resources/messages_zh_CN.properties b/src/main/resources/messages_zh_CN.properties index 1eea17a1..c08d7863 100644 --- a/src/main/resources/messages_zh_CN.properties +++ b/src/main/resources/messages_zh_CN.properties @@ -35,9 +35,6 @@ delete=Delete username=Username password=Password welcome=Welcome -########################## -### TODO: Translate ### -########################## property=Property black=Black white=White @@ -46,7 +43,11 @@ green=Green blue=Blue custom=Custom... - +changedCredsMessage=Credentials changed! +notAuthenticatedMessage=User not authenticated. +userNotFoundMessage=User not found. +incorrectPasswordMessage=Current password is incorrect. +usernameExistsMessage=New Username already exists. @@ -74,6 +75,19 @@ settings.zipThreshold=当下载的文件数量超过限制时,将文件压缩 settings.signOut=Sign Out settings.accountSettings=Account Settings + + +changeCreds.title=Change Credentials +changeCreds.header=Update Your Account Details +changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) +changeCreds.newUsername=New Username +changeCreds.oldPassword=Current Password +changeCreds.newPassword=New Password +changeCreds.confirmNewPassword=Confirm New Password +changeCreds.submit=Submit Changes + + + account.title=Account Settings account.accountSettings=Account Settings account.adminSettings=Admin Settings - View and Add Users @@ -105,6 +119,7 @@ adminUserSettings.role=Role adminUserSettings.actions=Actions adminUserSettings.apiUser=Limited API User adminUserSettings.webOnlyUser=Web Only User +adminUserSettings.forceChange=Force user to change username/password on login adminUserSettings.submit=Save User ############# @@ -333,9 +348,6 @@ login.signinTitle=Please sign in #auto-redact autoRedact.title=Auto Redact autoRedact.header=Auto Redact -########################## -### TODO: Translate ### -########################## autoRedact.colorLabel=Colour autoRedact.textsToRedactLabel=Text to Redact (line-separated) autoRedact.textsToRedactPlaceholder=e.g. \nConfidential \nTop-Secret @@ -756,13 +768,6 @@ changeMetadata.selectText.5=添加自定义元数据条目 changeMetadata.submit=更改 -#xlsToPdf -xlsToPdf.title=Excel转PDF -xlsToPdf.header=Excel转PDF -xlsToPdf.selectText.1=选择要转换的XLS或XLSX Excel表格 -xlsToPdf.convert=转换 - - #pdfToPDFA pdfToPDFA.title=PDF To PDF/A pdfToPDFA.header=PDF to PDF/A From f6c4f08254b699ae798269c65d9b61e1aff5c4ab Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Thu, 14 Sep 2023 13:32:49 +0100 Subject: [PATCH 13/57] docs --- HowToAddNewLanguage.md | 4 +- README.md | 97 ++++++++++++------- .../SPDF/config/CleanUrlInterceptor.java | 1 - src/main/resources/application.properties | 8 ++ src/main/resources/templates/account.html | 2 +- .../resources/templates/change-creds.html | 22 ++++- 6 files changed, 93 insertions(+), 41 deletions(-) diff --git a/HowToAddNewLanguage.md b/HowToAddNewLanguage.md index 26a398bf..b6a7fa4a 100644 --- a/HowToAddNewLanguage.md +++ b/HowToAddNewLanguage.md @@ -8,7 +8,7 @@ Fork Stirling-PDF and make a new branch out of Main Then add reference to the language in the navbar by adding a new language entry to the dropdown -https://github.com/Frooodle/Stirling-PDF/blob/main/src/main/resources/templates/fragments/navbar.html#L306 +https://github.com/Frooodle/Stirling-PDF/blob/main/src/main/resources/templates/fragments/languages.html and add a flag svg file to https://github.com/Frooodle/Stirling-PDF/tree/main/src/main/resources/static/images/flags Any SVG flags are fine, i got most of mine from [here](https://flagicons.lipis.dev/) @@ -25,7 +25,7 @@ The data-language-code is the code used to reference the file in the next step. Start by copying the existing english property file -[https://github.com/Frooodle/Stirling-PDF/tree/langSetup/src/main/resources/messages_en_GB.properties](https://github.com/Frooodle/Stirling-PDF/blob/main/src/main/resources/messages_en_US.properties) +[https://github.com/Frooodle/Stirling-PDF/blob/main/src/main/resources/messages_en_GB.properties](https://github.com/Frooodle/Stirling-PDF/blob/main/src/main/resources/messages_en_GB.properties) Copy and rename it to messages_{your data-language-code here}.properties, in the polish example you would set the name to messages_pl_PL.properties diff --git a/README.md b/README.md index a034eaf2..d0bb6bcc 100644 --- a/README.md +++ b/README.md @@ -21,45 +21,64 @@ Feel free to request any features or bug fixes either in github issues or our [D ![stirling-home](images/stirling-home.png) +## **PDF Features** -## Features -- Full interactive GUI for merging/splitting/rotating/moving PDFs and their pages. -- Split PDFs into multiple files at specified page numbers or extract all pages as individual files. -- Merge multiple PDFs together into a single resultant file -- Convert PDFs to and from images -- Reorganize PDF pages into different orders. -- Add/Generate signatures -- Format PDFs into a multi-paged page -- Scale page contents size by set % -- Adjust Contrast -- Crop PDF -- Auto Split PDF (With physically scanned page dividers) -- Flatten PDFs -- Repair PDFs -- Detect and remove blank pages -- Compare 2 PDFs and show differences in text -- Add images to PDFs -- Rotating PDFs in 90 degree increments. -- Compressing PDFs to decrease their filesize. (Using OCRMyPDF) -- Add and remove passwords -- Set PDF Permissions -- Add watermark(s) -- Convert Any common file to PDF (using LibreOffice) -- Convert PDF to Word/Powerpoint/Others (using LibreOffice) -- Convert HTML to PDF -- URL to PDF -- Extract images from PDF -- Extract images from Scans -- Add page numbers -- Auto rename file by detecting PDF header text -- OCR on PDF (Using OCRMyPDF) -- PDF/A conversion (Using OCRMyPDF) -- Edit metadata +### **Page Operations** +- Full interactive GUI for merging/splitting/rotating/moving PDFs and their pages. +- Merge multiple PDFs together into a single resultant file. +- Split PDFs into multiple files at specified page numbers or extract all pages as individual files. +- Reorganize PDF pages into different orders. +- Rotate PDFs in 90-degree increments. +- Remove pages. +- Multi-page layout (Format PDFs into a multi-paged page). +- Scale page contents size by set %. +- Adjust Contrast. +- Crop PDF. +- Auto Split PDF (With physically scanned page dividers). +- Extract page(s). +- Convert PDF to a single page. + +### **Conversion Operations** +- Convert PDFs to and from images. +- Convert any common file to PDF (using LibreOffice). +- Convert PDF to Word/Powerpoint/Others (using LibreOffice). +- Convert HTML to PDF. +- URL to PDF. +- Markdown to PDF. + +### **Security & Permissions** +- Add and remove passwords. +- Change/set PDF Permissions. +- Add watermark(s). +- Certify/sign PDFs. +- Sanitize PDFs. +- Auto-redact text. + +### **Other Operations** +- Add/Generate/Write signatures. +- Repair PDFs. +- Detect and remove blank pages. +- Compare 2 PDFs and show differences in text. +- Add images to PDFs. +- Compress PDFs to decrease their filesize (Using OCRMyPDF). +- Extract images from PDF. +- Extract images from Scans. +- Add page numbers. +- Auto rename file by detecting PDF header text. +- OCR on PDF (Using OCRMyPDF). +- PDF/A conversion (Using OCRMyPDF). +- Edit metadata. +- Flatten PDFs. +- Get all information on a PDF to view or export as JSON. + +## Extra Features - Dark mode support. - Custom download options (see [here](https://github.com/Frooodle/Stirling-PDF/blob/main/images/settings.png) for example) - Parallel file processing and downloads - API for integration with external scripts + + For a overview of the tasks and the technology each uses please view [groups.md](https://github.com/Frooodle/Stirling-PDF/blob/main/Groups.md) Hosted instance/demo of the app can be seen [here](https://pdf.adminforge.de/) hosted by the team at adminforge.de @@ -94,6 +113,7 @@ docker run -d \ -p 8080:8080 \ -v /location/of/trainingData:/usr/share/tesseract-ocr/4.00/tessdata \ -v /location/of/extraConfigs:/configs \ + -e DOCKER_ENABLE_SECURITY=false \ --name stirling-pdf \ frooodle/s-pdf:latest @@ -114,6 +134,11 @@ services: - /location/of/trainingData:/usr/share/tesseract-ocr/4.00/tessdata #Required for extra OCR languages - /location/of/extraConfigs:/configs # - /location/of/customFiles:/customFiles/ + environment: + - DOCKER_ENABLE_SECURITY=false + + + ``` @@ -122,8 +147,9 @@ services: Please view https://github.com/Frooodle/Stirling-PDF/blob/main/HowToUseOCR.md ## Want to add your own language? -Stirling PDF currently supports 16! +Stirling PDF currently supports 18! - English (English) (en_GB) +- English (US) (en_US) - Arabic (العربية) (ar_AR) - German (Deutsch) (de_DE) - French (Français) (fr_FR) @@ -139,6 +165,7 @@ Stirling PDF currently supports 16! - Russian (Русский) (ru_RU) - Basque (Euskara) (eu_ES) - Japanese (日本語) (ja_JP) +- Dutch (Nederlands) (nl_NL) If you want to add your own language to Stirling-PDF please refer https://github.com/Frooodle/Stirling-PDF/blob/main/HowToAddNewLanguage.md @@ -190,7 +217,7 @@ endpoints: groupsToRemove: [] # List groups to disable (e.g. ['LibreOffice']) metrics: - enabled: true # 'true' to enable Info APIs (`/api/*`) endpoints, 'false' to disable + enabled: true # 'true' to enable Info APIs endpoints (view http://localhost:8080/swagger-ui/index.html#/API to learn more), 'false' to disable ``` ### Extra notes - Endpoints. Currently, the endpoints ENDPOINTS_TO_REMOVE and GROUPS_TO_REMOVE can include comma separate lists of endpoints and groups to disable as example ENDPOINTS_TO_REMOVE=img-to-pdf,remove-pages would disable both image-to-pdf and remove pages, GROUPS_TO_REMOVE=LibreOffice Would disable all things that use LibreOffice. You can see a list of all endpoints and groups [here](https://github.com/Frooodle/Stirling-PDF/blob/main/groups.md) diff --git a/src/main/java/stirling/software/SPDF/config/CleanUrlInterceptor.java b/src/main/java/stirling/software/SPDF/config/CleanUrlInterceptor.java index 4df14253..894d50d8 100644 --- a/src/main/java/stirling/software/SPDF/config/CleanUrlInterceptor.java +++ b/src/main/java/stirling/software/SPDF/config/CleanUrlInterceptor.java @@ -22,7 +22,6 @@ public class CleanUrlInterceptor implements HandlerInterceptor { String queryString = request.getQueryString(); if (queryString != null && !queryString.isEmpty()) { String requestURI = request.getRequestURI(); - Map parameters = new HashMap<>(); // Keep only the allowed parameters diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index f5643af8..f8cfc519 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -37,3 +37,11 @@ spring.datasource.username=sa spring.datasource.password= spring.h2.console.enabled=true spring.jpa.hibernate.ddl-auto=update + +# Change the default URL path for OpenAPI JSON +springdoc.api-docs.path=/v1/api-docs + +# Set the URL of the OpenAPI JSON for the Swagger UI +springdoc.swagger-ui.url=/v1/api-docs + + diff --git a/src/main/resources/templates/account.html b/src/main/resources/templates/account.html index b7beed7f..3111c1f0 100644 --- a/src/main/resources/templates/account.html +++ b/src/main/resources/templates/account.html @@ -175,7 +175,7 @@ document.addEventListener("DOMContentLoaded", function() { - const form = document.querySelector('form[action="/change-password"]'); + const form = document.querySelector('form[action="api/v1/user/change-password"]'); form.addEventListener('submit', function(event) { const newPassword = document.getElementById('newPassword').value; diff --git a/src/main/resources/templates/change-creds.html b/src/main/resources/templates/change-creds.html index 5c62fe1d..94b87b64 100644 --- a/src/main/resources/templates/change-creds.html +++ b/src/main/resources/templates/change-creds.html @@ -37,7 +37,7 @@

    Change Username and password

    - +
    @@ -50,12 +50,30 @@
    +
    + + +
    - +
    From 10126ce9797c1d54e4d5c2a17e0f700a3a51a43a Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Thu, 14 Sep 2023 13:35:33 +0100 Subject: [PATCH 14/57] readme --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d0bb6bcc..f4948bbc 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,15 @@ Feel free to request any features or bug fixes either in github issues or our [D ![stirling-home](images/stirling-home.png) + +## Features +- Dark mode support. +- Custom download options (see [here](https://github.com/Frooodle/Stirling-PDF/blob/main/images/settings.png) for example) +- Parallel file processing and downloads +- API for integration with external scripts +- Optional Login and Authentication support (see [here](https://github.com/Frooodle/Stirling-PDF/tree/main#login-authentication) for documentation) + + ## **PDF Features** ### **Page Operations** @@ -71,13 +80,6 @@ Feel free to request any features or bug fixes either in github issues or our [D - Flatten PDFs. - Get all information on a PDF to view or export as JSON. -## Extra Features -- Dark mode support. -- Custom download options (see [here](https://github.com/Frooodle/Stirling-PDF/blob/main/images/settings.png) for example) -- Parallel file processing and downloads -- API for integration with external scripts - - For a overview of the tasks and the technology each uses please view [groups.md](https://github.com/Frooodle/Stirling-PDF/blob/main/Groups.md) Hosted instance/demo of the app can be seen [here](https://pdf.adminforge.de/) hosted by the team at adminforge.de From cd5bd92a4128706b0af4e8a3dea50048b04f8f55 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Thu, 14 Sep 2023 14:30:39 +0100 Subject: [PATCH 15/57] docs --- README.md | 4 ---- .../SPDF/controller/api/security/SanitizeController.java | 2 ++ .../software/SPDF/controller/web/OtherWebController.java | 2 +- src/main/resources/messages_en_GB.properties | 2 +- src/main/resources/messages_en_US.properties | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f4948bbc..4c430e0d 100644 --- a/README.md +++ b/README.md @@ -138,10 +138,6 @@ services: # - /location/of/customFiles:/customFiles/ environment: - DOCKER_ENABLE_SECURITY=false - - - - ``` diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java b/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java index 206a65b4..dab9d1d7 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/SanitizeController.java @@ -27,11 +27,13 @@ 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.security.SanitizePdfRequest; import stirling.software.SPDF.utils.WebResponseUtils; @RestController @RequestMapping("/api/v1/security") +@Tag(name = "Security", description = "Security APIs") public class SanitizeController { @PostMapping(consumes = "multipart/form-data", value = "/sanitize-pdf") 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 721ca83d..827523cb 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java +++ b/src/main/java/stirling/software/SPDF/controller/web/OtherWebController.java @@ -15,7 +15,7 @@ import io.swagger.v3.oas.annotations.Hidden; import io.swagger.v3.oas.annotations.tags.Tag; @Controller -@Tag(name = "Other", description = "Other APIs") +@Tag(name = "Misc", description = "Miscellaneous APIs") public class OtherWebController { @GetMapping("/compress-pdf") @Hidden diff --git a/src/main/resources/messages_en_GB.properties b/src/main/resources/messages_en_GB.properties index 740782cc..7abd7dfb 100644 --- a/src/main/resources/messages_en_GB.properties +++ b/src/main/resources/messages_en_GB.properties @@ -56,7 +56,7 @@ usernameExistsMessage=New Username already exists. ############# navbar.convert=Convert navbar.security=Security -navbar.other=Other +navbar.other=Miscellaneous navbar.darkmode=Dark Mode navbar.pageOps=Page Operations navbar.settings=Settings diff --git a/src/main/resources/messages_en_US.properties b/src/main/resources/messages_en_US.properties index e80128c9..3c8ad9f8 100644 --- a/src/main/resources/messages_en_US.properties +++ b/src/main/resources/messages_en_US.properties @@ -56,7 +56,7 @@ usernameExistsMessage=New Username already exists. ############# navbar.convert=Convert navbar.security=Security -navbar.other=Other +navbar.other=Miscellaneous navbar.darkmode=Dark Mode navbar.pageOps=Page Operations navbar.settings=Settings From fc2d71d120a508e9265153398d8a70b2d3a93fe9 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Thu, 14 Sep 2023 21:07:39 +0100 Subject: [PATCH 16/57] Update Dockerfile remove PUID --- Dockerfile | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index fb2d2f41..e4bd868c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,27 @@ # Use the base image FROM frooodle/stirling-pdf-base:beta4 +ARG VERSION_TAG + # Set Environment Variables -ENV PUID=1000 \ - PGID=1000 \ - UMASK=022 \ - DOCKER_ENABLE_SECURITY=false \ +ENV DOCKER_ENABLE_SECURITY=false \ HOME=/home/stirlingpdfuser \ VERSION_TAG=$VERSION_TAG +# PUID=1000 \ +# PGID=1000 \ +# UMASK=022 \ + # Create user and group -RUN groupadd -g $PGID stirlingpdfgroup && \ - useradd -u $PUID -g stirlingpdfgroup -s /bin/sh stirlingpdfuser && \ - mkdir -p $HOME && chown stirlingpdfuser:stirlingpdfgroup $HOME +##RUN groupadd -g $PGID stirlingpdfgroup && \ +## useradd -u $PUID -g stirlingpdfgroup -s /bin/sh stirlingpdfuser && \ +## mkdir -p $HOME && chown stirlingpdfuser:stirlingpdfgroup $HOME # Set up necessary directories and permissions -RUN mkdir -p /scripts /usr/share/fonts/opentype/noto /usr/share/tesseract-ocr /configs /customFiles && \ - chown -R stirlingpdfuser:stirlingpdfgroup /scripts /usr/share/fonts/opentype/noto /usr/share/tesseract-ocr /configs /customFiles && \ - chown -R stirlingpdfuser:stirlingpdfgroup /usr/share/tesseract-ocr-original +RUN mkdir -p /scripts /usr/share/fonts/opentype/noto /usr/share/tesseract-ocr /configs /customFiles +##&& \ +## chown -R stirlingpdfuser:stirlingpdfgroup /scripts /usr/share/fonts/opentype/noto /usr/share/tesseract-ocr /configs /customFiles && \ +## chown -R stirlingpdfuser:stirlingpdfgroup /usr/share/tesseract-ocr-original # Copy necessary files COPY ./scripts/* /scripts/ @@ -26,14 +30,16 @@ COPY src/main/resources/static/fonts/*.otf /usr/share/fonts/opentype/noto/ COPY build/libs/*.jar app.jar # Set font cache and permissions -RUN fc-cache -f -v && \ - chown stirlingpdfuser:stirlingpdfgroup /app.jar && \ - chmod +x /scripts/init.sh +RUN fc-cache -f -v && chmod +x /scripts/init.sh + +##&& \ +## chown stirlingpdfuser:stirlingpdfgroup /app.jar && \ +## chmod +x /scripts/init.sh # Expose necessary ports EXPOSE 8080 # Set user and run command -USER stirlingpdfuser +##USER stirlingpdfuser ENTRYPOINT ["/scripts/init.sh"] CMD ["java", "-jar", "/app.jar"] From ed82c492ab112c292ae67e3778e36eb8d7647e5d Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Thu, 14 Sep 2023 21:08:26 +0100 Subject: [PATCH 17/57] Update build.gradle --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e528ec1c..705c817f 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { } group = 'stirling.software' -version = '0.14.0' +version = '0.14.1' sourceCompatibility = '17' repositories { From a0ac2bc02a37fdcb5717fc493a9998f0ba1d680f Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Thu, 14 Sep 2023 21:25:18 +0100 Subject: [PATCH 18/57] Update build.gradle --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 705c817f..7821c0ac 100644 --- a/build.gradle +++ b/build.gradle @@ -34,7 +34,7 @@ sourceSets { openApi { - apiDocsUrl = "http://localhost:8080/v3/api-docs" + apiDocsUrl = "http://localhost:8080/v1/api-docs" outputDir = file("$projectDir") outputFileName = "SwaggerDoc.json" } From cf14ff15405b30c98959f94aedf00bc7237d20a0 Mon Sep 17 00:00:00 2001 From: NeilJared Date: Sat, 16 Sep 2023 23:39:12 +0200 Subject: [PATCH 19/57] Update messages_es_ES.properties Updated es_ES translation including changes of the latest version --- src/main/resources/messages_es_ES.properties | 247 +++++++++---------- 1 file changed, 123 insertions(+), 124 deletions(-) diff --git a/src/main/resources/messages_es_ES.properties b/src/main/resources/messages_es_ES.properties index 370e6859..533ea230 100644 --- a/src/main/resources/messages_es_ES.properties +++ b/src/main/resources/messages_es_ES.properties @@ -31,23 +31,23 @@ sizes.medium=Mediano sizes.large=Grande sizes.x-large=Extra grande error.pdfPassword=El documento PDF está protegido con contraseña y no se ha proporcionado o es incorrecta -delete=Delete -username=Username -password=Password -welcome=Welcome -property=Property -black=Black -white=White -red=Red -green=Green -blue=Blue -custom=Custom... +delete=Borrar +username=Nombre de usuario +password=Contraseña +welcome=Bienvenido +property=Propietario +black=Negro +white=Blanco +red=Rojo +green=Verde +blue=Azul +custom=Personalizado... -changedCredsMessage=Credentials changed! -notAuthenticatedMessage=User not authenticated. -userNotFoundMessage=User not found. -incorrectPasswordMessage=Current password is incorrect. -usernameExistsMessage=New Username already exists. +changedCredsMessage=Se cambiaron las credenciales! +notAuthenticatedMessage=Usuario njo autentificado. +userNotFoundMessage=Usuario no encontrado. +incorrectPasswordMessage=La contraseña actual no es correcta. +usernameExistsMessage=El nuevo nombre de usuario está en uso. @@ -59,12 +59,12 @@ navbar.security=Seguridad navbar.other=Otro navbar.darkmode=Modo oscuro navbar.pageOps=Operaciones de página -navbar.settings=Ajustes +navbar.settings=Configuración ############# # SETTINGS # ############# -settings.title=Ajustes +settings.title=Configuración settings.update=Actualización disponible settings.appVersion=Versión de la aplicación: settings.downloadOption.title=Elegir la opción de descarga (para descargas de un solo archivo sin ZIP): @@ -72,55 +72,55 @@ settings.downloadOption.1=Abrir en la misma ventana settings.downloadOption.2=Abrir en una nueva ventana settings.downloadOption.3=Descargar el fichero settings.zipThreshold=Ficheros ZIP cuando excede el número de ficheros descargados -settings.signOut=Sign Out -settings.accountSettings=Account Settings +settings.signOut=Desconectar +settings.accountSettings=Configuración de la cuenta -changeCreds.title=Change Credentials -changeCreds.header=Update Your Account Details -changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) -changeCreds.newUsername=New Username -changeCreds.oldPassword=Current Password -changeCreds.newPassword=New Password -changeCreds.confirmNewPassword=Confirm New Password -changeCreds.submit=Submit Changes +changeCreds.title=Cambiar Credenciales +changeCreds.header=Actualice los detalles de su cuenta +changeCreds.changeUserAndPassword=Está usando las credenciales por defecto. Por favor, introduzca una nueva contraseña (y usuario si lo desea) +changeCreds.newUsername=Nuevo usuario +changeCreds.oldPassword=Contraseña actual +changeCreds.newPassword=Nueva contraseña +changeCreds.confirmNewPassword=Confirme la nueva contraseña +changeCreds.submit=Enviar cambios -account.title=Account Settings -account.accountSettings=Account Settings -account.adminSettings=Admin Settings - View and Add Users -account.userControlSettings=User Control Settings -account.changeUsername=Change Username -account.changeUsername=Change Username -account.password=Confirmation Password -account.oldPassword=Old password -account.newPassword=New Password -account.changePassword=Change Password -account.confirmNewPassword=Confirm New Password -account.signOut=Sign Out -account.yourApiKey=Your API Key -account.syncTitle=Sync browser settings with Account -account.settingsCompare=Settings Comparison: -account.property=Property -account.webBrowserSettings=Web Browser Setting -account.syncToBrowser=Sync Account -> Browser -account.syncToAccount=Sync Account <- Browser +account.title=Configuración de la cuenta +account.accountSettings=Configuración de la cuenta +account.adminSettings=Configuración de Administrador - Ver y Añadir Usuarios +account.userControlSettings=Configuración de control de usuario +account.changeUsername=Cambiar nombre de usuario +account.changeUsername=Cambiar nombre de usuario +account.password=Confirmar contraseña +account.oldPassword=Contraseña anterior +account.newPassword=Nueva Contraseña +account.changePassword=Cambiar Contraseña +account.confirmNewPassword=Confirmar Nueva Contraseña +account.signOut=Cerrar sesión +account.yourApiKey=Su clave API +account.syncTitle=Sincronizar la configuración del navegador con la cuenta +account.settingsCompare=Comparación de configuraciones: +account.property=Propiedad +account.webBrowserSettings=Configuración del navegador +account.syncToBrowser=Sincronizar cuenta -> Navegador +account.syncToAccount=Sincronizar cuenta <- Navegador -adminUserSettings.title=User Control Settings -adminUserSettings.header=Admin User Control Settings -adminUserSettings.admin=Admin -adminUserSettings.user=User -adminUserSettings.addUser=Add New User +adminUserSettings.title=Configuración de control de usuario +adminUserSettings.header=Configuración de control de usuario administrador +adminUserSettings.admin=Administrador +adminUserSettings.user=Usuario +adminUserSettings.addUser=Añadir Nuevo Usuario adminUserSettings.roles=Roles -adminUserSettings.role=Role -adminUserSettings.actions=Actions -adminUserSettings.apiUser=Limited API User -adminUserSettings.webOnlyUser=Web Only User -adminUserSettings.forceChange=Force user to change username/password on login -adminUserSettings.submit=Save User +adminUserSettings.role=Rol +adminUserSettings.actions=Acciones +adminUserSettings.apiUser=Usuario limitado de API +adminUserSettings.webOnlyUser=Usuario solo web +adminUserSettings.forceChange=Forzar usuario a cambiar usuario/contraseña en el acceso +adminUserSettings.submit=Guardar Usuario ############# # HOME-PAGE # @@ -130,7 +130,7 @@ home.desc=Su ventanilla única autohospedada para todas tus necesidades PDF home.multiTool.title=Multi-herramienta PDF home.multiTool.desc=Combinar, rotar, reorganizar y eliminar páginas -multiTool.tags=Multi-herramienta,Multi-operación,Interfaz de usuario,Arrastrar con un click,front end,lado del client +multiTool.tags=Multi-herramienta,Multi-operación,Interfaz de usuario,Arrastrar con un click,front end,lado del cliente home.merge.title=Unir home.merge.desc=Unir fácilmente múltiples PDFs en uno @@ -270,12 +270,12 @@ home.pipeline.title=Secuencia (Avanzado) home.pipeline.desc=Ejecutar varias tareas a PDFs definiendo una secuencia de comandos pipeline.tags=automatizar,secuencia,con script,proceso por lotes -home.add-page-numbers.title=Aádir números de página -home.add-page-numbers.desc=Aádir números de página en un documento en una ubicación concreta +home.add-page-numbers.title=Añadir números de página +home.add-page-numbers.desc=Añadir números de página en un documento en una ubicación concreta add-page-numbers.tags=paginar,etiquetar,organizar,indexar home.auto-rename.title=Auto renombrar archivo PDF -home.auto-rename.desc=Auto renormbrar un archivo PDF según su encabezamiento detecetado +home.auto-rename.desc=Auto renombrar un archivo PDF según el encabezamiento detectado auto-rename.tags=auto-detectar,basado en el encabezamiento,organizar,re-etiquetar home.adjust-contrast.title=Ajustar Color/Contraste @@ -303,32 +303,31 @@ home.HTMLToPDF.desc=Convierte cualquier archivo HTML o ZIP a PDF HTMLToPDF.tags=margen,contenido web,transformación,convertir -home.MarkdownToPDF.title=Markdown to PDF -home.MarkdownToPDF.desc=Converts any Markdown file to PDF -MarkdownToPDF.tags=markup,web-content,transformation,convert +home.MarkdownToPDF.title=Markdown a PDF +home.MarkdownToPDF.desc=Convierte cualquier archivo Markdown a PDF +MarkdownToPDF.tags=margen,contenido web,transformación,convertir + +home.getPdfInfo.title=Obtener toda la información en PDF +home.getPdfInfo.desc=Obtiene toda la información posible de archivos PDF +getPdfInfo.tags=información,datos,stats,estadísticas -home.getPdfInfo.title=Get ALL Info on PDF -home.getPdfInfo.desc=Grabs any and all information possible on PDFs -getPdfInfo.tags=infomation,data,stats,statistics +home.extractPage.title=Extraer página(s) +home.extractPage.desc=Extraer las páginas seleccionadas del PDF +extractPage.tags=extraer -home.extractPage.title=Extract page(s) -home.extractPage.desc=Extracts select pages from PDF -extractPage.tags=extract +home.PdfToSinglePage.title=PDF a una sola página +home.PdfToSinglePage.desc=Unir todas las páginas del PDF en una sola página +PdfToSinglePage.tags=página única -home.PdfToSinglePage.title=PDF to Single Large Page -home.PdfToSinglePage.desc=Merges all PDF pages into one large single page -PdfToSinglePage.tags=single page - - -home.showJS.title=Show Javascript -home.showJS.desc=Searches and displays any JS injected into a PDF +home.showJS.title=Mostrar Javascript +home.showJS.desc=Busca y muestra cualquier JS contenido en un PDF showJS.tags=JS -home.autoRedact.title=Auto Redact -home.autoRedact.desc=Auto Redacts(Blacks out) text in a PDF based on input text +home.autoRedact.title=Auto Redactar +home.autoRedact.desc=Redactar automáticamente (ocultar) texto en un PDF según el texto introducido showJS.tags=JS ########################### @@ -337,59 +336,59 @@ showJS.tags=JS # # ########################### #login -login.title=Sign in -login.signin=Sign in -login.rememberme=Remember me -login.invalid=Invalid username or password. -login.locked=Your account has been locked. -login.signinTitle=Please sign in +login.title=Iniciar sesión +login.signin=Iniciar sesión +login.rememberme=Recordarme +login.invalid=Nombre de usuario o contraseña erróneos. +login.locked=Su cuenta se ha bloqueado. +login.signinTitle=Por favor, inicie sesión #auto-redact -autoRedact.title=Auto Redact -autoRedact.header=Auto Redact -autoRedact.colorLabel=Colour -autoRedact.textsToRedactLabel=Text to Redact (line-separated) -autoRedact.textsToRedactPlaceholder=e.g. \nConfidential \nTop-Secret -autoRedact.useRegexLabel=Use Regex -autoRedact.wholeWordSearchLabel=Whole Word Search -autoRedact.customPaddingLabel=Custom Extra Padding -autoRedact.convertPDFToImageLabel=Convert PDF to PDF-Image (Used to remove text behind the box) -autoRedact.submitButton=Submit +autoRedact.title=Auto Redactar +autoRedact.header=Auto Redactar +autoRedact.colorLabel=Color +autoRedact.textsToRedactLabel=Texto para Redactar (separado por líneas) +autoRedact.textsToRedactPlaceholder=por ej. \nConfidencial \nAlto-Secreto +autoRedact.useRegexLabel=Usar Regex +autoRedact.wholeWordSearchLabel=Búsqueda por palabra completa +autoRedact.customPaddingLabel=Extra Padding personalizado +autoRedact.convertPDFToImageLabel=Convertir PDF a imagen-PDF (Utilizado para quitar el texto detrás del cajetín) +autoRedact.submitButton=Enviar #showJS -showJS.title=Show Javascript -showJS.header=Show Javascript -showJS.downloadJS=Download Javascript -showJS.submit=Show +showJS.title=Mostrar Javascript +showJS.header=Mostrar Javascript +showJS.downloadJS=Descargar Javascript +showJS.submit=Mostrar #pdfToSinglePage -pdfToSinglePage.title=PDF To Single Page -pdfToSinglePage.header=PDF To Single Page -pdfToSinglePage.submit=Convert To Single Page +pdfToSinglePage.title=PDF a página única +pdfToSinglePage.header=PDF a página única +pdfToSinglePage.submit=Convertir a página única #pageExtracter -pageExtracter.title=Extract Pages -pageExtracter.header=Extract Pages -pageExtracter.submit=Extract +pageExtracter.title=Extraer Páginas +pageExtracter.header=Extraer Páginas +pageExtracter.submit=Extraer #getPdfInfo -getPdfInfo.title=Get Info on PDF -getPdfInfo.header=Get Info on PDF -getPdfInfo.submit=Get Info -getPdfInfo.downloadJson=Download JSON +getPdfInfo.title=Obtener Información del PDF +getPdfInfo.header=Obtener Información del PDF +getPdfInfo.submit=Obtener Información +getPdfInfo.downloadJson=Descargar JSON #markdown-to-pdf -MarkdownToPDF.title=Markdown To PDF -MarkdownToPDF.header=Markdown To PDF -MarkdownToPDF.submit=Convert -MarkdownToPDF.help=Work in progress -MarkdownToPDF.credit=Uses WeasyPrint +MarkdownToPDF.title=Markdown a PDF +MarkdownToPDF.header=Markdown a PDF +MarkdownToPDF.submit=Convertir +MarkdownToPDF.help=Tarea en proceso +MarkdownToPDF.credit=Usa WeasyPrint @@ -428,9 +427,9 @@ addPageNumbers.selectText.3=Posición addPageNumbers.selectText.4=Número de inicio addPageNumbers.selectText.5=Páginas a numerar addPageNumbers.selectText.6=Texto personalizado -addPageNumbers.customTextDesc=Custom Text -addPageNumbers.numberPagesDesc=Which pages to number, default 'all', also accepts 1-5 or 2,5,9 etc -addPageNumbers.customNumberDesc=Defaults to {n}, also accepts 'Page {n} of {total}', 'Text-{n}', '{filename}-{n} +addPageNumbers.customTextDesc=Texto personalizado +addPageNumbers.numberPagesDesc=Qué páginas numerar, por defecto 'todas', también acepta 1-5 o 2,5,9 etc +addPageNumbers.customNumberDesc=Por defecto a {n}, también acepta 'Página {n} de {total}', 'Texto-{n}', '{nombre de archivo}-{n} addPageNumbers.submit=Añadir Números de Página @@ -616,8 +615,8 @@ addImage.submit=Añadir imagen #merge merge.title=Unir merge.header=Unir múltiples PDFs (2+) -merge.sortByName=Sort by name -merge.sortByDate=Sort by date +merge.sortByName=Ordenar por nombre +merge.sortByDate=Ordenar por fecha merge.submit=Unir @@ -642,7 +641,7 @@ pageRemover.submit=Eliminar Páginas #rotate rotate.title=Rotar PDF rotate.header=Rotar PDF -rotate.selectAngle=Select rotation angle (in multiples of 90 degrees): +rotate.selectAngle=Seleccionar ángulo de rotación (en múltiplos de 90 grados): rotate.submit=Rotar @@ -718,8 +717,8 @@ watermark.selectText.4=Rotación (0-360): watermark.selectText.5=Ancho (Espacio entre cada marca de agua horizontalmente): watermark.selectText.6=Alto (Espacio entre cada marca de agua verticalmente): watermark.selectText.7=Opacidad (0% - 100%): -watermark.selectText.8=Watermark Type: -watermark.selectText.9=Watermark Image: +watermark.selectText.8=Tipo de marca de agua: +watermark.selectText.9=Imagen de marca de agua: watermark.submit=Añadir marca de agua @@ -762,7 +761,7 @@ changeMetadata.modDate=Fecha de modificación (aaaa/MM/dd HH:mm:ss): changeMetadata.producer=Productor: changeMetadata.subject=Asunto: changeMetadata.title=Título: -changeMetadata.trapped=Trapped: +changeMetadata.trapped=Capturado: changeMetadata.selectText.4=Otros Metadatos: changeMetadata.selectText.5=Agregar entrada de metadatos personalizados changeMetadata.submit=Cambiar From 5b3858ba293e16bfce51f1dea81f898a72640c35 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 17 Sep 2023 21:17:13 +0100 Subject: [PATCH 20/57] image changes and cert fix --- .../converters/ConvertImgPDFController.java | 4 ++-- .../api/converters/ConvertToPdfRequest.java | 7 +++++-- .../software/SPDF/utils/PdfUtils.java | 21 +++++++++++++------ src/main/resources/messages_ar_AR.properties | 8 ++++++- src/main/resources/messages_ca_CA.properties | 8 ++++++- src/main/resources/messages_de_DE.properties | 8 ++++++- src/main/resources/messages_en_GB.properties | 5 ++++- src/main/resources/messages_en_US.properties | 8 ++++++- src/main/resources/messages_es_ES.properties | 9 +++++++- src/main/resources/messages_eu_ES.properties | 8 ++++++- src/main/resources/messages_fr_FR.properties | 10 +++++++-- src/main/resources/messages_it_IT.properties | 8 ++++++- src/main/resources/messages_ja_JP.properties | 8 ++++++- src/main/resources/messages_ko_KR.properties | 8 ++++++- src/main/resources/messages_nl_NL.properties | 8 ++++++- src/main/resources/messages_pl_PL.properties | 8 ++++++- src/main/resources/messages_pt_BR.properties | 8 ++++++- src/main/resources/messages_ro_RO.properties | 8 ++++++- src/main/resources/messages_ru_RU.properties | 8 ++++++- src/main/resources/messages_sv_SE.properties | 8 ++++++- src/main/resources/messages_zh_CN.properties | 8 ++++++- .../templates/convert/img-to-pdf.html | 14 +++++++++---- .../templates/security/cert-sign.html | 6 +++--- 23 files changed, 160 insertions(+), 36 deletions(-) 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 6c100519..0064a3ab 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 @@ -79,12 +79,12 @@ public class ConvertImgPDFController { 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?") public ResponseEntity convertToPdf(@ModelAttribute ConvertToPdfRequest request) throws IOException { MultipartFile[] file = request.getFileInput(); - boolean stretchToFit = request.isStretchToFit(); + String fitOption = request.getFitOption(); String colorType = request.getColorType(); boolean autoRotate = request.isAutoRotate(); // Convert the file to PDF and get the resulting bytes - byte[] bytes = PdfUtils.imageToPdf(file, stretchToFit, autoRotate, colorType); + byte[] bytes = PdfUtils.imageToPdf(file, fitOption, autoRotate, colorType); return WebResponseUtils.bytesToWebResponse(bytes, file[0].getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_converted.pdf"); } diff --git a/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToPdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToPdfRequest.java index dba2dc5e..37df6f9e 100644 --- a/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToPdfRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToPdfRequest.java @@ -13,8 +13,11 @@ public class ConvertToPdfRequest { @Schema(description = "The input images to be converted to a PDF file") private MultipartFile[] fileInput; - @Schema(description = "Whether to stretch the images to fit the PDF page or maintain the aspect ratio", example = "false") - private boolean stretchToFit; + @Schema(description = "Option to determine how the image will fit onto the page", + allowableValues = { "fillPage", "fitDocumentToImage", "maintainAspectRatio" }) + private String fitOption; + + @Schema(description = "The color type of the output image(s)", allowableValues = {"color", "greyscale", "blackwhite"}) private String colorType; diff --git a/src/main/java/stirling/software/SPDF/utils/PdfUtils.java b/src/main/java/stirling/software/SPDF/utils/PdfUtils.java index c5296191..2f57fe10 100644 --- a/src/main/java/stirling/software/SPDF/utils/PdfUtils.java +++ b/src/main/java/stirling/software/SPDF/utils/PdfUtils.java @@ -248,7 +248,7 @@ public class PdfUtils { throw e; } } - public static byte[] imageToPdf(MultipartFile[] files, boolean stretchToFit, boolean autoRotate, String colorType) throws IOException { + public static byte[] imageToPdf(MultipartFile[] files, String fitOption, boolean autoRotate, String colorType) throws IOException { try (PDDocument doc = new PDDocument()) { for (MultipartFile file : files) { String contentType = file.getContentType(); @@ -261,7 +261,7 @@ public class PdfUtils { BufferedImage pageImage = reader.read(i); BufferedImage convertedImage = ImageProcessingUtils.convertColorType(pageImage, colorType); PDImageXObject pdImage = LosslessFactory.createFromImage(doc, convertedImage); - addImageToDocument(doc, pdImage, stretchToFit, autoRotate); + addImageToDocument(doc, pdImage, fitOption, autoRotate); } } else { File imageFile = Files.createTempFile("image", ".png").toFile(); @@ -279,7 +279,7 @@ public class PdfUtils { } else { pdImage = LosslessFactory.createFromImage(doc, convertedImage); } - addImageToDocument(doc, pdImage, stretchToFit, autoRotate); + addImageToDocument(doc, pdImage, fitOption, autoRotate); } catch (IOException e) { logger.error("Error writing image to file: {}", imageFile.getAbsolutePath(), e); throw e; @@ -295,12 +295,20 @@ public class PdfUtils { } } - private static void addImageToDocument(PDDocument doc, PDImageXObject image, boolean stretchToFit, boolean autoRotate) throws IOException { + private static void addImageToDocument(PDDocument doc, PDImageXObject image, String fitOption, boolean autoRotate) throws IOException { boolean imageIsLandscape = image.getWidth() > image.getHeight(); PDRectangle pageSize = PDRectangle.A4; + + System.out.println(fitOption); + if (autoRotate && imageIsLandscape) { pageSize = new PDRectangle(pageSize.getHeight(), pageSize.getWidth()); } + + if ("fitDocumentToImage".equals(fitOption)) { + pageSize = new PDRectangle(image.getWidth(), image.getHeight()); + } + PDPage page = new PDPage(pageSize); doc.addPage(page); @@ -308,9 +316,9 @@ public class PdfUtils { float pageHeight = page.getMediaBox().getHeight(); try (PDPageContentStream contentStream = new PDPageContentStream(doc, page)) { - if (stretchToFit) { + if ("fillPage".equals(fitOption) || "fitDocumentToImage".equals(fitOption)) { contentStream.drawImage(image, 0, 0, pageWidth, pageHeight); - } else { + } else if ("maintainAspectRatio".equals(fitOption)) { float imageAspectRatio = (float) image.getWidth() / (float) image.getHeight(); float pageAspectRatio = pageWidth / pageHeight; @@ -331,6 +339,7 @@ public class PdfUtils { } } + public static byte[] overlayImage(byte[] pdfBytes, byte[] imageBytes, float x, float y, boolean everyPage) throws IOException { PDDocument document = PDDocument.load(new ByteArrayInputStream(pdfBytes)); diff --git a/src/main/resources/messages_ar_AR.properties b/src/main/resources/messages_ar_AR.properties index a4d97973..87190f5f 100644 --- a/src/main/resources/messages_ar_AR.properties +++ b/src/main/resources/messages_ar_AR.properties @@ -665,7 +665,13 @@ split.submit=Split imageToPDF.title=صورة إلى PDF imageToPDF.header=صورة إلى PDF imageToPDF.submit=تحول -imageToPDF.selectText.1=\u062A\u0645\u062F\u062F \u0644\u0644\u0645\u0644\u0627\u0621\u0645\u0629 +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=\u062F\u0648\u0631\u0627\u0646 PDF \u062A\u0644\u0642\u0627\u0626\u064A\u064B\u0627 imageToPDF.selectText.3=\u0627\u0644\u0645\u0646\u0637\u0642 \u0627\u0644\u0645\u062A\u0639\u062F\u062F \u0644\u0644\u0645\u0644\u0641\u0627\u062A (\u0645\u0641\u0639\u0651\u0644 \u0641\u0642\u0637 \u0625\u0630\u0627 \u0643\u0646\u062A \u062A\u0639\u0645\u0644 \u0645\u0639 \u0635\u0648\u0631 \u0645\u062A\u0639\u062F\u062F\u0629) imageToPDF.selectText.4=\u062F\u0645\u062C \u0641\u064A \u0645\u0644\u0641 PDF \u0648\u0627\u062D\u062F diff --git a/src/main/resources/messages_ca_CA.properties b/src/main/resources/messages_ca_CA.properties index d4141c67..51f0e33f 100644 --- a/src/main/resources/messages_ca_CA.properties +++ b/src/main/resources/messages_ca_CA.properties @@ -665,7 +665,13 @@ split.submit=Divideix imageToPDF.title=Imatge a PDF imageToPDF.header=Imatge a PDF imageToPDF.submit=Converteix -imageToPDF.selectText.1=Estirar per adaptar +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Auto rota PDF imageToPDF.selectText.3=Lògica de diversos fitxers (només està activada si es treballa amb diverses imatges) imageToPDF.selectText.4=Combina en un únic PDF diff --git a/src/main/resources/messages_de_DE.properties b/src/main/resources/messages_de_DE.properties index 88fa9ad7..26e61b54 100644 --- a/src/main/resources/messages_de_DE.properties +++ b/src/main/resources/messages_de_DE.properties @@ -665,7 +665,13 @@ split.submit=Aufteilen imageToPDF.title=Bild zu PDF imageToPDF.header=Bild zu PDF imageToPDF.submit=Umwandeln -imageToPDF.selectText.1=Auf Seite strecken +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=PDF automatisch drehen imageToPDF.selectText.3=Mehrere Dateien verarbeiten (nur aktiv, wenn Sie mit mehreren Bildern arbeiten) imageToPDF.selectText.4=In ein einziges PDF zusammenführen diff --git a/src/main/resources/messages_en_GB.properties b/src/main/resources/messages_en_GB.properties index 7abd7dfb..6d6a7aad 100644 --- a/src/main/resources/messages_en_GB.properties +++ b/src/main/resources/messages_en_GB.properties @@ -665,7 +665,10 @@ split.submit=Split imageToPDF.title=Image to PDF imageToPDF.header=Image to PDF imageToPDF.submit=Convert -imageToPDF.selectText.1=Stretch to fit +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Auto rotate PDF imageToPDF.selectText.3=Multi file logic (Only enabled if working with multiple images) imageToPDF.selectText.4=Merge into single PDF diff --git a/src/main/resources/messages_en_US.properties b/src/main/resources/messages_en_US.properties index 3c8ad9f8..9ee15dbf 100644 --- a/src/main/resources/messages_en_US.properties +++ b/src/main/resources/messages_en_US.properties @@ -665,7 +665,13 @@ split.submit=Split imageToPDF.title=Image to PDF imageToPDF.header=Image to PDF imageToPDF.submit=Convert -imageToPDF.selectText.1=Stretch to fit +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Auto rotate PDF imageToPDF.selectText.3=Multi file logic (Only enabled if working with multiple images) imageToPDF.selectText.4=Merge into single PDF diff --git a/src/main/resources/messages_es_ES.properties b/src/main/resources/messages_es_ES.properties index 533ea230..9aef8747 100644 --- a/src/main/resources/messages_es_ES.properties +++ b/src/main/resources/messages_es_ES.properties @@ -307,6 +307,7 @@ home.MarkdownToPDF.title=Markdown a PDF home.MarkdownToPDF.desc=Convierte cualquier archivo Markdown a PDF MarkdownToPDF.tags=margen,contenido web,transformación,convertir + home.getPdfInfo.title=Obtener toda la información en PDF home.getPdfInfo.desc=Obtiene toda la información posible de archivos PDF getPdfInfo.tags=información,datos,stats,estadísticas @@ -664,7 +665,13 @@ split.submit=Dividir imageToPDF.title=Imagen a PDF imageToPDF.header=Imagen a PDF imageToPDF.submit=Convertir -imageToPDF.selectText.1=Estirar para ajustar +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Rotación automática del PDF imageToPDF.selectText.3=Lógica de archivos múltiples (únicamente activado si funciona con multiples imágenes) imageToPDF.selectText.4=Unir en un único archivo PDF diff --git a/src/main/resources/messages_eu_ES.properties b/src/main/resources/messages_eu_ES.properties index 2e2540be..a7e88caa 100644 --- a/src/main/resources/messages_eu_ES.properties +++ b/src/main/resources/messages_eu_ES.properties @@ -665,7 +665,13 @@ split.submit=Zatitu imageToPDF.title=Irudia PDF bihurtu imageToPDF.header=Irudia PDF bihurtu imageToPDF.submit=Bihurtu -imageToPDF.selectText.1=Zabaldu doitzeko +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=PDFaren errotazio automatikoa imageToPDF.selectText.3=Fitxategi askoren logika (gaituta bakarrik zenbait irudirekin ari denean) imageToPDF.selectText.4=Elkartu PDF bakar batean diff --git a/src/main/resources/messages_fr_FR.properties b/src/main/resources/messages_fr_FR.properties index 765afae4..2936a706 100644 --- a/src/main/resources/messages_fr_FR.properties +++ b/src/main/resources/messages_fr_FR.properties @@ -665,7 +665,13 @@ split.submit=Diviser imageToPDF.title=Image en PDF imageToPDF.header=Image en PDF imageToPDF.submit=Convertir -imageToPDF.selectText.1=Étirer pour adapter +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Rotation automatique du PDF imageToPDF.selectText.3=Logique multi-fichiers (uniquement activée si vous travaillez avec plusieurs images) imageToPDF.selectText.4=Fusionner en un seul PDF @@ -749,7 +755,7 @@ removePassword.submit=Supprimer #changeMetadata -changeMetadata.title=Modifier les métadonnées +changeMetadata.title=Titre changeMetadata.header=Modifier les métadonnées changeMetadata.selectText.1=Veuillez modifier les variables que vous souhaitez modifier. changeMetadata.selectText.2=Supprimer toutes les métadonnées diff --git a/src/main/resources/messages_it_IT.properties b/src/main/resources/messages_it_IT.properties index 35f2627e..8f4c7afc 100644 --- a/src/main/resources/messages_it_IT.properties +++ b/src/main/resources/messages_it_IT.properties @@ -665,7 +665,13 @@ split.submit=Dividi imageToPDF.title=Immagine a PDF imageToPDF.header=Immagine a PDF imageToPDF.submit=Converti -imageToPDF.selectText.1=Allarga per riempire +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Ruota automaticamente PDF imageToPDF.selectText.3=Logica multi-file (funziona solo se ci sono più immagini) imageToPDF.selectText.4=Unisci in un unico PDF diff --git a/src/main/resources/messages_ja_JP.properties b/src/main/resources/messages_ja_JP.properties index 9e061f6a..d0a01cc0 100644 --- a/src/main/resources/messages_ja_JP.properties +++ b/src/main/resources/messages_ja_JP.properties @@ -665,7 +665,13 @@ split.submit=分割 imageToPDF.title=画像をPDFに変換 imageToPDF.header=画像をPDFに変換 imageToPDF.submit=変換 -imageToPDF.selectText.1=フィットするように引き伸ばす +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=PDFの自動回転 imageToPDF.selectText.3=マルチファイルの処理 (複数の画像を操作する場合に有効になります) imageToPDF.selectText.4=1つのPDFに結合 diff --git a/src/main/resources/messages_ko_KR.properties b/src/main/resources/messages_ko_KR.properties index f25c8fb4..5929d971 100644 --- a/src/main/resources/messages_ko_KR.properties +++ b/src/main/resources/messages_ko_KR.properties @@ -665,7 +665,13 @@ split.submit=분할 imageToPDF.title=이미지를 PDF로 변환 imageToPDF.header=이미지를 PDF로 변환 imageToPDF.submit=변환하기 -imageToPDF.selectText.1=맞춤 크기로 늘리기 +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=PDF 자동 회전 imageToPDF.selectText.3=다중 파일 로직 (여러 이미지로 작업하는 경우에만 활성화됨) imageToPDF.selectText.4=단일 PDF로 병합 diff --git a/src/main/resources/messages_nl_NL.properties b/src/main/resources/messages_nl_NL.properties index f39c98e3..8d7340c8 100644 --- a/src/main/resources/messages_nl_NL.properties +++ b/src/main/resources/messages_nl_NL.properties @@ -665,7 +665,13 @@ split.submit=Splitsen imageToPDF.title=Afbeelding naar PDF imageToPDF.header=Afbeelding naar PDF imageToPDF.submit=Omzetten -imageToPDF.selectText.1=Uitrekken om te passen +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=PDF automatisch draaien imageToPDF.selectText.3=Meervoudige bestandslogica (Alleen ingeschakeld bij werken met meerdere afbeeldingen) imageToPDF.selectText.4=Voeg samen in één PDF diff --git a/src/main/resources/messages_pl_PL.properties b/src/main/resources/messages_pl_PL.properties index d2eaa61f..d3bf7d7c 100644 --- a/src/main/resources/messages_pl_PL.properties +++ b/src/main/resources/messages_pl_PL.properties @@ -665,7 +665,13 @@ split.submit=Podziel imageToPDF.title=Obraz na PDF imageToPDF.header=Obraz na PDF imageToPDF.submit=Konwertuj -imageToPDF.selectText.1=Rozciągnij, aby dopasować +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Automatyczne obracanie PDF imageToPDF.selectText.3=Logika wielu plików (dostępna tylko w przypadku pracy z wieloma obrazami) imageToPDF.selectText.4=Połącz w jeden dokument PDF diff --git a/src/main/resources/messages_pt_BR.properties b/src/main/resources/messages_pt_BR.properties index 1c904be9..2c2f0217 100644 --- a/src/main/resources/messages_pt_BR.properties +++ b/src/main/resources/messages_pt_BR.properties @@ -665,7 +665,13 @@ split.submit=Dividir imageToPDF.title=Imagem para PDF imageToPDF.header=Converter Imagem para PDF imageToPDF.submit=Converter -imageToPDF.selectText.1=Esticar para Ajustar +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Girar Automaticamente imageToPDF.selectText.3=Lógica de Vários Arquivos (Ativada apenas ao trabalhar com várias imagens) imageToPDF.selectText.4=Mesclar em um Único PDF diff --git a/src/main/resources/messages_ro_RO.properties b/src/main/resources/messages_ro_RO.properties index 6bf5f1d2..f331519a 100644 --- a/src/main/resources/messages_ro_RO.properties +++ b/src/main/resources/messages_ro_RO.properties @@ -665,7 +665,13 @@ split.submit=Împarte imageToPDF.title=Imagine în PDF imageToPDF.header=Imagine în PDF imageToPDF.submit=Convertă -imageToPDF.selectText.1=Redimensionare pentru a se potrivi +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Rotire automată a PDF-ului imageToPDF.selectText.3=Logica pentru mai multe fișiere (activată numai dacă se lucrează cu mai multe imagini) imageToPDF.selectText.4=Unifică într-un singur PDF diff --git a/src/main/resources/messages_ru_RU.properties b/src/main/resources/messages_ru_RU.properties index f71192dc..74bb5a68 100644 --- a/src/main/resources/messages_ru_RU.properties +++ b/src/main/resources/messages_ru_RU.properties @@ -665,7 +665,13 @@ split.submit=Разделить imageToPDF.title=Изображение в PDF imageToPDF.header=Изображение в PDF imageToPDF.submit=Конвертировать -imageToPDF.selectText.1=Растянуть, чтобы соответствовать +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Автоматический поворот PDF imageToPDF.selectText.3=Многофайловая логика (включена только при работе с несколькими изображениями) imageToPDF.selectText.4=Объединить в один PDF diff --git a/src/main/resources/messages_sv_SE.properties b/src/main/resources/messages_sv_SE.properties index 1e69e50b..b1b63ded 100644 --- a/src/main/resources/messages_sv_SE.properties +++ b/src/main/resources/messages_sv_SE.properties @@ -665,7 +665,13 @@ split.submit=Dela imageToPDF.title=Bild till PDF imageToPDF.header=Bild till PDF imageToPDF.submit=Konvertera -imageToPDF.selectText.1=Sträck för att passa +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Rotera PDF automatiskt imageToPDF.selectText.3=Multifillogik (Endast aktiverad om man arbetar med flera bilder) imageToPDF.selectText.4=Slå samman till en enda PDF diff --git a/src/main/resources/messages_zh_CN.properties b/src/main/resources/messages_zh_CN.properties index c08d7863..ddf8639a 100644 --- a/src/main/resources/messages_zh_CN.properties +++ b/src/main/resources/messages_zh_CN.properties @@ -665,7 +665,13 @@ split.submit=拆分 imageToPDF.title=图片转PDF imageToPDF.header=图像转为PDF imageToPDF.submit=转换 -imageToPDF.selectText.1=拉伸至适合的尺寸 +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=自动旋转PDF imageToPDF.selectText.3=多文件逻辑(仅在处理多个图像时启用) imageToPDF.selectText.4=合并成一个PDF文件 diff --git a/src/main/resources/templates/convert/img-to-pdf.html b/src/main/resources/templates/convert/img-to-pdf.html index c6a2d037..ae38143c 100644 --- a/src/main/resources/templates/convert/img-to-pdf.html +++ b/src/main/resources/templates/convert/img-to-pdf.html @@ -21,10 +21,16 @@
    -
    - - -
    +
    + + +
    + +
    diff --git a/src/main/resources/templates/security/cert-sign.html b/src/main/resources/templates/security/cert-sign.html index fc2e0b8f..87957667 100644 --- a/src/main/resources/templates/security/cert-sign.html +++ b/src/main/resources/templates/security/cert-sign.html @@ -35,19 +35,19 @@
    + th:replace="~{fragments/common :: fileSelector(name='certFile', multiple=false, notRequired=true, accept='.pem,.der')}">
    From 1be3046d26f68b61fbde83470aa88fde9f76ec93 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 17 Sep 2023 21:17:47 +0100 Subject: [PATCH 21/57] version bump --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 7821c0ac..e803b512 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { } group = 'stirling.software' -version = '0.14.1' +version = '0.14.2' sourceCompatibility = '17' repositories { From 1f99c26e78fa7967f76ba5813fd9484cae05f65c Mon Sep 17 00:00:00 2001 From: Julien Rouvier Date: Wed, 20 Sep 2023 10:07:11 +0200 Subject: [PATCH 22/57] Add helm chart --- chart/stirling-pdf/Chart.yaml | 15 ++ chart/stirling-pdf/templates/NOTES.txt | 30 +++ chart/stirling-pdf/templates/_helpers.tpl | 129 ++++++++++ chart/stirling-pdf/templates/deployment.yaml | 129 ++++++++++ chart/stirling-pdf/templates/ingress.yaml | 85 +++++++ chart/stirling-pdf/templates/pv.yaml | 16 ++ chart/stirling-pdf/templates/pvc.yaml | 27 ++ chart/stirling-pdf/templates/service.yaml | 48 ++++ .../templates/serviceaccount.yaml | 13 + .../templates/servicemonitor.yaml | 31 +++ chart/stirling-pdf/values.yaml | 239 ++++++++++++++++++ 11 files changed, 762 insertions(+) create mode 100644 chart/stirling-pdf/Chart.yaml create mode 100644 chart/stirling-pdf/templates/NOTES.txt create mode 100644 chart/stirling-pdf/templates/_helpers.tpl create mode 100644 chart/stirling-pdf/templates/deployment.yaml create mode 100644 chart/stirling-pdf/templates/ingress.yaml create mode 100644 chart/stirling-pdf/templates/pv.yaml create mode 100644 chart/stirling-pdf/templates/pvc.yaml create mode 100644 chart/stirling-pdf/templates/service.yaml create mode 100644 chart/stirling-pdf/templates/serviceaccount.yaml create mode 100644 chart/stirling-pdf/templates/servicemonitor.yaml create mode 100644 chart/stirling-pdf/values.yaml diff --git a/chart/stirling-pdf/Chart.yaml b/chart/stirling-pdf/Chart.yaml new file mode 100644 index 00000000..3482b36d --- /dev/null +++ b/chart/stirling-pdf/Chart.yaml @@ -0,0 +1,15 @@ +apiVersion: v2 +appVersion: 0.14.2 +description: locally hosted web application that allows you to perform various operations on PDF files +home: https://github.com/Frooodle/Stirling-PDF +keywords: +- stirling-pdf +- helm +- charts repo +maintainers: +- name: Frooodle + url: https://github.com/Frooodle/Stirling-PDF +name: stirling-pdf +sources: +- https://github.com/Frooodle/Stirling-PDF +version: 1.0.0 diff --git a/chart/stirling-pdf/templates/NOTES.txt b/chart/stirling-pdf/templates/NOTES.txt new file mode 100644 index 00000000..3b432f00 --- /dev/null +++ b/chart/stirling-pdf/templates/NOTES.txt @@ -0,0 +1,30 @@ +** Please be patient while the chart is being deployed ** + +Get the stirlingpdf URL by running: + +{{- if contains "NodePort" .Values.service.type }} + + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "stirlingpdf.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT/ + +{{- else if contains "LoadBalancer" .Values.service.type }} + +** Please ensure an external IP is associated to the {{ template "stirlingpdf.fullname" . }} service before proceeding ** +** Watch the status using: kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "stirlingpdf.fullname" . }} ** + + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "stirlingpdf.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }}/ + +OR + + export SERVICE_HOST=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "stirlingpdf.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].hostname}') + echo http://$SERVICE_HOST:{{ .Values.service.externalPort }}/ + +{{- else if contains "ClusterIP" .Values.service.type }} + + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "stirlingpdf.name" . }}" -l "release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo http://127.0.0.1:8080/ + kubectl port-forward $POD_NAME 8080:8080 --namespace {{ .Release.Namespace }} + +{{- end }} diff --git a/chart/stirling-pdf/templates/_helpers.tpl b/chart/stirling-pdf/templates/_helpers.tpl new file mode 100644 index 00000000..4c862604 --- /dev/null +++ b/chart/stirling-pdf/templates/_helpers.tpl @@ -0,0 +1,129 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "stirlingpdf.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "stirlingpdf.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{- /* +Create chart name and version as used by the chart label. + +It does minimal escaping for use in Kubernetes labels. + +Example output: + +stirlingpdf-0.4.5 +*/ -}} +{{- define "stirlingpdf.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "stirlingpdf.labels" -}} +helm.sh/chart: {{ include "stirlingpdf.chart" . }} +{{ include "stirlingpdf.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +{{- if .Values.commonLabels}} +{{ toYaml .Values.commonLabels }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "stirlingpdf.selectorLabels" -}} +app.kubernetes.io/name: {{ include "stirlingpdf.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "stirlingpdf.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "stirlingpdf.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* +Return the proper image name to change the volume permissions +*/}} +{{- define "stirlingpdf.volumePermissions.image" -}} +{{- $registryName := .Values.volumePermissions.image.registry -}} +{{- $repositoryName := .Values.volumePermissions.image.repository -}} +{{- $tag := .Values.volumePermissions.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Docker Image Registry Secret Names +*/}} +{{- define "stirlingpdf.imagePullSecrets" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +Also, we can not use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: +{{- range .Values.global.imagePullSecrets }} + - name: {{ . }} +{{- end }} +{{- else if or .Values.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- else if or .Values.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/chart/stirling-pdf/templates/deployment.yaml b/chart/stirling-pdf/templates/deployment.yaml new file mode 100644 index 00000000..290a56c9 --- /dev/null +++ b/chart/stirling-pdf/templates/deployment.yaml @@ -0,0 +1,129 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "stirlingpdf.fullname" . }} + {{- with .Values.deployment.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "stirlingpdf.labels" . | nindent 4 }} + {{- if .Values.deployment.labels }} + {{- toYaml .Values.deployment.labels | nindent 4 }} + {{- end }} +spec: + selector: + matchLabels: + {{- include "stirlingpdf.selectorLabels" . | nindent 6 }} + replicas: {{ .Values.replicaCount }} + strategy: +{{ toYaml .Values.strategy | indent 4 }} + revisionHistoryLimit: 10 + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "stirlingpdf.selectorLabels" . | nindent 8 }} + {{- if .Values.podLabels }} + {{- toYaml .Values.podLabels | nindent 8 }} + {{- end }} + spec: + {{- if .Values.priorityClassName }} + priorityClassName: "{{ .Values.priorityClassName }}" + {{- end }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + {{- if .Values.securityContext.runAsNonRoot }} + runAsNonRoot: {{ .Values.securityContext.runAsNonRoot }} + {{- end }} + {{- if .Values.securityContext.supplementalGroups }} + supplementalGroups: {{ .Values.securityContext.supplementalGroups }} + {{- end }} + {{- else if .Values.persistence.enabled }} + initContainers: + - name: volume-permissions + image: {{ template "stirlingpdf.volumePermissions.image" . }} + imagePullPolicy: "{{ .Values.volumePermissions.image.pullPolicy }}" + securityContext: + {{- toYaml .Values.containerSecurityContext | nindent 10 }} + command: ['sh', '-c', 'chown -R {{ .Values.securityContext.fsGroup }}:{{ .Values.securityContext.fsGroup }} {{ .Values.persistence.path }}'] + volumeMounts: + - mountPath: {{ .Values.persistence.path }} + name: storage-volume + {{- end }} +{{- include "stirlingpdf.imagePullSecrets" . | indent 6 }} + containers: + - name: {{ .Chart.Name }} + image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + securityContext: + {{- toYaml .Values.containerSecurityContext | nindent 10 }} +{{- if .Values.envs }} + env: +{{ toYaml .Values.envs | indent 8 }} +{{- end }} +{{- if .Values.extraArgs }} + args: +{{ toYaml .Values.extraArgs | indent 8 }} +{{- end }} + ports: + - name: http + containerPort: 8080 + livenessProbe: + httpGet: + path: / + port: http +{{ toYaml .Values.probes.livenessHttpGetConfig | indent 12 }} +{{ toYaml .Values.probes.liveness | indent 10 }} + readinessProbe: + httpGet: + path: / + port: http +{{ toYaml .Values.probes.readinessHttpGetConfig | indent 12 }} +{{ toYaml .Values.probes.readiness | indent 10 }} + volumeMounts: +{{- if .Values.deployment.extraVolumeMounts }} + {{- toYaml .Values.deployment.extraVolumeMounts | nindent 8 }} +{{- end }} +{{- if .Values.deployment.sidecarContainers }} +{{- range $name, $spec := .Values.deployment.sidecarContainers }} + - name: {{ $name }} +{{- toYaml $spec | nindent 8 }} +{{- end }} +{{- end }} + {{- with .Values.resources }} + resources: +{{ toYaml . | indent 10 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName }} + {{- end }} + serviceAccountName: {{ include "stirlingpdf.serviceAccountName" . }} + automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} + volumes: + {{- if .Values.deployment.extraVolumes }} + {{- toYaml .Values.deployment.extraVolumes | nindent 6 }} + {{- end }} + - name: storage-volume + {{- if .Values.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ .Values.persistence.existingClaim | default (include "stirlingpdf.fullname" .) }} + {{- else }} + emptyDir: {} + {{- end }} diff --git a/chart/stirling-pdf/templates/ingress.yaml b/chart/stirling-pdf/templates/ingress.yaml new file mode 100644 index 00000000..c09fef68 --- /dev/null +++ b/chart/stirling-pdf/templates/ingress.yaml @@ -0,0 +1,85 @@ +{{- if .Values.ingress.enabled }} +{{- $servicePort := .Values.service.externalPort -}} +{{- $serviceName := include "stirlingpdf.fullname" . -}} +{{- $ingressExtraPaths := .Values.ingress.extraPaths -}} +--- +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion }} +apiVersion: extensions/v1beta1 +{{- else if semverCompare "<1.19-0" .Capabilities.KubeVersion.GitVersion }} +apiVersion: networking.k8s.io/v1beta1 +{{- else }} +apiVersion: networking.k8s.io/v1 +{{- end }} +kind: Ingress +metadata: + name: {{ include "stirlingpdf.fullname" . }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "stirlingpdf.labels" . | nindent 4 }} + {{- with .Values.ingress.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.ingress.ingressClassName }} + ingressClassName: {{ . }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .name }} + http: + paths: + {{- range $ingressExtraPaths }} + - path: {{ default "/" .path | quote }} + backend: + {{- if semverCompare "<1.19-0" $.Capabilities.KubeVersion.GitVersion }} + {{- if $.Values.service.servicename }} + serviceName: {{ $.Values.service.servicename }} + {{- else }} + serviceName: {{ default $serviceName .service }} + {{- end }} + servicePort: {{ default $servicePort .port }} + {{- else }} + service: + {{- if $.Values.service.servicename }} + name: {{ $.Values.service.servicename }} + {{- else }} + name: {{ default $serviceName .service }} + {{- end }} + port: + number: {{ default $servicePort .port }} + pathType: {{ default $.Values.ingress.pathType .pathType }} + {{- end }} + {{- end }} + - path: {{ default "/" .path | quote }} + backend: + {{- if semverCompare "<1.19-0" $.Capabilities.KubeVersion.GitVersion }} + {{- if $.Values.service.servicename }} + serviceName: {{ $.Values.service.servicename }} + {{- else }} + serviceName: {{ default $serviceName .service }} + {{- end }} + servicePort: {{ default $servicePort .servicePort }} + {{- else }} + service: + {{- if $.Values.service.servicename }} + name: {{ $.Values.service.servicename }} + {{- else }} + name: {{ default $serviceName .service }} + {{- end }} + port: + number: {{ default $servicePort .port }} + pathType: {{ $.Values.ingress.pathType }} + {{- end }} + {{- end }} + tls: + {{- range .Values.ingress.hosts }} + {{- if .tls }} + - hosts: + - {{ .name }} + secretName: {{ .tlsSecret }} + {{- end }} + {{- end }} +{{- end -}} diff --git a/chart/stirling-pdf/templates/pv.yaml b/chart/stirling-pdf/templates/pv.yaml new file mode 100644 index 00000000..aa99c6a9 --- /dev/null +++ b/chart/stirling-pdf/templates/pv.yaml @@ -0,0 +1,16 @@ +{{- if .Values.persistence.pv.enabled -}} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: {{ .Values.persistence.pv.pvname | default (include "stirlingpdf.fullname" .) }} + labels: + {{- include "stirlingpdf.labels" . | nindent 4 }} +spec: + capacity: + storage: {{ .Values.persistence.pv.capacity.storage }} + accessModes: + - {{ .Values.persistence.pv.accessMode | quote }} + nfs: + server: {{ .Values.persistence.pv.nfs.server }} + path: {{ .Values.persistence.pv.nfs.path | quote }} +{{- end }} \ No newline at end of file diff --git a/chart/stirling-pdf/templates/pvc.yaml b/chart/stirling-pdf/templates/pvc.yaml new file mode 100644 index 00000000..f7a21722 --- /dev/null +++ b/chart/stirling-pdf/templates/pvc.yaml @@ -0,0 +1,27 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ include "stirlingpdf.fullname" . }} + labels: + {{- include "stirlingpdf.labels" . | nindent 4 }} + {{- with .Values.persistence.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + accessModes: + - {{ .Values.persistence.accessMode | quote }} + resources: + requests: + storage: {{ .Values.persistence.size | quote }} +{{- if .Values.persistence.storageClass }} +{{- if (eq "-" .Values.persistence.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.storageClass }}" +{{- end }} +{{- if .Values.persistence.volumeName }} + volumeName: "{{ .Values.persistence.volumeName }}" +{{- end }} +{{- end }} +{{- end }} diff --git a/chart/stirling-pdf/templates/service.yaml b/chart/stirling-pdf/templates/service.yaml new file mode 100644 index 00000000..a529c3f2 --- /dev/null +++ b/chart/stirling-pdf/templates/service.yaml @@ -0,0 +1,48 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.service.servicename | default (include "stirlingpdf.fullname" .) }} + {{- with .Values.service.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "stirlingpdf.labels" . | nindent 4 }} + {{- with .Values.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + type: {{ .Values.service.type }} + {{- if (or (eq .Values.service.type "LoadBalancer") (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort)))) }} + externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }} + {{- end }} + {{- if (and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerIP) }} + loadBalancerIP: {{ .Values.service.loadBalancerIP }} + {{- end }} + {{- if (and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerSourceRanges) }} + loadBalancerSourceRanges: + {{- with .Values.service.loadBalancerSourceRanges }} +{{ toYaml . | indent 2 }} + {{- end }} + {{- end }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIP }} + clusterIP: {{ .Values.service.clusterIP }} + {{- end }} + {{- end }} + ports: + - port: {{ .Values.service.externalPort }} +{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }} + nodePort: {{.Values.service.nodePort}} +{{- end }} +{{- if .Values.service.targetPort }} + targetPort: {{ .Values.service.targetPort }} + name: {{ .Values.service.targetPort }} +{{- else }} + targetPort: http + name: http +{{- end }} + protocol: TCP + + selector: + {{- include "stirlingpdf.selectorLabels" . | nindent 4 }} diff --git a/chart/stirling-pdf/templates/serviceaccount.yaml b/chart/stirling-pdf/templates/serviceaccount.yaml new file mode 100644 index 00000000..7156e4a4 --- /dev/null +++ b/chart/stirling-pdf/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "stirlingpdf.serviceAccountName" . }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{ toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "stirlingpdf.labels" . | nindent 4 }} +{{- end }} diff --git a/chart/stirling-pdf/templates/servicemonitor.yaml b/chart/stirling-pdf/templates/servicemonitor.yaml new file mode 100644 index 00000000..ca0d31bb --- /dev/null +++ b/chart/stirling-pdf/templates/servicemonitor.yaml @@ -0,0 +1,31 @@ +{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.serviceMonitor.enabled ) }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ include "stirlingpdf.fullname" . }} + namespace: {{ .Values.serviceMonitor.namespace | default .Release.Namespace }} + labels: + {{- include "stirlingpdf.labels" . | nindent 4 }} + {{- with .Values.serviceMonitor.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + endpoints: + - targetPort: 8080 +{{- if .Values.serviceMonitor.interval }} + interval: {{ .Values.serviceMonitor.interval }} +{{- end }} +{{- if .Values.serviceMonitor.metricsPath }} + path: {{ .Values.serviceMonitor.metricsPath }} +{{- end }} +{{- if .Values.serviceMonitor.timeout }} + scrapeTimeout: {{ .Values.serviceMonitor.timeout }} +{{- end }} + jobLabel: {{ include "stirlingpdf.fullname" . }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} + selector: + matchLabels: + {{- include "stirlingpdf.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/chart/stirling-pdf/values.yaml b/chart/stirling-pdf/values.yaml new file mode 100644 index 00000000..3c4ca888 --- /dev/null +++ b/chart/stirling-pdf/values.yaml @@ -0,0 +1,239 @@ +extraArgs: [] + # - --storage-timestamp-tolerance 1s +replicaCount: 1 +strategy: + type: RollingUpdate +image: + repository: frooodle/s-pdf + # took Chart appVersion by default + tag: ~ + pullPolicy: IfNotPresent +secret: + labels: {} +## Labels to apply to all resources +## +commonLabels: {} +# team_name: dev + +envs: [] +# - name: PP_HOME_NAME +# value: "Stirling PDF" +# - name: APP_HOME_DESCRIPTION +# value: "Your locally hosted one-stop-shop for all your PDF needs." +# - name: APP_NAVBAR_NAME +# value: "Stirling PDF" +# - name: ALLOW_GOOGLE_VISIBILITY +# value: "true" +# - name: APP_ROOT_PATH +# value: "/" +# - name: APP_LOCALE +# value: "en_GB" + +deployment: + ## stirling-pdf Deployment annotations + annotations: {} + # name: value + labels: {} + # name: value + # additional volumes + extraVolumes: [] + # - name: nginx-config + # secret: + # secretName: nginx-config + # additional volumes to mount + extraVolumeMounts: [] + ## sidecarContainers for the stirling-pdf + # Can be used to add a proxy to the pod that does + # scanning for secrets, signing, authentication, validation + # of the chart's content, send notifications... + sidecarContainers: {} + ## Example sidecarContainer which uses an extraVolume from above and + ## a named port that can be referenced in the service as targetPort. + # proxy: + # image: nginx:latest + # ports: + # - name: proxy + # containerPort: 8081 + # volumeMounts: + # - name: nginx-config + # readOnly: true + # mountPath: /etc/nginx + +## Pod annotations +## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +## Read more about kube2iam to provide access to s3 https://github.com/jtblin/kube2iam +## +podAnnotations: {} + # iam.amazonaws.com/role: role-arn + +## Pod labels +## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +podLabels: {} + # name: value + +service: + servicename: + type: ClusterIP + externalTrafficPolicy: Local + ## Uses pre-assigned IP address from cloud provider + ## Only valid if service.type: LoadBalancer + loadBalancerIP: + ## Limits which cidr blocks can connect to service's load balancer + ## Only valid if service.type: LoadBalancer + loadBalancerSourceRanges: [] + # clusterIP: None + externalPort: 8080 + ## targetPort of the container to use. If a sidecar should handle the + ## requests first, use the named port from the sidecar. See sidecar example + ## from deployment above. Leave empty to use stirling-pdf directly. + targetPort: + nodePort: + annotations: {} + labels: {} + +serviceMonitor: + enabled: false + # namespace: prometheus + labels: {} + metricsPath: "/metrics" + # timeout: 60 + # interval: 60 + +resources: {} +# limits: +# cpu: 100m +# memory: 128Mi +# requests: +# cpu: 80m +# memory: 64Mi + +probes: + liveness: + initialDelaySeconds: 5 + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + livenessHttpGetConfig: + scheme: HTTP + readiness: + initialDelaySeconds: 5 + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessHttpGetConfig: + scheme: HTTP + +serviceAccount: + create: true + name: "" + automountServiceAccountToken: false + ## Annotations for the Service Account + annotations: {} + +# UID/GID 1000 is the default user "stirling-pdf" used in +# the container image starting in v0.8.0 and above. This +# is required for local persistent storage. If your cluster +# does not allow this, try setting securityContext: {} +securityContext: + enabled: true + fsGroup: 1000 + ## Optionally, specify supplementalGroups and/or + ## runAsNonRoot for security purposes + # runAsNonRoot: true + # supplementalGroups: [1000] + +containerSecurityContext: {} + +priorityClassName: "" + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +persistence: + enabled: false + accessMode: ReadWriteOnce + size: 8Gi + labels: {} + # name: value + path: /tmp + ## A manually managed Persistent Volume and Claim + ## Requires persistence.enabled: true + ## If defined, PVC must be created manually before volume will be bound + # existingClaim: + + ## stirling-pdf data Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + # volumeName: + pv: + enabled: false + pvname: + capacity: + storage: 8Gi + accessMode: ReadWriteOnce + nfs: + server: + path: + +## Init containers parameters: +## volumePermissions: Change the owner of the persistent volume mountpoint to RunAsUser:fsGroup +## +volumePermissions: + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + +## Ingress for load balancer +ingress: + enabled: false + pathType: "ImplementationSpecific" + ## stirling-pdf Ingress labels + ## + labels: {} + # dns: "route53" + + ## stirling-pdf Ingress annotations + ## + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + + ## stirling-pdf Ingress hostnames + ## Must be provided if Ingress is enabled + ## + hosts: [] + # - name: stirling-pdf.domain1.com + # path: / + # tls: false + # - name: stirling-pdf.domain2.com + # path: / + # + # ## Set this to true in order to enable TLS on the ingress record + # tls: true + # + # ## If TLS is set to true, you must declare what secret will store the key/certificate for TLS + # ## Secrets must be added manually to the namespace + # tlsSecret: stirling-pdf.domain2-tls + + # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName + # See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress + ingressClassName: + From 993f5e50974ed1bb9bc3d31963a535c2944d25d9 Mon Sep 17 00:00:00 2001 From: slikie <13197246+slikie@users.noreply.github.com> Date: Wed, 20 Sep 2023 22:08:31 +0800 Subject: [PATCH 23/57] Update README.md spelling --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c430e0d..0e7702b0 100644 --- a/README.md +++ b/README.md @@ -222,7 +222,7 @@ metrics: - customStaticFilePath. Customise static files such as the app logo by placing files in the /customFiles/static/ directory. An example of customising app logo is placing a /customFiles/static/favicon.svg to override current SVG. This can be used to change any images/icons/css/fonts/js etc in Stirling-PDF ### Environment only parameters -- ``SYSTEM_ROOTURIPATH`` ie set to ``pdf-app`` to Set the application's root URI tp ``localhost:8080/pdf-app`` +- ``SYSTEM_ROOTURIPATH`` ie set to ``pdf-app`` to Set the application's root URI to ``localhost:8080/pdf-app`` - ``SYSTEM_CONNECTIONTIMEOUTMINUTES`` to set custom connection timeout values - ``DOCKER_ENABLE_SECURITY`` to tell docker to download security jar (required as true for auth login) From 3a8f2495ea4b96abafc6bece086ea58368417c72 Mon Sep 17 00:00:00 2001 From: slikie <13197246+slikie@users.noreply.github.com> Date: Wed, 20 Sep 2023 22:07:24 +0800 Subject: [PATCH 24/57] fix: Docs - Ensure proper context path format --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e7702b0..fda5d296 100644 --- a/README.md +++ b/README.md @@ -222,7 +222,7 @@ metrics: - customStaticFilePath. Customise static files such as the app logo by placing files in the /customFiles/static/ directory. An example of customising app logo is placing a /customFiles/static/favicon.svg to override current SVG. This can be used to change any images/icons/css/fonts/js etc in Stirling-PDF ### Environment only parameters -- ``SYSTEM_ROOTURIPATH`` ie set to ``pdf-app`` to Set the application's root URI to ``localhost:8080/pdf-app`` +- ``SYSTEM_ROOTURIPATH`` ie set to ``/pdf-app`` to Set the application's root URI to ``localhost:8080/pdf-app`` - ``SYSTEM_CONNECTIONTIMEOUTMINUTES`` to set custom connection timeout values - ``DOCKER_ENABLE_SECURITY`` to tell docker to download security jar (required as true for auth login) From ece00956d9ff03fe579374a25390d8273c1d5f73 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 24 Sep 2023 21:09:34 +0100 Subject: [PATCH 25/57] fix for config #376 --- build.gradle | 2 +- .../SPDF/config/ConfigInitializer.java | 168 ++++++++++-------- 2 files changed, 99 insertions(+), 71 deletions(-) diff --git a/build.gradle b/build.gradle index e803b512..06db8ab3 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { } group = 'stirling.software' -version = '0.14.2' +version = '0.14.3' sourceCompatibility = '17' repositories { diff --git a/src/main/java/stirling/software/SPDF/config/ConfigInitializer.java b/src/main/java/stirling/software/SPDF/config/ConfigInitializer.java index 9760662a..862f5718 100644 --- a/src/main/java/stirling/software/SPDF/config/ConfigInitializer.java +++ b/src/main/java/stirling/software/SPDF/config/ConfigInitializer.java @@ -12,6 +12,8 @@ import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import java.util.Optional; +import java.util.Set; +import java.util.function.Function; import java.util.stream.Collectors; import org.springframework.context.ApplicationContextInitializer; @@ -19,83 +21,109 @@ import org.springframework.context.ConfigurableApplicationContext; public class ConfigInitializer implements ApplicationContextInitializer { - @Override - public void initialize(ConfigurableApplicationContext applicationContext) { - try { - ensureConfigExists(); - } catch (IOException e) { - throw new RuntimeException("Failed to initialize application configuration", e); - } - } + @Override + public void initialize(ConfigurableApplicationContext applicationContext) { + try { + ensureConfigExists(); + } catch (IOException e) { + throw new RuntimeException("Failed to initialize application configuration", e); + } + } - public void ensureConfigExists() throws IOException { - // Define the path to the external config directory - Path destPath = Paths.get("configs", "settings.yml"); + public void ensureConfigExists() throws IOException { + // Define the path to the external config directory + Path destPath = Paths.get("configs", "settings.yml"); - // Check if the file already exists - if (Files.notExists(destPath)) { - // Ensure the destination directory exists - Files.createDirectories(destPath.getParent()); + // Check if the file already exists + if (Files.notExists(destPath)) { + // Ensure the destination directory exists + Files.createDirectories(destPath.getParent()); - // Copy the resource from classpath to the external directory - try (InputStream in = getClass().getClassLoader().getResourceAsStream("settings.yml.template")) { - if (in != null) { - Files.copy(in, destPath); - } else { - throw new FileNotFoundException("Resource file not found: settings.yml.template"); - } - } - } else { - // If user file exists, we need to merge it with the template from the classpath - List templateLines; - try (InputStream in = getClass().getClassLoader().getResourceAsStream("settings.yml.template")) { - templateLines = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8)).lines().collect(Collectors.toList()); - } + // Copy the resource from classpath to the external directory + try (InputStream in = getClass().getClassLoader().getResourceAsStream("settings.yml.template")) { + if (in != null) { + Files.copy(in, destPath); + } else { + throw new FileNotFoundException("Resource file not found: settings.yml.template"); + } + } + } else { + // If user file exists, we need to merge it with the template from the classpath + List templateLines; + try (InputStream in = getClass().getClassLoader().getResourceAsStream("settings.yml.template")) { + templateLines = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8)).lines() + .collect(Collectors.toList()); + } - mergeYamlFiles(templateLines, destPath, destPath); - } - } + mergeYamlFiles(templateLines, destPath, destPath); + } + } - public void mergeYamlFiles(List templateLines, Path userFilePath, Path outputPath) throws IOException { - List userLines = Files.readAllLines(userFilePath); + public void mergeYamlFiles(List templateLines, Path userFilePath, Path outputPath) throws IOException { + List userLines = Files.readAllLines(userFilePath); + List mergedLines = new ArrayList<>(); + boolean insideAutoGenerated = false; + boolean beforeFirstKey = true; - List mergedLines = new ArrayList<>(); - boolean insideAutoGenerated = false; + Function isCommented = line -> line.trim().startsWith("#"); + Function extractKey = line -> { + String[] parts = line.split(":"); + return parts.length > 0 ? parts[0].trim().replace("#", "").trim() : ""; + }; - for (String line : templateLines) { - // Check if we've entered or left the AutomaticallyGenerated section - if (line.trim().equalsIgnoreCase("AutomaticallyGenerated:")) { - insideAutoGenerated = true; - mergedLines.add(line); - continue; - } else if (insideAutoGenerated && line.trim().isEmpty()) { - // We have reached the end of the AutomaticallyGenerated section - insideAutoGenerated = false; - mergedLines.add(line); - continue; - } + Set userKeys = userLines.stream().map(extractKey).collect(Collectors.toSet()); - if (insideAutoGenerated) { - // Add lines from user's settings if we are inside AutomaticallyGenerated - Optional userAutoGenValue = userLines.stream().filter(l -> l.trim().startsWith(line.split(":")[0].trim())).findFirst(); - if (userAutoGenValue.isPresent()) { - mergedLines.add(userAutoGenValue.get()); - continue; - } - } else { - // Outside of AutomaticallyGenerated, continue as before - if (line.contains(": ")) { - String key = line.split(": ")[0].trim(); - Optional userValue = userLines.stream().filter(l -> l.trim().startsWith(key)).findFirst(); - if (userValue.isPresent()) { - mergedLines.add(userValue.get()); - continue; - } - } - mergedLines.add(line); - } - } + for (String line : templateLines) { + String key = extractKey.apply(line); + + if (line.trim().equalsIgnoreCase("AutomaticallyGenerated:")) { + insideAutoGenerated = true; + mergedLines.add(line); + continue; + } else if (insideAutoGenerated && line.trim().isEmpty()) { + insideAutoGenerated = false; + mergedLines.add(line); + continue; + } + + if (beforeFirstKey && (isCommented.apply(line) || line.trim().isEmpty())) { + // Handle top comments and empty lines before the first key. + mergedLines.add(line); + continue; + } + + if (!key.isEmpty()) + beforeFirstKey = false; + + if (userKeys.contains(key)) { + // If user has any version (commented or uncommented) of this key, skip the + // template line + Optional userValue = userLines.stream() + .filter(l -> extractKey.apply(l).equalsIgnoreCase(key) && !isCommented.apply(l)).findFirst(); + if (userValue.isPresent()) + mergedLines.add(userValue.get()); + continue; + } + + if (isCommented.apply(line) || line.trim().isEmpty() || !userKeys.contains(key)) { + mergedLines.add(line); // If line is commented, empty or key not present in user's file, retain the + // template line + continue; + } + } + + // Add any additional uncommented user lines that are not present in the + // template + for (String userLine : userLines) { + String userKey = extractKey.apply(userLine); + boolean isPresentInTemplate = templateLines.stream().map(extractKey) + .anyMatch(templateKey -> templateKey.equalsIgnoreCase(userKey)); + if (!isPresentInTemplate && !isCommented.apply(userLine)) { + mergedLines.add(userLine); + } + } + + Files.write(outputPath, mergedLines, StandardCharsets.UTF_8); + } - Files.write(outputPath, mergedLines, StandardCharsets.UTF_8); - } } \ No newline at end of file From 1e2eb9b07a05a6a7a93cada4d74a61963fa4edf0 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 24 Sep 2023 21:21:01 +0100 Subject: [PATCH 26/57] additional fix to #364 --- .../SPDF/controller/api/security/CertSignController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 b580b4c9..b0e5f2aa 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 @@ -12,6 +12,7 @@ import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.security.spec.PKCS8EncodedKeySpec; import java.text.SimpleDateFormat; +import java.util.Calendar; import java.util.Collections; import java.util.Date; @@ -130,7 +131,8 @@ public class CertSignController { signature.setName(name); signature.setLocation(location); signature.setReason(reason); - + signature.setSignDate(Calendar.getInstance()); + // Load the PDF try (PDDocument document = PDDocument.load(pdf.getBytes())) { logger.info("Successfully loaded the provided PDF"); From 1fc1ecbaa6d13edae02af45cc412cbb753377522 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Thu, 28 Sep 2023 12:35:44 -0500 Subject: [PATCH 27/57] Update remove-password.html allow removal of encryption without password #383 --- src/main/resources/templates/security/remove-password.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/templates/security/remove-password.html b/src/main/resources/templates/security/remove-password.html index cec61959..af8675d1 100644 --- a/src/main/resources/templates/security/remove-password.html +++ b/src/main/resources/templates/security/remove-password.html @@ -20,7 +20,7 @@
    - +

    From c5ea2549450e708943e368cae1c1a8f33aec1590 Mon Sep 17 00:00:00 2001 From: JerronAB <92005206+JerronAB@users.noreply.github.com> Date: Fri, 29 Sep 2023 16:00:22 -0400 Subject: [PATCH 28/57] Removed numpy library from blank page py script --- scripts/detect-blank-pages.py | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/detect-blank-pages.py b/scripts/detect-blank-pages.py index 6712dc12..474c2735 100644 --- a/scripts/detect-blank-pages.py +++ b/scripts/detect-blank-pages.py @@ -1,5 +1,4 @@ import cv2 -import numpy as np import sys import argparse From e0f306d3f78f6fdb4c50111b16b4d3b48b48989c Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Fri, 29 Sep 2023 23:58:37 +0100 Subject: [PATCH 29/57] updates --- Dockerfile-lite | 28 ++++---- README.md | 8 ++- build.gradle | 2 +- .../config/security/InitialSecuritySetup.java | 13 +++- .../api/MultiPageLayoutController.java | 16 ++++- .../api/misc/ExtractImagesController.java | 15 +++- .../controller/api/security/GetInfoOnPDF.java | 68 +++++++++++++------ .../SPDF/model/ApplicationProperties.java | 41 ++++++++++- .../general/MergeMultiplePagesRequest.java | 3 + src/main/resources/messages_ar_AR.properties | 7 +- src/main/resources/messages_ca_CA.properties | 7 +- src/main/resources/messages_de_DE.properties | 7 +- src/main/resources/messages_en_GB.properties | 1 + src/main/resources/messages_en_US.properties | 7 +- src/main/resources/messages_es_ES.properties | 7 +- src/main/resources/messages_eu_ES.properties | 7 +- src/main/resources/messages_fr_FR.properties | 7 +- src/main/resources/messages_it_IT.properties | 7 +- src/main/resources/messages_ja_JP.properties | 7 +- src/main/resources/messages_ko_KR.properties | 7 +- src/main/resources/messages_nl_NL.properties | 7 +- src/main/resources/messages_pl_PL.properties | 7 +- src/main/resources/messages_pt_BR.properties | 7 +- src/main/resources/messages_ro_RO.properties | 7 +- src/main/resources/messages_ru_RU.properties | 7 +- src/main/resources/messages_sv_SE.properties | 7 +- src/main/resources/messages_zh_CN.properties | 7 +- .../templates/multi-page-layout.html | 4 ++ 28 files changed, 223 insertions(+), 95 deletions(-) diff --git a/Dockerfile-lite b/Dockerfile-lite index 8144fff9..f41a8a8f 100644 --- a/Dockerfile-lite +++ b/Dockerfile-lite @@ -12,21 +12,22 @@ RUN apt-get update && \ # Set Environment Variables -ENV PUID=1000 \ - PGID=1000 \ - UMASK=022 \ - DOCKER_ENABLE_SECURITY=false \ +ENV DOCKER_ENABLE_SECURITY=false \ HOME=/home/stirlingpdfuser \ - VERSION_TAG=$VERSION_TAG + VERSION_TAG=$VERSION_TAG +# PUID=1000 \ +# PGID=1000 \ +# UMASK=022 \ # Create user and group -RUN groupadd -g $PGID stirlingpdfgroup && \ - useradd -u $PUID -g stirlingpdfgroup -s /bin/sh stirlingpdfuser && \ - mkdir -p $HOME && chown stirlingpdfuser:stirlingpdfgroup $HOME +#RUN groupadd -g $PGID stirlingpdfgroup && \ +# useradd -u $PUID -g stirlingpdfgroup -s /bin/sh stirlingpdfuser && \ +# mkdir -p $HOME && chown stirlingpdfuser:stirlingpdfgroup $HOME # Set up necessary directories and permissions -RUN mkdir -p /scripts /usr/share/fonts/opentype/noto /configs /customFiles && \ - chown -R stirlingpdfuser:stirlingpdfgroup /usr/share/fonts/opentype/noto /configs /customFiles +RUN mkdir -p /scripts /usr/share/fonts/opentype/noto /configs /customFiles + +# chown -R stirlingpdfuser:stirlingpdfgroup /usr/share/fonts/opentype/noto /configs /customFiles # Copy necessary files COPY src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto/ @@ -34,8 +35,8 @@ COPY src/main/resources/static/fonts/*.otf /usr/share/fonts/opentype/noto/ COPY build/libs/*.jar app.jar # Set font cache and permissions -RUN fc-cache -f -v && \ - chown stirlingpdfuser:stirlingpdfgroup /app.jar +RUN fc-cache -f -v +# chown stirlingpdfuser:stirlingpdfgroup /app.jar @@ -48,5 +49,6 @@ ENV ENDPOINTS_GROUPS_TO_REMOVE=Python,OpenCV,OCRmyPDF ENV DOCKER_ENABLE_SECURITY=false # Run the application -USER stirlingpdfuser +#USER stirlingpdfuser + CMD ["java", "-jar", "/app.jar"] diff --git a/README.md b/README.md index fda5d296..e5dcc5d8 100644 --- a/README.md +++ b/README.md @@ -235,7 +235,8 @@ For those wanting to use Stirling-PDFs backend API to link with their own custom ### Prerequisites: - User must have the folder ./configs volumed within docker so that it is retained during updates. - Docker uses must download the security jar version by setting ``DOCKER_ENABLE_SECURITY`` to ``true`` in environment variables. -- Now the initial user will be generated with username ``admin`` and password ``stirling``. On login you will be forced to change the password to a new one. +- Then either enable login via the settings.yml file or via setting ``SECURITY_ENABLE_LOGIN`` to ``true`` +- Now the initial user will be generated with username ``admin`` and password ``stirling``. On login you will be forced to change the password to a new one. You can also use the environment variables ``SECURITY_INITIALLOGIN_USERNAME`` and ``SECURITY_INITIALLOGIN_PASSWORD`` to set your own straight away (Recommended to remove them after user creation). Once the above has been done, on restart, a new stirling-pdf-DB.mv.db will show if everything worked. @@ -261,4 +262,7 @@ For API usage you must provide a header with 'X-API-Key' and the associated API - Fill forms mannual and automatic ### Q2: Why is my application downloading .htm files? -This is a issue caused commonly by your NGINX congifuration. The default file upload size for NGINX is 1MB, you need to add the following in your Nginx sites-available file. client_max_body_size SIZE; Where "SIZE" is 50M for example for 50MB files. +This is a issue caused commonly by your NGINX congifuration. The default file upload size for NGINX is 1MB, you need to add the following in your Nginx sites-available file. ``client_max_body_size SIZE;`` Where "SIZE" is 50M for example for 50MB files. + +### Q3: Why is my download timing out +NGINX has timeout values by default so if you are running Stirling-PDF behind NGINX you may need to set a timeout value such as adding the config ``proxy_read_timeout 3600;`` \ No newline at end of file diff --git a/build.gradle b/build.gradle index 06db8ab3..1840c3a4 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { } group = 'stirling.software' -version = '0.14.3' +version = '0.14.4' sourceCompatibility = '17' repositories { diff --git a/src/main/java/stirling/software/SPDF/config/security/InitialSecuritySetup.java b/src/main/java/stirling/software/SPDF/config/security/InitialSecuritySetup.java index 7097020b..842375d8 100644 --- a/src/main/java/stirling/software/SPDF/config/security/InitialSecuritySetup.java +++ b/src/main/java/stirling/software/SPDF/config/security/InitialSecuritySetup.java @@ -26,11 +26,18 @@ public class InitialSecuritySetup { @PostConstruct public void init() { if (!userService.hasUsers()) { - String initialUsername = "admin"; - String initialPassword = "stirling"; - userService.saveUser(initialUsername, initialPassword, Role.ADMIN.getRoleId(), true); + String initialUsername = applicationProperties.getSecurity().getInitialLogin().getUsername(); + String initialPassword = applicationProperties.getSecurity().getInitialLogin().getPassword(); + if (initialUsername != null && initialPassword != null) { + userService.saveUser(initialUsername, initialPassword, Role.ADMIN.getRoleId()); + } else { + initialUsername = "admin"; + initialPassword = "stirling"; + userService.saveUser(initialUsername, initialPassword, Role.ADMIN.getRoleId(), true); + } + } } diff --git a/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java b/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java index f899736f..ebe81ffd 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/MultiPageLayoutController.java @@ -1,6 +1,7 @@ package stirling.software.SPDF.controller.api; +import java.awt.Color; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -42,7 +43,8 @@ public class MultiPageLayoutController { int pagesPerSheet = request.getPagesPerSheet(); MultipartFile file = request.getFileInput(); - + boolean addBorder = request.isAddBorder(); + if (pagesPerSheet != 2 && pagesPerSheet != 3 && pagesPerSheet != (int) Math.sqrt(pagesPerSheet) * Math.sqrt(pagesPerSheet)) { throw new IllegalArgumentException("pagesPerSheet must be 2, 3 or a perfect square"); } @@ -62,6 +64,10 @@ public class MultiPageLayoutController { PDPageContentStream contentStream = new PDPageContentStream(newDocument, newPage, PDPageContentStream.AppendMode.APPEND, true, true); LayerUtility layerUtility = new LayerUtility(newDocument); + float borderThickness = 1.5f; // Specify border thickness as required + contentStream.setLineWidth(borderThickness); + contentStream.setStrokingColor(Color.BLACK); + for (int i = 0; i < totalPages; i++) { if (i != 0 && i % pagesPerSheet == 0) { // Close the current content stream and create a new page and content stream @@ -92,6 +98,14 @@ public class MultiPageLayoutController { contentStream.drawForm(formXObject); contentStream.restoreGraphicsState(); + + if(addBorder) { + // Draw border around each page + float borderX = colIndex * cellWidth; + float borderY = newPage.getMediaBox().getHeight() - (rowIndex + 1) * cellHeight; + contentStream.addRect(borderX, borderY, cellWidth, cellHeight); + contentStream.stroke(); + } } diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java index 03d21e64..b24ac892 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ExtractImagesController.java @@ -1,5 +1,8 @@ package stirling.software.SPDF.controller.api.misc; - +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.awt.Graphics2D; import java.awt.Image; import java.awt.image.BufferedImage; @@ -58,7 +61,8 @@ public class ExtractImagesController { int imageIndex = 1; String filename = file.getOriginalFilename().replaceFirst("[.][^.]+$", ""); - int pageNum = 1; + int pageNum = 0; + Set processedImages = new HashSet<>(); // Iterate over each page for (PDPage page : document.getPages()) { ++pageNum; @@ -66,7 +70,12 @@ public class ExtractImagesController { for (COSName name : page.getResources().getXObjectNames()) { if (page.getResources().isImageXObject(name)) { PDImageXObject image = (PDImageXObject) page.getResources().getXObject(name); - + int imageHash = image.hashCode(); + if(processedImages.contains(imageHash)) { + continue; // Skip already processed images + } + processedImages.add(imageHash); + // Convert image to desired format RenderedImage renderedImage = image.getImage(); BufferedImage bufferedImage = null; diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java b/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java index 7b4aed65..791dc736 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/GetInfoOnPDF.java @@ -386,12 +386,16 @@ public class GetInfoOnPDF { float width = mediaBox.getWidth(); float height = mediaBox.getHeight(); - pageInfo.put("Width", width); - pageInfo.put("Height", height); + ObjectNode sizeInfo = objectMapper.createObjectNode(); + + getDimensionInfo(sizeInfo, width, height); + + sizeInfo.put("Standard Page", getPageSize(width, height)); + pageInfo.set("Size", sizeInfo); + pageInfo.put("Rotation", page.getRotation()); - pageInfo.put("Page Orientation", getPageOrientation(width, height)); - pageInfo.put("Standard Size", getPageSize(width, height)); + // Boxes pageInfo.put("MediaBox", mediaBox.toString()); @@ -620,7 +624,7 @@ public class GetInfoOnPDF { - pageInfoParent.set("Page " + pageNum, pageInfo); + pageInfoParent.set("Page " + (pageNum+1), pageInfo); } @@ -670,28 +674,52 @@ public class GetInfoOnPDF { return "Square"; } } - public String getPageSize(double width, double height) { - // Common aspect ratios used for standard paper sizes - double[] aspectRatios = {4.0 / 3.0, 3.0 / 2.0, Math.sqrt(2.0), 16.0 / 9.0}; + public String getPageSize(float width, float height) { + // Define standard page sizes + Map standardSizes = new HashMap<>(); + standardSizes.put("Letter", PDRectangle.LETTER); + standardSizes.put("LEGAL", PDRectangle.LEGAL); + standardSizes.put("A0", PDRectangle.A0); + standardSizes.put("A1", PDRectangle.A1); + standardSizes.put("A2", PDRectangle.A2); + standardSizes.put("A3", PDRectangle.A3); + standardSizes.put("A4", PDRectangle.A4); + standardSizes.put("A5", PDRectangle.A5); + standardSizes.put("A6", PDRectangle.A6); - // Check if the page matches any common aspect ratio - for (double aspectRatio : aspectRatios) { - if (isCloseToAspectRatio(width, height, aspectRatio)) { - return "Standard"; + for (Map.Entry entry : standardSizes.entrySet()) { + PDRectangle size = entry.getValue(); + if (isCloseToSize(width, height, size.getWidth(), size.getHeight())) { + return entry.getKey(); } } - - // If not a standard aspect ratio, consider it as a custom size return "Custom"; } - private boolean isCloseToAspectRatio(double width, double height, double aspectRatio) { - // Calculate the aspect ratio of the page - double pageAspectRatio = width / height; - // Compare the page aspect ratio with the common aspect ratio within a threshold - return Math.abs(pageAspectRatio - aspectRatio) <= 0.05; + private boolean isCloseToSize(float width, float height, float standardWidth, float standardHeight) { + float tolerance = 1.0f; // You can adjust the tolerance as needed + return Math.abs(width - standardWidth) <= tolerance && Math.abs(height - standardHeight) <= tolerance; } - + + + public ObjectNode getDimensionInfo(ObjectNode dimensionInfo, float width, float height) { + float ppi = 72; // Points Per Inch + + float widthInInches = width / ppi; + float heightInInches = height / ppi; + + float widthInCm = widthInInches * 2.54f; + float heightInCm = heightInInches * 2.54f; + + dimensionInfo.put("Width (px)", String.format("%.2f", width)); + dimensionInfo.put("Height (px)", String.format("%.2f", height)); + dimensionInfo.put("Width (in)", String.format("%.2f", widthInInches)); + dimensionInfo.put("Height (in)", String.format("%.2f", heightInInches)); + dimensionInfo.put("Width (cm)", String.format("%.2f", widthInCm)); + dimensionInfo.put("Height (cm)", String.format("%.2f", heightInCm)); + return dimensionInfo; + } + public static boolean checkForStandard(PDDocument document, String standardKeyword) { diff --git a/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java b/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java index 45c37efe..a72479ad 100644 --- a/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java +++ b/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java @@ -105,7 +105,16 @@ public class ApplicationProperties { public static class Security { private Boolean enableLogin; private Boolean csrfDisabled; + private InitialLogin initialLogin; + public InitialLogin getInitialLogin() { + return initialLogin != null ? initialLogin : new InitialLogin(); + } + + public void setInitialLogin(InitialLogin initialLogin) { + this.initialLogin = initialLogin; + } + public Boolean getEnableLogin() { return enableLogin; } @@ -125,9 +134,39 @@ public class ApplicationProperties { @Override public String toString() { - return "Security [enableLogin=" + enableLogin + ", csrfDisabled=" + return "Security [enableLogin=" + enableLogin + ", initialLogin=" + initialLogin + ", csrfDisabled=" + csrfDisabled + "]"; } + + public static class InitialLogin { + + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public String toString() { + return "InitialLogin [username=" + username + ", password=" + (password != null && !password.isEmpty() ? "MASKED" : "NULL") + "]"; + } + + + + } } public static class System { diff --git a/src/main/java/stirling/software/SPDF/model/api/general/MergeMultiplePagesRequest.java b/src/main/java/stirling/software/SPDF/model/api/general/MergeMultiplePagesRequest.java index ab6e3510..4642cb75 100644 --- a/src/main/java/stirling/software/SPDF/model/api/general/MergeMultiplePagesRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/general/MergeMultiplePagesRequest.java @@ -12,4 +12,7 @@ public class MergeMultiplePagesRequest extends PDFFile { @Schema(description = "The number of pages to fit onto a single sheet in the output PDF.", type = "integer", allowableValues = {"2", "3", "4", "9", "16"}) private int pagesPerSheet; + + @Schema(description = "Boolean for if you wish to add border around the pages") + private boolean addBorder; } diff --git a/src/main/resources/messages_ar_AR.properties b/src/main/resources/messages_ar_AR.properties index 87190f5f..d8722e95 100644 --- a/src/main/resources/messages_ar_AR.properties +++ b/src/main/resources/messages_ar_AR.properties @@ -478,6 +478,10 @@ pipeline.title=Pipeline pageLayout.title=Multi Page Layout pageLayout.header=Multi Page Layout pageLayout.pagesPerSheet=Pages per sheet: +########################## +### TODO: Translate ### +########################## +pageLayout.addBorder=Add Borders pageLayout.submit=Submit @@ -665,9 +669,6 @@ split.submit=Split imageToPDF.title=صورة إلى PDF imageToPDF.header=صورة إلى PDF imageToPDF.submit=تحول -########################## -### TODO: Translate ### -########################## imageToPDF.selectLabel=Image Fit Options imageToPDF.fillPage=Fill Page imageToPDF.fitDocumentToImage=Fit Page to Image diff --git a/src/main/resources/messages_ca_CA.properties b/src/main/resources/messages_ca_CA.properties index 51f0e33f..b6341fa0 100644 --- a/src/main/resources/messages_ca_CA.properties +++ b/src/main/resources/messages_ca_CA.properties @@ -478,6 +478,10 @@ pipeline.title=Pipeline pageLayout.title=Multi Page Layout pageLayout.header=Multi Page Layout pageLayout.pagesPerSheet=Pages per sheet: +########################## +### TODO: Translate ### +########################## +pageLayout.addBorder=Add Borders pageLayout.submit=Submit @@ -665,9 +669,6 @@ split.submit=Divideix imageToPDF.title=Imatge a PDF imageToPDF.header=Imatge a PDF imageToPDF.submit=Converteix -########################## -### TODO: Translate ### -########################## imageToPDF.selectLabel=Image Fit Options imageToPDF.fillPage=Fill Page imageToPDF.fitDocumentToImage=Fit Page to Image diff --git a/src/main/resources/messages_de_DE.properties b/src/main/resources/messages_de_DE.properties index 26e61b54..34b71c66 100644 --- a/src/main/resources/messages_de_DE.properties +++ b/src/main/resources/messages_de_DE.properties @@ -478,6 +478,10 @@ pipeline.title=Pipeline pageLayout.title=Mehrseitiges Layout pageLayout.header=Mehrseitiges Layout pageLayout.pagesPerSheet=Seiten pro Blatt: +########################## +### TODO: Translate ### +########################## +pageLayout.addBorder=Add Borders pageLayout.submit=Abschicken @@ -665,9 +669,6 @@ split.submit=Aufteilen imageToPDF.title=Bild zu PDF imageToPDF.header=Bild zu PDF imageToPDF.submit=Umwandeln -########################## -### TODO: Translate ### -########################## imageToPDF.selectLabel=Image Fit Options imageToPDF.fillPage=Fill Page imageToPDF.fitDocumentToImage=Fit Page to Image diff --git a/src/main/resources/messages_en_GB.properties b/src/main/resources/messages_en_GB.properties index 6d6a7aad..cc7978c4 100644 --- a/src/main/resources/messages_en_GB.properties +++ b/src/main/resources/messages_en_GB.properties @@ -478,6 +478,7 @@ pipeline.title=Pipeline pageLayout.title=Multi Page Layout pageLayout.header=Multi Page Layout pageLayout.pagesPerSheet=Pages per sheet: +pageLayout.addBorder=Add Borders pageLayout.submit=Submit diff --git a/src/main/resources/messages_en_US.properties b/src/main/resources/messages_en_US.properties index 9ee15dbf..bc712951 100644 --- a/src/main/resources/messages_en_US.properties +++ b/src/main/resources/messages_en_US.properties @@ -478,6 +478,10 @@ pipeline.title=Pipeline pageLayout.title=Multi Page Layout pageLayout.header=Multi Page Layout pageLayout.pagesPerSheet=Pages per sheet: +########################## +### TODO: Translate ### +########################## +pageLayout.addBorder=Add Borders pageLayout.submit=Submit @@ -665,9 +669,6 @@ split.submit=Split imageToPDF.title=Image to PDF imageToPDF.header=Image to PDF imageToPDF.submit=Convert -########################## -### TODO: Translate ### -########################## imageToPDF.selectLabel=Image Fit Options imageToPDF.fillPage=Fill Page imageToPDF.fitDocumentToImage=Fit Page to Image diff --git a/src/main/resources/messages_es_ES.properties b/src/main/resources/messages_es_ES.properties index 9aef8747..26e993c8 100644 --- a/src/main/resources/messages_es_ES.properties +++ b/src/main/resources/messages_es_ES.properties @@ -478,6 +478,10 @@ pipeline.title=Pipeline pageLayout.title=Diseño de varias páginas pageLayout.header=Diseño de varias páginas pageLayout.pagesPerSheet=Páginas por hoja: +########################## +### TODO: Translate ### +########################## +pageLayout.addBorder=Add Borders pageLayout.submit=Entregar @@ -665,9 +669,6 @@ split.submit=Dividir imageToPDF.title=Imagen a PDF imageToPDF.header=Imagen a PDF imageToPDF.submit=Convertir -########################## -### TODO: Translate ### -########################## imageToPDF.selectLabel=Image Fit Options imageToPDF.fillPage=Fill Page imageToPDF.fitDocumentToImage=Fit Page to Image diff --git a/src/main/resources/messages_eu_ES.properties b/src/main/resources/messages_eu_ES.properties index a7e88caa..e0dc8e5a 100644 --- a/src/main/resources/messages_eu_ES.properties +++ b/src/main/resources/messages_eu_ES.properties @@ -478,6 +478,10 @@ pipeline.title=Hodia pageLayout.title=Hainbat orrialderen diseinua pageLayout.header=Hainbat orrialderen diseinua pageLayout.pagesPerSheet=Orrialdeak orriko: +########################## +### TODO: Translate ### +########################## +pageLayout.addBorder=Add Borders pageLayout.submit=Entregatu @@ -665,9 +669,6 @@ split.submit=Zatitu imageToPDF.title=Irudia PDF bihurtu imageToPDF.header=Irudia PDF bihurtu imageToPDF.submit=Bihurtu -########################## -### TODO: Translate ### -########################## imageToPDF.selectLabel=Image Fit Options imageToPDF.fillPage=Fill Page imageToPDF.fitDocumentToImage=Fit Page to Image diff --git a/src/main/resources/messages_fr_FR.properties b/src/main/resources/messages_fr_FR.properties index 2936a706..d8f0e178 100644 --- a/src/main/resources/messages_fr_FR.properties +++ b/src/main/resources/messages_fr_FR.properties @@ -478,6 +478,10 @@ pipeline.title=Pipeline pageLayout.title=Fusionner des pages pageLayout.header=Fusionner des pages pageLayout.pagesPerSheet=Pages par feuille +########################## +### TODO: Translate ### +########################## +pageLayout.addBorder=Add Borders pageLayout.submit=Fusionner @@ -665,9 +669,6 @@ split.submit=Diviser imageToPDF.title=Image en PDF imageToPDF.header=Image en PDF imageToPDF.submit=Convertir -########################## -### TODO: Translate ### -########################## imageToPDF.selectLabel=Image Fit Options imageToPDF.fillPage=Fill Page imageToPDF.fitDocumentToImage=Fit Page to Image diff --git a/src/main/resources/messages_it_IT.properties b/src/main/resources/messages_it_IT.properties index 8f4c7afc..08a34c63 100644 --- a/src/main/resources/messages_it_IT.properties +++ b/src/main/resources/messages_it_IT.properties @@ -478,6 +478,10 @@ pipeline.title=Pipeline pageLayout.title=Layout multipagina pageLayout.header=Layout multipagina pageLayout.pagesPerSheet=Pagine per foglio: +########################## +### TODO: Translate ### +########################## +pageLayout.addBorder=Add Borders pageLayout.submit=Invia @@ -665,9 +669,6 @@ split.submit=Dividi imageToPDF.title=Immagine a PDF imageToPDF.header=Immagine a PDF imageToPDF.submit=Converti -########################## -### TODO: Translate ### -########################## imageToPDF.selectLabel=Image Fit Options imageToPDF.fillPage=Fill Page imageToPDF.fitDocumentToImage=Fit Page to Image diff --git a/src/main/resources/messages_ja_JP.properties b/src/main/resources/messages_ja_JP.properties index d0a01cc0..2251484f 100644 --- a/src/main/resources/messages_ja_JP.properties +++ b/src/main/resources/messages_ja_JP.properties @@ -478,6 +478,10 @@ pipeline.title=パイプライン pageLayout.title=マルチページレイアウト pageLayout.header=マルチページレイアウト pageLayout.pagesPerSheet=1枚あたりのページ数: +########################## +### TODO: Translate ### +########################## +pageLayout.addBorder=Add Borders pageLayout.submit=送信 @@ -665,9 +669,6 @@ split.submit=分割 imageToPDF.title=画像をPDFに変換 imageToPDF.header=画像をPDFに変換 imageToPDF.submit=変換 -########################## -### TODO: Translate ### -########################## imageToPDF.selectLabel=Image Fit Options imageToPDF.fillPage=Fill Page imageToPDF.fitDocumentToImage=Fit Page to Image diff --git a/src/main/resources/messages_ko_KR.properties b/src/main/resources/messages_ko_KR.properties index 5929d971..b4c2fa36 100644 --- a/src/main/resources/messages_ko_KR.properties +++ b/src/main/resources/messages_ko_KR.properties @@ -478,6 +478,10 @@ pipeline.title=Pipeline pageLayout.title=Multi Page Layout pageLayout.header=Multi Page Layout pageLayout.pagesPerSheet=Pages per sheet: +########################## +### TODO: Translate ### +########################## +pageLayout.addBorder=Add Borders pageLayout.submit=Submit @@ -665,9 +669,6 @@ split.submit=분할 imageToPDF.title=이미지를 PDF로 변환 imageToPDF.header=이미지를 PDF로 변환 imageToPDF.submit=변환하기 -########################## -### TODO: Translate ### -########################## imageToPDF.selectLabel=Image Fit Options imageToPDF.fillPage=Fill Page imageToPDF.fitDocumentToImage=Fit Page to Image diff --git a/src/main/resources/messages_nl_NL.properties b/src/main/resources/messages_nl_NL.properties index 8d7340c8..a13c9071 100644 --- a/src/main/resources/messages_nl_NL.properties +++ b/src/main/resources/messages_nl_NL.properties @@ -478,6 +478,10 @@ pipeline.title=Pijplijn pageLayout.title=Meerdere pagina indeling pageLayout.header=Meerdere pagina indeling pageLayout.pagesPerSheet=Pagina''s per vel: +########################## +### TODO: Translate ### +########################## +pageLayout.addBorder=Add Borders pageLayout.submit=Indienen @@ -665,9 +669,6 @@ split.submit=Splitsen imageToPDF.title=Afbeelding naar PDF imageToPDF.header=Afbeelding naar PDF imageToPDF.submit=Omzetten -########################## -### TODO: Translate ### -########################## imageToPDF.selectLabel=Image Fit Options imageToPDF.fillPage=Fill Page imageToPDF.fitDocumentToImage=Fit Page to Image diff --git a/src/main/resources/messages_pl_PL.properties b/src/main/resources/messages_pl_PL.properties index d3bf7d7c..a2c06fc1 100644 --- a/src/main/resources/messages_pl_PL.properties +++ b/src/main/resources/messages_pl_PL.properties @@ -478,6 +478,10 @@ pipeline.title=Pipeline pageLayout.title=Układ wielu stron pageLayout.header=Układ wielu stron pageLayout.pagesPerSheet=Stron na jednym arkuszu: +########################## +### TODO: Translate ### +########################## +pageLayout.addBorder=Add Borders pageLayout.submit=Wykonaj @@ -665,9 +669,6 @@ split.submit=Podziel imageToPDF.title=Obraz na PDF imageToPDF.header=Obraz na PDF imageToPDF.submit=Konwertuj -########################## -### TODO: Translate ### -########################## imageToPDF.selectLabel=Image Fit Options imageToPDF.fillPage=Fill Page imageToPDF.fitDocumentToImage=Fit Page to Image diff --git a/src/main/resources/messages_pt_BR.properties b/src/main/resources/messages_pt_BR.properties index 2c2f0217..879f3715 100644 --- a/src/main/resources/messages_pt_BR.properties +++ b/src/main/resources/messages_pt_BR.properties @@ -478,6 +478,10 @@ pipeline.title=Pipeline pageLayout.title=Layout de Múltiplas Páginas pageLayout.header=Layout de Múltiplas Páginas pageLayout.pagesPerSheet=Páginas por folha: +########################## +### TODO: Translate ### +########################## +pageLayout.addBorder=Add Borders pageLayout.submit=Enviar @@ -665,9 +669,6 @@ split.submit=Dividir imageToPDF.title=Imagem para PDF imageToPDF.header=Converter Imagem para PDF imageToPDF.submit=Converter -########################## -### TODO: Translate ### -########################## imageToPDF.selectLabel=Image Fit Options imageToPDF.fillPage=Fill Page imageToPDF.fitDocumentToImage=Fit Page to Image diff --git a/src/main/resources/messages_ro_RO.properties b/src/main/resources/messages_ro_RO.properties index f331519a..46dad1ba 100644 --- a/src/main/resources/messages_ro_RO.properties +++ b/src/main/resources/messages_ro_RO.properties @@ -478,6 +478,10 @@ pipeline.title=Pipeline pageLayout.title=Multi Page Layout pageLayout.header=Multi Page Layout pageLayout.pagesPerSheet=Pages per sheet: +########################## +### TODO: Translate ### +########################## +pageLayout.addBorder=Add Borders pageLayout.submit=Submit @@ -665,9 +669,6 @@ split.submit=Împarte imageToPDF.title=Imagine în PDF imageToPDF.header=Imagine în PDF imageToPDF.submit=Convertă -########################## -### TODO: Translate ### -########################## imageToPDF.selectLabel=Image Fit Options imageToPDF.fillPage=Fill Page imageToPDF.fitDocumentToImage=Fit Page to Image diff --git a/src/main/resources/messages_ru_RU.properties b/src/main/resources/messages_ru_RU.properties index 74bb5a68..065106df 100644 --- a/src/main/resources/messages_ru_RU.properties +++ b/src/main/resources/messages_ru_RU.properties @@ -478,6 +478,10 @@ pipeline.title=Pipeline pageLayout.title=Multi Page Layout pageLayout.header=Multi Page Layout pageLayout.pagesPerSheet=Pages per sheet: +########################## +### TODO: Translate ### +########################## +pageLayout.addBorder=Add Borders pageLayout.submit=Submit @@ -665,9 +669,6 @@ split.submit=Разделить imageToPDF.title=Изображение в PDF imageToPDF.header=Изображение в PDF imageToPDF.submit=Конвертировать -########################## -### TODO: Translate ### -########################## imageToPDF.selectLabel=Image Fit Options imageToPDF.fillPage=Fill Page imageToPDF.fitDocumentToImage=Fit Page to Image diff --git a/src/main/resources/messages_sv_SE.properties b/src/main/resources/messages_sv_SE.properties index b1b63ded..e2fc2eb8 100644 --- a/src/main/resources/messages_sv_SE.properties +++ b/src/main/resources/messages_sv_SE.properties @@ -478,6 +478,10 @@ pipeline.title=Pipeline pageLayout.title=Multi Page Layout pageLayout.header=Multi Page Layout pageLayout.pagesPerSheet=Pages per sheet: +########################## +### TODO: Translate ### +########################## +pageLayout.addBorder=Add Borders pageLayout.submit=Submit @@ -665,9 +669,6 @@ split.submit=Dela imageToPDF.title=Bild till PDF imageToPDF.header=Bild till PDF imageToPDF.submit=Konvertera -########################## -### TODO: Translate ### -########################## imageToPDF.selectLabel=Image Fit Options imageToPDF.fillPage=Fill Page imageToPDF.fitDocumentToImage=Fit Page to Image diff --git a/src/main/resources/messages_zh_CN.properties b/src/main/resources/messages_zh_CN.properties index ddf8639a..bf6aede0 100644 --- a/src/main/resources/messages_zh_CN.properties +++ b/src/main/resources/messages_zh_CN.properties @@ -478,6 +478,10 @@ pipeline.title=Pipeline pageLayout.title=Multi Page Layout pageLayout.header=Multi Page Layout pageLayout.pagesPerSheet=Pages per sheet: +########################## +### TODO: Translate ### +########################## +pageLayout.addBorder=Add Borders pageLayout.submit=Submit @@ -665,9 +669,6 @@ split.submit=拆分 imageToPDF.title=图片转PDF imageToPDF.header=图像转为PDF imageToPDF.submit=转换 -########################## -### TODO: Translate ### -########################## imageToPDF.selectLabel=Image Fit Options imageToPDF.fillPage=Fill Page imageToPDF.fitDocumentToImage=Fit Page to Image diff --git a/src/main/resources/templates/multi-page-layout.html b/src/main/resources/templates/multi-page-layout.html index 6b1de771..35cfd50f 100644 --- a/src/main/resources/templates/multi-page-layout.html +++ b/src/main/resources/templates/multi-page-layout.html @@ -26,6 +26,10 @@
    +
    + + +
    From e32c092af893c4a6443a3aa7c1675c49dc03aea1 Mon Sep 17 00:00:00 2001 From: IT Creativity + Art Team Date: Sun, 1 Oct 2023 15:56:22 +0300 Subject: [PATCH 30/57] BG lang support Hello Team, This is the Bulgarian Translation for Stirling-PDF. Thank you. --- src/main/resources/messages_bg_BG.properties | 817 +++++++++++++++++++ 1 file changed, 817 insertions(+) create mode 100644 src/main/resources/messages_bg_BG.properties diff --git a/src/main/resources/messages_bg_BG.properties b/src/main/resources/messages_bg_BG.properties new file mode 100644 index 00000000..90db3fca --- /dev/null +++ b/src/main/resources/messages_bg_BG.properties @@ -0,0 +1,817 @@ +########### +# Generic # +########### +# the direction that the language is written (ltr = left to right, rtl = right to left) +language.direction=ltr + +pdfPrompt=Изберете PDF(и) +multiPdfPrompt=Изберете PDF (2+) +multiPdfDropPrompt=Изберете (или плъзнете и пуснете) всички PDF файлове, от които се нуждаете +imgPrompt=Изберете изображение(я) +genericSubmit=Подайте +processTimeWarning=Предупреждение: Този процес може да отнеме до минута в зависимост от размера на файла +pageOrderPrompt=Персонализиран ред на страниците (Въведете разделен със запетаи списък с номера на страници или функции като 2n+1): +goToPage=Давай +true=Вярно +false=Невярно +unknown=Непознат +save=Съхранете +close=Затворете +filesSelected=избрани файлове +noFavourites=Няма добавени любими +bored=Отекчени сте да чакате? +alphabet=Азбука +downloadPdf=Изтеглете PDF +text=Текст +font=Шрифт +selectFillter=-- Изберете -- +pageNum=Брой страница +sizes.small=Малък +sizes.medium=Среден +sizes.large=Голям +sizes.x-large=X-Голям +error.pdfPassword=PDF документът е с парола и или паролата не е предоставена, или е неправилна +delete=Изтрий +username=Потребителско име +password=Парола +welcome=Добре дошли +property=Свойство +black=Черно +white=Бяло +red=Червено +green=Зелено +blue=Синьо +custom=Персонализиране... + +changedCredsMessage=Идентификационните данни са променени! +notAuthenticatedMessage=Потребителят не е автентикиран. +userNotFoundMessage=Потребителят не е намерен +incorrectPasswordMessage=Текущата парола е неправилна. +usernameExistsMessage=Новият потребител вече съществува. + + + +############# +# NAVBAR # +############# +navbar.convert=Преобразуване +navbar.security=Сигурност +navbar.other=Разни +navbar.darkmode=Тъмна тема +navbar.pageOps=Операции със страници +navbar.settings=Настройки + +############# +# SETTINGS # +############# +settings.title=Настройки +settings.update=Налична актуализация +settings.appVersion=Версия на приложението: +settings.downloadOption.title=Изберете опция за изтегляне (за изтегляния на един файл без да е архивиран): +settings.downloadOption.1=Отваряне в същия прозорец +settings.downloadOption.2=Отваряне в нов прозорец +settings.downloadOption.3=Изтегли файл +settings.zipThreshold=Архивирайте файловете, когато броят на изтеглените файлове надвишава +settings.signOut=Изход +settings.accountSettings=Настройки на акаунта + + + +changeCreds.title=Промяна на идентификационните данни +changeCreds.header=Актуализирайте данните за акаунта си +changeCreds.changeUserAndPassword=Използвате идентификационни данни за вход по подразбиране. Моля, въведете нова парола (и потребителско име, ако искате) +changeCreds.newUsername=Ново потребителско име +changeCreds.oldPassword=Текуща парола +changeCreds.newPassword=Нова парола +changeCreds.confirmNewPassword=Подтвърдете новата парола +changeCreds.submit=Изпращане на промените + + + +account.title=Настройки на акаунта +account.accountSettings=Настройки на акаунта +account.adminSettings=Настройки на администратора - Преглед и добавяне на потребители +account.userControlSettings=Настройки за потребителски контрол +account.changeUsername=Нов потребител +account.changeUsername=Промени потребител +account.password=Парола за потвърждение +account.oldPassword=Стара парола +account.newPassword=Нова парола +account.changePassword=Промени паролата +account.confirmNewPassword=Потвърдете новата парола +account.signOut=Изход +account.yourApiKey=Вашият API ключ +account.syncTitle=Синхронизиране на настройките на браузъра с акаунта +account.settingsCompare=Сравняване на настройките: +account.property=Свойство +account.webBrowserSettings=Уеб-браузър настройки +account.syncToBrowser=Синхронизиране на акаунт -> Бразър +account.syncToAccount=Синхронизиране на акаунт <- Бразър + + +adminUserSettings.title=Настройки за потребителски контрол +adminUserSettings.header=Настройки за администраторски потребителски контрол +adminUserSettings.admin=Администратор +adminUserSettings.user=Потребител +adminUserSettings.addUser=Добавяне на нов потребител +adminUserSettings.roles=Роли +adminUserSettings.role=Роля +adminUserSettings.actions=Действия +adminUserSettings.apiUser=Ограничен API потребител +adminUserSettings.webOnlyUser=Само за уеб-потребител +adminUserSettings.forceChange = Принудете потребителя да промени потребителското име/парола при влизане +adminUserSettings.submit=Съхранете потребителя + +############# +# HOME-PAGE # +############# +home.desc=Вашето локално хоствано обслужване на едно място за всички ваши PDF нужди. + + +home.multiTool.title=PDF Мулти инструмент +home.multiTool.desc=Обединяване, завъртане, пренареждане и премахване на страници +multiTool.tags=Мултиинструмент,Мулти операции,UI,плъзгане с щракване,потребителска част,страна на клиента,интерактивен,неразрешим,преместване + +home.merge.title=Обединяване +home.merge.desc=Лесно обединете множество PDF файлове в един. +merge.tags=сливане,операции на страници,администраторска зона,от страна на сървъра + +home.split.title=Разделяне +home.split.desc=Разделяне на PDF файлове на множество документи +split.tags=Операции на страницата,разделяне,Множество страници,изрязване,сървърна страна + +home.rotate.title=Завъртане +home.rotate.desc=Лесно завъртете вашите PDF файлове. +rotate.tags=от страната на сървъра + + +home.imageToPdf.title=Изображение към PDF +home.imageToPdf.desc=Преобразуване на изображение (PNG, JPEG, GIF) към PDF. +imageToPdf.tags=преобразуване,img,jpg,изображение,снимка + +home.pdfToImage.title=PDF към изображение +home.pdfToImage.desc=Преобразуване на PDF към изображение. (PNG, JPEG, GIF) +pdfToImage.tags=преобразуване,img,jpg,изображение,снимка + +home.pdfOrganiser.title=Организиране +home.pdfOrganiser.desc=Премахване/пренареждане на страници към произволен ред +pdfOrganiser.tags=дуплекс,четно,нечетно,сортиране,преместване + + +home.addImage.title=Добавяне на изображение +home.addImage.desc=Добавя изображение към зададено място към PDF файла +addImage.tags=img,jpg,изображение,снимка + +home.watermark.title=Добавяне на воден знак +home.watermark.desc=Добавете персонализиран воден знак към вашия PDF документ. +watermark.tags=Текст,повтарящ се,етикет,собствено,авторско право,търговска марка,img,jpg,изображение,снимка + +home.permissions.title=Промяна на правата +home.permissions.desc=Променете правата на вашия PDF документ +permissions.tags=четене,писане,редактиране,печат + + +home.removePages.title=Премахване +home.removePages.desc=Изтрийте нежеланите страници от вашия PDF документ. +removePages.tags=Премахване на страници,изтриване на страници + +home.addPassword.title=Добавете парола +home.addPassword.desc=Шифровайте вашия PDF документ с парола. +addPassword.tags=сигурен,сигурност + +home.removePassword.title=Премахване на парола +home.removePassword.desc=Премахнете защитата с парола от вашия PDF документ. +removePassword.tags=сигурно,декриптиране,сигурност,отмяна на парола,изтриване на парола + +home.compressPdfs.title=Компресиране +home.compressPdfs.desc=Компресирайте PDF файлове, за да намалите размера на файла. +compressPdfs.tags=мачкам,малък,мъничък + + +home.changeMetadata.title=Промяна на метаданни +home.changeMetadata.desc=Промяна/Премахване/Добавяне на метаданни от PDF документ +changeMetadata.tags=Заглавие,автор,дата,създаване,час,издател,продуцент,статистика + +home.fileToPDF.title=Преобразуване на файл към PDF +home.fileToPDF.desc=Преобразуване почти всеки файл към PDF (DOCX, PNG, XLS, PPT, TXT и други) +fileToPDF.tags=трансформация,формат,документ,изображение,слайд,текст,преобразуване,офис,документи,word,excel,powerpoint + +home.ocr.title=OCR / Почистващи сканирания +home.ocr.desc=Cleanup сканира и открива текст от изображения към PDF и го добавя отново като текст. +ocr.tags=разпознаване,текст,изображение,сканиране,четене,идентифициране,откриване,редактиране + + +home.extractImages.title=Извличане на изображения +home.extractImages.desc=Извлича всички изображения от PDF и ги записва към архив +extractImages.tags=изображение,снимка,запазване,архивиране,архив,заснемане,грабване + +home.pdfToPDFA.title=PDF към PDF/A +home.pdfToPDFA.desc=Конвертирайте PDF към PDF/A за дългосрочно съхранение +pdfToPDFA.tags=архив,дълготраен,стандартен,преобразуване,съхранение,консервиране + +home.PDFToWord.title=PDF към Word +home.PDFToWord.desc=Преобразуване на PDF към Word формати (DOC, DOCX и ODT) +PDFToWord.tags=doc,docx,odt,word,трансформация,формат,преобразуване,офис,microsoft,docfile + +home.PDFToPresentation.title=PDF към презентация +home.PDFToPresentation.desc=Преобразуване на PDF във формати за презентация (PPT, PPTX и ODP) +PDFToPresentation.tags=слайдове,покажи,офис,microsoft + +home.PDFToText.title=PDF към RTF (Текст) +home.PDFToText.desc=Преобразуване PDF към Text или RTF формат +PDFToText.tags=richformat,richtextformat,богат текстов формат + +home.PDFToHTML.title=PDF към HTML +home.PDFToHTML.desc=Преобразуване PDF към HTML формат +PDFToHTML.tags=уеб-съдържание,удобен за браузър + + +home.PDFToXML.title=PDF към XML +home.PDFToXML.desc=Преобразуване на PDF към XML формат +PDFToXML.tags=извличане на данни,структурирано съдържание,взаимодействие,трансформация,преобразуване + +home.ScannerImageSplit.title=Откриване/Разделяне на сканирани снимки +home.ScannerImageSplit.desc=Разделя множество снимки от една снимка/PDF +ScannerImageSplit.tags=разделяне,автоматично откриване,сканиране,много снимки,организиране + +home.sign.title=Подпишете +home.sign.desc=Добавя подпис към PDF чрез рисунка, текст или изображение +sign.tags=упълномощаване,инициали,нарисуван-подпис,текстов-знак,изображение-подпис + +home.flatten.title=Изравняване +home.flatten.desc=Премахнете всички интерактивни елементи и формуляри от PDF +flatten.tags=статичен,деактивиран,неинтерактивен,рационализиран + +home.repair.title=Поправи +home.repair.desc=Опитва се да поправи повреден/счупен PDF +repair.tags=поправка,възстановяване,корекция,възстановяване + +home.removeBlanks.title=Премахване на празни страници +home.removeBlanks.desc=Открива и премахва празни страници от документ +removeBlanks.tags=почистване,рационализиране,без съдържание,организиране + +home.compare.title=Сравнете +home.compare.desc=Сравнява и показва разликите между 2 PDF документа +compare.tags=разграничаване,контраст,промени,анализ + +home.certSign.title=Подпишете със сертификат +home.certSign.desc=Подписва PDF със сертификат/ключ (PEM/P12) +certSign.tags=удостоверяване,PEM,P12,официален,шифроване + +home.pageLayout.title=Оформление с няколко страници +home.pageLayout.desc=Слейте няколко страници от PDF документ в една страница +pageLayout.tags=сливане,комбиниран,единичен изглед,организиране + +home.scalePages.title=Коригирайте размера/мащаба на страницата +home.scalePages.desc=Промяна на размера/мащаба на страница и/или нейното съдържание. +scalePages.tags=преоразмеряване,промяна,размер,адаптиране + +home.pipeline.title=Pipeline (Разширено) +home.pipeline.desc=Изпълнявайте множество действия върху PDF файлове чрез дефиниране на конвейерни скриптове +pipeline.tags=автоматизиране,последователност,чрез скриптове,пакетен процес + +home.add-page-numbers.title=Добавяне на номера на страници +home.add-page-numbers.desc=Добавете номера на страници в документ на определено място +add-page-numbers.tags=страничен, етикетиране, организиране, индексиране + +home.auto-rename.title=Автоматично преименуване на PDF файл +home.auto-rename.desc=Автоматично преименува PDF файл въз основа на откритата му заглавка +auto-rename.tags=автоматично откриване,базирано на заглавка,организиране,преетикетиране + +home.adjust-contrast.title=Коригиране на цветове/контраст +home.adjust-contrast.desc=Коригиране на контраста, наситеността и яркостта на PDF +adjust-contrast.tags=корекция на цвета,настройте,модифицирайте,подобрете + +home.crop.title=Изрязване на PDF +home.crop.desc=Изрежете PDF, за да намалите размера му (поддържа текст!) +crop.tags=изрязване,свиване,редактиране,оформяне + +home.autoSplitPDF.title=Автоматично разделяне на страници +home.autoSplitPDF.desc=Автоматично разделяне на сканиран PDF файл с QR код за разделяне на физически сканирани страници +autoSplitPDF.tags=QR-базиран,отделен,сканиране-сегмент,организиране + +home.sanitizePdf.title=Дезинфекцирай +home.sanitizePdf.desc=Премахване на скриптове и други елементи от PDF файлове +sanitizePdf.tags=чисти,сигурни,безопасни,премахване-заплахи + +home.URLToPDF.title=URL/уеб-сайт към PDF +home.URLToPDF.desc=Преобразува всеки http(s) URL към PDF +URLToPDF.tags=уеб-заснемане,запазване на страница,уеб към документ,архив + +home.HTMLToPDF.title=HTML към PDF +home.HTMLToPDF.desc=Преобразува всеки HTML файл или архив към PDF +HTMLToPDF.tags=маркиране,уеб-съдържание,трансформация,преобразуване + + +home.MarkdownToPDF.title=Markdown към PDF +home.MarkdownToPDF.desc=Преобразува всеки Markdown файл към PDF +MarkdownToPDF.tags=маркиране,уеб-съдържание,трансформация,преобразуване + + +home.getPdfInfo.title=Вземете ЦЯЛАТА информация към PDF +home.getPdfInfo.desc=Взема всяка възможна информация от PDF файлове +getPdfInfo.tags=информация,данни,статистики,статистика + + +home.extractPage.title=Извличане на страница(и) +home.extractPage.desc=Извлича избрани страници от PDF +extractPage.tags=извличане + + +home.PdfToSinglePage.title=PDF към една голяма страница +home.PdfToSinglePage.desc=Обединява всички PDF страници в една голяма страница +PdfToSinglePage.tags=единична страница + + +home.showJS.title=Показване на Javascript +home.showJS.desc=Търси и показва всеки JS, инжектиран в PDF +showJS.tags=JS + +home.autoRedact.title=Автоматично редактиране +home.autoRedact.desc=Автоматично редактира (зачернява) текст в PDF въз основа на въведен текст +showJS.tags=Редактиране,Скриване,затъмняване,черен,маркер,скрит + +########################### +# # +# WEB PAGES # +# # +########################### +#login +login.title=Вход +login.signin=Впишете се +login.rememberme=Запомни ме +login.invalid=Невалидно потребителско име или парола. +login.locked=Вашият акаунт е заключен. +login.signinTitle=Моля впишете се + + +#auto-redact +autoRedact.title=Автоматично редактиране +autoRedact.header=Автоматично редактиране +autoRedact.colorLabel=Цвят +autoRedact.textsToRedactLabel=Текст за редактиране (разделен с редове) +autoRedact.textsToRedactPlaceholder=например: \nПоверително \nСтрого секретно +autoRedact.useRegexLabel=Използване на Regex +autoRedact.wholeWordSearchLabel=Търсене на цялата дума +autoRedact.customPaddingLabel=Персонализирана допълнителна подложка +autoRedact.convertPDFToImageLabel=Преобразуване на PDF към PDF-изображение (използва се за премахване на текст зад полето) +autoRedact.submitButton=Изпращане + + +#showJS +showJS.title=Покажи Javascript +showJS.header=Покажи Javascript +showJS.downloadJS=Изтегли Javascript +showJS.submit=Покажи + + +#pdfToSinglePage +pdfToSinglePage.title=PDF към единична страница +pdfToSinglePage.header=PDF към единична страница +pdfToSinglePage.submit=Преобразуване към единична страница + + +#pageExtracter +pageExtrater.title=Извличане на страници +pageExtrater.header=Извличане на страници +pageExtrater.submit=Извличане + + +#getPdfInfo +getPdfInfo.title=Вземете информация за PDF +getPdfInfo.header=Вземете информация за PDF +getPdfInfo.submit=Вземете информация +getPdfInfo.downloadJson=Изтеглете JSON + + +#markdown-to-pdf +MarkdownToPDF.title=Markdown към PDF +MarkdownToPDF.header=Markdown към PDF +MarkdownToPDF.submit=Преобразуване +MarkdownToPDF.help=Работата е в ход +MarkdownToPDF.credit=Използва WeasyPrint + + + +#url-to-pdf +URLToPDF.title=URL към PDF +URLToPDF.header=URL към PDF +URLToPDF.submit=Преобразуване +URLToPDF.credit=Използва WeasyPrint + + +#html-to-pdf +HTMLToPDF.title=HTML към PDF +HTMLToPDF.header=HTML към PDF +HTMLToPDF.help=Приема HTML файлове и ZIP файлове, съдържащи html/css/изображения и т.н +HTMLToPDF.submit=Преобразуване +HTMLToPDF.credit=Използва WeasyPrint + + +#sanitizePDF +sanitizePDF.title=Дезинфектирай PDF +sanitizePDF.header=Дезинфектира PDF файл +sanitizePDF.selectText.1=Премахва JavaScript действия +sanitizePDF.selectText.2=Премахва вградени файлове +sanitizePDF.selectText.3=Премахва метаданни +sanitizePDF.selectText.4=Премахва линкове +sanitizePDF.selectText.5=Премахва шрифтове +sanitizePDF.submit=Дезинфектирай PDF + + +#addPageNumbers +addPageNumbers.title=Добавяне на номера на страници +addPageNumbers.header=Добавяне на номера на страници +addPageNumbers.selectText.1=Изберете PDF файл: +addPageNumbers.selectText.2=Размер на полето +addPageNumbers.selectText.3=Позиция +addPageNumbers.selectText.4=Начален номер +addPageNumbers.selectText.5=Страници към номер +addPageNumbers.selectText.6=Персонализиран текст +addPageNumbers.customTextDesc=Персонализиран текст +addPageNumbers.numberPagesDesc=Кои страници да номерирате, по подразбиране 'всички', също приема 1-5 или 2,5,9 и т.н. +addPageNumbers.customNumberDesc=По подразбиране е {n}, също приема 'Страница {n} от {total}', 'Текст-{n}', '{filename}-{n} +addPageNumbers.submit=Добавяне на номера на страници + + +#auto-rename +auto-rename.title=Автоматично преименуване +auto-rename.header=Автоматично преименуване на PDF +auto-rename.submit=Автоматично преименуване + + +#adjustContrast +adjustContrast.title=Настройка на контраста +adjustContrast.header=Коригиране на контраста +adjustContrast.contrast=Контраст: +adjustContrast.brightness=Яркост: +adjustContrast.saturation=Наситеност: +adjustContrast.download=Изтегли + + +#crop +crop.title=Изрязване +crop.header=Изрязване на изображение +crop.submit=Подайте + + +#autoSplitPDF +autoSplitPDF.title=Автоматично разделяне на PDF +autoSplitPDF.header=Автоматично разделяне на PDF +autoSplitPDF.description=Печатайте, вмъквайте, сканирайте, качвайте и ни позволете да разделим автоматично вашите документи. Не е необходимо ръчно сортиране. +autoSplitPDF.selectText.1=Отпечатайте някои разделителни листове отдолу (Черно-бялото е добре). +autoSplitPDF.selectText.2=Сканирайте всичките си документи наведнъж, като поставите разделителния лист между тях. +autoSplitPDF.selectText.3=Качете единствения голям сканиран PDF файл и оставете Stirling PDF да се справи с останалото. +autoSplitPDF.selectText.4=Разделителните страници се откриват и премахват автоматично, което гарантира чист краен документ. +autoSplitPDF.formPrompt=Изпратете PDF, съдържащ разделители на страници на Stirling-PDF: +autoSplitPDF.duplexMode=Дуплексен режим (сканиране отпред и отзад) +autoSplitPDF.dividerDownload1=Изтеглете 'Автоматичен сплитер разделител (минимален).pdf' +autoSplitPDF.dividerDownload2=Изтеглете 'Автоматичен сплитер разделител (с инструкции).pdf' +autoSplitPDF.submit=Подайте + + +#pipeline +pipeline.title=Pipeline + + +#pageLayout +pageLayout.title=Многостранично оформление +pageLayout.header=Оформление на няколко страници +pageLayout.pagesPerSheet=Страници на лист: +pageLayout.addBorder=Добавяне на граници +pageLayout.submit=Подайте + + +#scalePages +scalePages.title=Коригиране на мащаба на страницата +scalePages.header=Коригиране на мащаба на страницата +scalePages.pageSize=Размер на страница от документа. +scalePages.scaleFactor=Ниво на мащабиране (изрязване) на страница. +scalePages.submit=Подайте + + +#certSign +certSign.title=Подписване на сертификат +certSign.header=Подпишете PDF с вашия сертификат (В процес на работа) +certSign.selectPDF=Изберете PDF файл за подписване: +certSign.selectKey=Изберете вашия файл с личен ключ (формат PKCS#8, може да бъде .pem или .der): +certSign.selectCert=Изберете вашия файл със сертификат (формат X.509, може да бъде .pem или .der): +certSign.selectP12=Изберете вашия PKCS#12 Keystore файл (.p12 или .pfx) (По избор, ако е предоставен, трябва да съдържа вашия личен ключ и сертификат): +certSign.certType=Тип сертификат +certSign.password=Въведете вашата парола за Keystore за ключове или частен ключ (ако има): +certSign.showSig=Показване на подпис +certSign.reason=Причина +certSign.location=Местоположение +certSign.name=Име +certSign.submit=Подпишете PDF + + +#removeBlanks +removeBlanks.title=Премахване на празни места +removeBlanks.header=Премахване на празни страници +removeBlanks.threshold=Праг на белота на пикселите: +removeBlanks.thresholdDesc=Праг за определяне колко бял трябва да бъде един бял пиксел, за да бъде класифициран като 'бял'. 0 = черно, 255 чисто бяло. +removeBlanks.whitePercent=Процент бяло (%): +removeBlanks.whitePercentDesc=Процент от страницата, която трябва да бъде в 'бели' пиксели, които да бъдат премахнати +removeBlanks.submit=Премахване на празни места + + +#compare +compare.title=Сравнявай +compare.header=Сравнявай PDF-и +compare.document.1=Документ 1 +compare.document.2=Документ 2 +compare.submit=Сравнявай + + +#sign +sign.title=Подпишете +sign.header=Подпишете PDF-и +sign.upload=Качи изображение +sign.draw=Начертайте подпис +sign.text=Въвеждане на текст +sign.clear=Изчисти +sign.add=Добави + + +#repair +repair.title=Поправи +repair.header=Поправи PDF-и +repair.submit=Поправи + + +#flatten +flatten.title=Изравнете +flatten.header=Изравнете PDF-и +flatten.submit=Изравнете + + +#ScannerImageSplit +ScannerImageSplit.selectText.1=Праг на ъгъла: +ScannerImageSplit.selectText.2=Задава минималния абсолютен ъгъл, необходим за завъртане на изображението (по подразбиране: 10). +ScannerImageSplit.selectText.3=Толеранс: +ScannerImageSplit.selectText.4=Определя обхвата на цветовата вариация около предполагаемия фонов цвят (по подразбиране: 30). +ScannerImageSplit.selectText.5=Минимална площ: +ScannerImageSplit.selectText.6=Задава минималния праг на площ за изображение (по подразбиране: 10000). +ScannerImageSplit.selectText.7=Минимална контурна площ: +ScannerImageSplit.selectText.8=Задава минималния праг на контурната площ за изображение +ScannerImageSplit.selectText.9=Размер на рамката: +ScannerImageSplit.selectText.10=Задава размера на добавената и премахната граница, за да предотврати бели граници към изхода (по подразбиране: 1). + + +#OCR +ocr.title=OCR / Почистване на сканиране +ocr.header=Почистващи сканирания / OCR (оптично разпознаване на знаци) +ocr.selectText.1=Изберете езици, които да бъдат открити в рамките на PDF (изброените са откритите към момента): +ocr.selectText.2=Създаване на текстов файл, съдържащ OCR текст заедно с OCR PDF +ocr.selectText.3=Правилните страници бяха сканирани под изкривен ъгъл чрез завъртането им обратно на мястото им +ocr.selectText.4=Чиста страница, така че е по-малко вероятно OCR да намери текст във фонов шум. (Без промяна на изхода) +ocr.selectText.5=Чиста страница, така че е по-малко вероятно OCR да намери текст във фонов шум, поддържа почистване към изхода. +ocr.selectText.6=Игнорира страници, които имат интерактивен текст, само OCR страници, които са изображения +ocr.selectText.7=Принудително OCR, ще премахва чрез OCR на всяка страница всички оригинални текстови елементи +ocr.selectText.8=Нормално (Ще има грешка, ако PDF съдържа текст) +ocr.selectText.9=Допълнителни настройки +ocr.selectText.10=OCR режим +ocr.selectText.11=Премахване на изображения след OCR (Премахва ВСИЧКИ изображения, полезно само ако е част от стъпката на преобразуване) +ocr.selectText.12=Тип изобразяване (Разширен) +ocr.help=Моля, прочетете тази документация за това как да използвате това за други езици и/или да не използвате в docker +ocr.credit=Тази услуга използва OCRmyPDF и Tesseract за OCR. +ocr.submit=Обработка на PDF чрез OCR + + +#extractImages +extractImages.title=Извличане на изображения +extractImages.header=Извличане на изображения +extractImages.selectText=Изберете формат на изображението, в който да преобразувате извлечените изображения +extractImages.submit=Извличане + + +#File to PDF +fileToPDF.title=Файл към PDF +fileToPDF.header=Конвертирайте всеки файл към PDF +fileToPDF.credit=Тази услуга използва LibreOffice и Unoconv за преобразуване на файлове. +fileToPDF.supportedFileTypes=Поддържаните типове файлове трябва да включват по-долу, но за пълен актуализиран списък на поддържаните формати, моля, вижте документацията на LibreOffice +fileToPDF.submit=Преобразуване към PDF + + +#compress +compress.title=Компресиране +compress.header=Компресиране на PDF +compress.credit=Тази услуга използва Ghostscript за PDF компресиране/оптимизиране. +compress.selectText.1=Ръчен режим - От 1 до 4 +compress.selectText.2=Ниво на оптимизация: +compress.selectText.3=4 (Ужасно за текстови изображения) +compress.selectText.4=Автоматичен режим - Автоматично настройва качеството, за да получи PDF точен размер +compress.selectText.5=Очакван PDF размер (напр. 25MB, 10.8MB, 25KB) +compress.submit=Компресиране + + +#Add image +addImage.title=Добавяне на изображение +addImage.header=Добавяне на изображение към PDF +addImage.everyPage=Всяка страница? +addImage.upload=Добавяне на изображение +addImage.submit=Добавяне на изображение + + +#merge +merge.title=Обединяване +merge.header=Обединяване на множество PDF файлове (2+) +merge.sortByName=Сортиране по име +merge.sortByDate=Сортиране по дата +merge.submit=Обединяване + + +#pdfOrganiser +pdfOrganiser.title=Организатор на страници +pdfOrganiser.header=Организатор на PDF страници +pdfOrganiser.submit=Пренареждане на страниците + + +#multiTool +multiTool.title=PDF Мулти инструмент +multiTool.header=PDF Мулти инструмент + + +#pageRemover +pageRemover.title=Премахване на страници +pageRemover.header=Премахване на PDF страници +pageRemover.pagesToDelete=Страници за изтриване (Въведете списък с номера на страници, разделени със запетая) : +pageRemover.submit=Изтриване на страници + + +#rotate +rotate.title=Завъртане на PDF +rotate.header=Завъртане на PDF +rotate.selectAngle=Изберете ъгъл на въртене (кратно на 90 градуса): +rotate.submit=Завъртане + + +#merge +split.title=Разделяне на PDF +split.header=Разделяне на PDF +split.desc.1=Числата, които избирате, са номера на страницата, на която искате да направите разделяне +split.desc.2=Така че избирането на 1,3,7-8 ще раздели документ от 10 страници на 6 отделни PDF файла с: +split.desc.3=Документ #1: Страница 1 +split.desc.4=Документ #2: Страница 2 и 3 +split.desc.5=Документ #3: Страница 4, 5 и 6 +split.desc.6=Документ #4: Страница 7 +split.desc.7=Документ #5: Страница 8 +split.desc.8=Документ #6: Страница 9 и 10 +split.splitPages=Въведете страници за разделяне: +split.submit=Разделяне + + +#merge +imageToPDF.title=Изображение към PDF +imageToPDF.header=Изображение към PDF +imageToPDF.submit=Преобразуване +imageToPDF.selectLabel=Опции за прилягане на изображението +imageToPDF.fillPage=Попълване на страница +imageToPDF.fitDocumentToImage=Побиране на страницата в изображението +imageToPDF.maintainAspectRatio=Поддържане на пропорции +imageToPDF.selectText.2=Автоматично завъртане на PDF +imageToPDF.selectText.3=Файлова логика с много (Активирано само ако работите с множество изображения) +imageToPDF.selectText.4=Сливане към един PDF +imageToPDF.selectText.5=Преобразуване към отделни PDF файлове + + +#pdfToImage +pdfToImage.title=PDF към Изображение +pdfToImage.header=PDF към Изображение +pdfToImage.selectText=Формат на изображението +pdfToImage.singleOrMultiple=Тип резултат от страница към изображение +pdfToImage.single=Единично голямо изображение комбиниране на всички страници +pdfToImage.multi=Множество изображения, по едно изображение на страница +pdfToImage.colorType=Тип цвят +pdfToImage.color=Цвят +pdfToImage.grey=Скала на сивото +pdfToImage.blackwhite=Черно и бяло (може да загубите данни!) +pdfToImage.submit=Преобразуване + + +#addPassword +addPassword.title=Добавяне на парола +addPassword.header=Добавяне на парола (Шифроване) +addPassword.selectText.1=Изберете PDF, който да шифровате +addPassword.selectText.2=Потребителска парола +addPassword.selectText.3=Предотвратяване на сглобяването на документ +addPassword.selectText.4=По-високите стойности са по-силни, но по-ниските стойности имат по-добра съвместимост. +addPassword.selectText.5=Разрешения за задаване (препоръчва се да се използва заедно с паролата на собственика) +addPassword.selectText.6=Предотвратяване на сглобяването на документ +addPassword.selectText.7=Предотвратете извличането на съдържание +addPassword.selectText.8=Предотвратете извличането за достъпност +addPassword.selectText.9=Предотвратяване на попълване на формуляр +addPassword.selectText.10=Предотвратяване на промени +addPassword.selectText.11=Предотвратяване на промени на анотация +addPassword.selectText.12=Предотвратяване на печат +addPassword.selectText.13=Предотвратете отпечатването в различни формати +addPassword.selectText.14=Парола на собственика +addPassword.selectText.15=Ограничава какво може да се прави с документа, след като бъде отворен (не се поддържа от всички четци) +addPassword.selectText.16=Ограничава отварянето на самия документ +addPassword.submit=Шифроване + + +#watermark +watermark.title=Добавяне на воден знак +watermark.header=Добавяне на воден знак +watermark.selectText.1=Изберете PDF, към който да добавите воден знак: +watermark.selectText.2=Текст на воден знак: +watermark.selectText.3=Размер на шрифта: +watermark.selectText.4=Завъртане (0-360): +watermark.selectText.5=ширинаSpacer (Разстояние между всеки воден знак хоризонтално): +watermark.selectText.6=дължинаSpacer (Разстояние между всеки воден знак вертикално): +watermark.selectText.7=Непрозрачност (0% - 100%): +watermark.selectText.8=Тип воден знак: +watermark.selectText.9=Изображение за воден знак: +watermark.submit=Добавяне на воден знак + + +#Change permissions +permissions.title=Промяна на правата +permissions.header=Промени правата +permissions.warning=Предупреждение, че тези разрешения са непроменими, препоръчва се да ги зададете с парола чрез страницата за добавяне на парола +permissions.selectText.1=Изберете PDF, за да промените правата +permissions.selectText.2=Разрешения за задаване +permissions.selectText.3=Предотвратяване на сглобяването на документ +permissions.selectText.4=Предотвратете извличането на съдържание +permissions.selectText.5=Предотвратете извличането за достъпност +permissions.selectText.6=Предотвратяване на попълване на формуляр +permissions.selectText.7=Предотвратяване на модификация +permissions.selectText.8=Предотвратяване на модификация на анотация +permissions.selectText.9=Предотвратявам на отпечатването +permissions.selectText.10=Предотвратете отпечатването на различни формати +permissions.submit=Промени + + +#remove password +removePassword.title=Премахване на паролата +removePassword.header=Премахване на паролата (Декриптиране) +removePassword.selectText.1=Изберете PDF за Декриптиране +removePassword.selectText.2=Парола +removePassword.submit=Премахване + + +#changeMetadata +changeMetadata.title=Промени метаданните +changeMetadata.header=Промени метаданните +changeMetadata.selectText.1=Моля, редактирайте променливите, които искате да промените +changeMetadata.selectText.2=Изтрий всички метаданни +changeMetadata.selectText.3=Покажи персонализирани метаданни: +changeMetadata.author=Автор: +changeMetadata.creationDate=Дата на създаване (гггг/ММ/дд ЧЧ:мм:сс): +changeMetadata.creator=Създател: +changeMetadata.keywords=Ключови думи: +changeMetadata.modDate=Дата на промяна (гггг/ММ/дд ЧЧ:мм:сс): +changeMetadata.producer=Продуцент: +changeMetadata.subject=Тема: +changeMetadata.title=Заглавие: +changeMetadata.trapped=В капан: +changeMetadata.selectText.4=Други метаданни: +changeMetadata.selectText.5=Добавяне на персонализиране метаданни +changeMetadata.submit=Промени + + +#pdfToPDFA +pdfToPDFA.title=PDF към PDF/A +pdfToPDFA.header=PDF към PDF/A +pdfToPDFA.credit=Тази услуга използва OCRmyPDF за PDF/A преобразуване. +pdfToPDFA.submit=Преобразуване + + +#PDFToWord +PDFToWord.title=PDF към Word +PDFToWord.header=PDF към Word +PDFToWord.selectText.1=Изходен файлов формат +PDFToWord.credit=Тази услуга използва LibreOffice за преобразуване на файлове. +PDFToWord.submit=Преобразуване + + +#PDFToPresentation +PDFToPresentation.title=PDF към Презентация +PDFToPresentation.header=PDF към Презентация +PDFToPresentation.selectText.1=Изходен файлов формат +PDFToPresentation.credit=Тази услуга използва LibreOffice за преобразуване на файлове. +PDFToPresentation.submit=Преобразуване + + +#PDFToText +PDFToText.title=PDF към RTF (Текст) +PDFToText.header=PDF към RTF (Текст) +PDFToText.selectText.1=Изходен файлов формат +PDFToText.credit=Тази услуга използва LibreOffice за преобразуване на файлове. +PDFToText.submit=Преобразуване + + +#PDFToHTML +PDFToHTML.title=PDF към HTML +PDFToHTML.header=PDF към HTML +PDFToHTML.credit=Тази услуга използва LibreOffice за преобразуване на файлове. +PDFToHTML.submit=Преобразуване + + +#PDFToXML +PDFToXML.title=PDF към XML +PDFToXML.header=PDF към XML +PDFToXML.credit=Тази услуга използва LibreOffice за преобразуване на файлове. +PDFToXML.submit=Преобразуване \ No newline at end of file From 9d1dfe742ecc226ad0889e0ab57550f52f986238 Mon Sep 17 00:00:00 2001 From: IT Creativity + Art Team Date: Sun, 1 Oct 2023 15:59:57 +0300 Subject: [PATCH 31/57] Update languages.html Added BG lang support --- src/main/resources/templates/fragments/languages.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/resources/templates/fragments/languages.html b/src/main/resources/templates/fragments/languages.html index 17b88660..f8a79eef 100644 --- a/src/main/resources/templates/fragments/languages.html +++ b/src/main/resources/templates/fragments/languages.html @@ -1,5 +1,8 @@ - + + icon Български + + icon العربية @@ -53,4 +56,4 @@ icon 日本語 - \ No newline at end of file + From d4956fad8c1c76a26ea331b3d295a341d6c60c5e Mon Sep 17 00:00:00 2001 From: IT Creativity + Art Team Date: Sun, 1 Oct 2023 17:05:42 +0300 Subject: [PATCH 32/57] bg lang flag - bg lang flag --- src/main/resources/static/images/flags/bg.svg | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/main/resources/static/images/flags/bg.svg diff --git a/src/main/resources/static/images/flags/bg.svg b/src/main/resources/static/images/flags/bg.svg new file mode 100644 index 00000000..b100dd0d --- /dev/null +++ b/src/main/resources/static/images/flags/bg.svg @@ -0,0 +1,7 @@ + + + + + + + From b873e3cdf88b9dabfbac57fff72a9c79c4677610 Mon Sep 17 00:00:00 2001 From: Dylan Broussard Date: Mon, 2 Oct 2023 23:54:01 +0200 Subject: [PATCH 33/57] Update messages_fr_FR.properties --- src/main/resources/messages_fr_FR.properties | 49 +++++++++----------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/src/main/resources/messages_fr_FR.properties b/src/main/resources/messages_fr_FR.properties index d8f0e178..b1e5f222 100644 --- a/src/main/resources/messages_fr_FR.properties +++ b/src/main/resources/messages_fr_FR.properties @@ -1,7 +1,7 @@ ########### # Generic # ########### -# the direction that the language is written (ltr=left to right, rtl = right to left) +# the direction that the language is written (ltr = left to right, rtl = right to left) language.direction=ltr pdfPrompt=Sélectionnez le(s) PDF @@ -43,11 +43,11 @@ green=Vert blue=Bleu custom=Personnalisé\u2026 -changedCredsMessage=Credentials changed! -notAuthenticatedMessage=User not authenticated. -userNotFoundMessage=User not found. -incorrectPasswordMessage=Current password is incorrect. -usernameExistsMessage=New Username already exists. +changedCredsMessage=Les identifiants ont été mis à jour\u00a0! +notAuthenticatedMessage=Utilisateur non authentifié. +userNotFoundMessage=Utilisateur non trouvé. +incorrectPasswordMessage=Le mot de passe actuel est incorrect. +usernameExistsMessage=Le nouveau nom d\u2019utilisateur existe déjà. @@ -77,14 +77,14 @@ settings.accountSettings=Paramètres du compte -changeCreds.title=Change Credentials -changeCreds.header=Update Your Account Details -changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) -changeCreds.newUsername=New Username -changeCreds.oldPassword=Current Password -changeCreds.newPassword=New Password -changeCreds.confirmNewPassword=Confirm New Password -changeCreds.submit=Submit Changes +changeCreds.title=Modifiez vos identifiants +changeCreds.header=Mettez à jour vos identifiants de connexion +changeCreds.changeUserAndPassword=Vous utilisez les identifiants de connexion par défaut. Veuillez entrer un nouveau mot de passe (et nom d\u2019utilisateur si vous le souhaitez) +changeCreds.newUsername=Nouveau nom d\u2019utilisateur +changeCreds.oldPassword=Mot de passe actuel +changeCreds.newPassword=Nouveau mot de passe +changeCreds.confirmNewPassword=Confirmer le nouveau mot de passe +changeCreds.submit=Soumettre les modifications @@ -119,7 +119,7 @@ adminUserSettings.role=Rôle adminUserSettings.actions=Actions adminUserSettings.apiUser=Utilisateur API limité adminUserSettings.webOnlyUser=Utilisateur Web uniquement -adminUserSettings.forceChange=Force user to change username/password on login +adminUserSettings.forceChange=Forcer l\u2019utilisateur à changer son nom d\u2019utilisateur/mot de passe lors de la connexion adminUserSettings.submit=Ajouter ############# @@ -478,10 +478,7 @@ pipeline.title=Pipeline pageLayout.title=Fusionner des pages pageLayout.header=Fusionner des pages pageLayout.pagesPerSheet=Pages par feuille -########################## -### TODO: Translate ### -########################## -pageLayout.addBorder=Add Borders +pageLayout.addBorder=Ajouter des bordures pageLayout.submit=Fusionner @@ -561,7 +558,7 @@ ScannerImageSplit.selectText.8=Définit la surface de contour minimale pour une ScannerImageSplit.selectText.9=Taille de la bordure ScannerImageSplit.selectText.10=Définit la taille de la bordure ajoutée et supprimée pour éviter les bordures blanches dans la sortie (par défaut\u00a0: 1). - + #OCR ocr.title=OCR / Nettoyage des numérisations ocr.header=OCR (Reconnaissance optique de caractères) / Nettoyage des numérisations @@ -669,16 +666,16 @@ split.submit=Diviser imageToPDF.title=Image en PDF imageToPDF.header=Image en PDF imageToPDF.submit=Convertir -imageToPDF.selectLabel=Image Fit Options -imageToPDF.fillPage=Fill Page -imageToPDF.fitDocumentToImage=Fit Page to Image -imageToPDF.maintainAspectRatio=Maintain Aspect Ratios +imageToPDF.selectLabel=Options d\u2019ajustement de l\u2019image +imageToPDF.fillPage=Remplir la page +imageToPDF.fitDocumentToImage=Ajuster la page à l\u2019image +imageToPDF.maintainAspectRatio=Maintenir les proportions imageToPDF.selectText.2=Rotation automatique du PDF imageToPDF.selectText.3=Logique multi-fichiers (uniquement activée si vous travaillez avec plusieurs images) imageToPDF.selectText.4=Fusionner en un seul PDF imageToPDF.selectText.5=Convertir en PDF séparés - - + + #pdfToImage pdfToImage.title=Image en PDF pdfToImage.header=Image en PDF From b69973f614f02f3980138ccc96ec9aaab08cb06f Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Tue, 3 Oct 2023 22:58:15 +0100 Subject: [PATCH 34/57] Split doc size fix #400 --- build.gradle | 2 +- .../controller/api/SplitPDFController.java | 28 +++++++++---------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/build.gradle b/build.gradle index 1840c3a4..58d95a88 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { } group = 'stirling.software' -version = '0.14.4' +version = '0.14.5' sourceCompatibility = '17' repositories { diff --git a/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java b/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java index d633bf40..649dc8ec 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/SplitPDFController.java @@ -27,7 +27,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.PDFWithPageNums; import stirling.software.SPDF.utils.WebResponseUtils; - +import org.apache.pdfbox.multipdf.Splitter; @RestController @RequestMapping("/api/v1/general") @Tag(name = "General", description = "General APIs") @@ -50,26 +50,24 @@ public class SplitPDFController { pageNumbers.add(document.getNumberOfPages()- 1); logger.info("Splitting PDF into pages: {}", pageNumbers.stream().map(String::valueOf).collect(Collectors.joining(","))); - // split the document + Splitter splitter = new Splitter(); List splitDocumentsBoas = new ArrayList<>(); - int previousPageNumber = 0; + + int previousPageNumber = 1; // PDFBox uses 1-based indexing for pages. for (int splitPoint : pageNumbers) { - try (PDDocument splitDocument = new PDDocument()) { - for (int i = previousPageNumber; i <= splitPoint; i++) { - PDPage page = document.getPage(i); - splitDocument.addPage(page); - logger.debug("Adding page {} to split document", i); - } - previousPageNumber = splitPoint + 1; + splitPoint = splitPoint + 1; + splitter.setStartPage(previousPageNumber); + splitter.setEndPage(splitPoint); + List splitDocuments = splitter.split(document); + for (PDDocument splitDoc : splitDocuments) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); - splitDocument.save(baos); - + splitDoc.save(baos); splitDocumentsBoas.add(baos); - } catch (Exception e) { - logger.error("Failed splitting documents and saving them", e); - throw e; + splitDoc.close(); } + + previousPageNumber = splitPoint + 1; } From d647cb196f30b105da0a49d9548341fdf652d5f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 21:58:50 +0000 Subject: [PATCH 35/57] Bump org.springframework.boot:spring-boot-starter-test Bumps [org.springframework.boot:spring-boot-starter-test](https://github.com/spring-projects/spring-boot) from 3.1.2 to 3.1.4. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.1.2...v3.1.4) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter-test dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 58d95a88..e379115e 100644 --- a/build.gradle +++ b/build.gradle @@ -74,7 +74,7 @@ dependencies { implementation "com.h2database:h2" } - testImplementation 'org.springframework.boot:spring-boot-starter-test:3.1.2' + testImplementation 'org.springframework.boot:spring-boot-starter-test:3.1.4' From a9514b54ebb94d6b051f3e3827c32dd62af680e6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 21:58:50 +0000 Subject: [PATCH 36/57] Bump edu.sc.seis.launch4j from 3.0.3 to 3.0.5 Bumps edu.sc.seis.launch4j from 3.0.3 to 3.0.5. --- updated-dependencies: - dependency-name: edu.sc.seis.launch4j dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 58d95a88..9117f9c2 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { id 'io.spring.dependency-management' version '1.1.2' id 'org.springdoc.openapi-gradle-plugin' version '1.6.0' id "io.swagger.swaggerhub" version "1.2.0" - id 'edu.sc.seis.launch4j' version '3.0.3' + id 'edu.sc.seis.launch4j' version '3.0.5' } group = 'stirling.software' From 0a9381d5382b512b6dbacabd7e6deecb07fc75b2 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Thu, 5 Oct 2023 18:45:33 +0100 Subject: [PATCH 37/57] Update pdf-to-img.html --- src/main/resources/templates/convert/pdf-to-img.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/resources/templates/convert/pdf-to-img.html b/src/main/resources/templates/convert/pdf-to-img.html index 1d6db966..5d5a6ae7 100644 --- a/src/main/resources/templates/convert/pdf-to-img.html +++ b/src/main/resources/templates/convert/pdf-to-img.html @@ -24,6 +24,9 @@ + + +
    @@ -56,4 +59,4 @@
    - \ No newline at end of file + From 51f863e1e4e89b3d8955e834852f738e47863070 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Thu, 5 Oct 2023 21:20:05 +0100 Subject: [PATCH 38/57] swagger docs fix #401 --- .../SPDF/controller/api/RearrangePagesPDFController.java | 8 +++++--- src/main/resources/templates/remove-pages.html | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java b/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java index 9dd607b8..b76b6cee 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java @@ -21,6 +21,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.SortTypes; +import stirling.software.SPDF.model.api.PDFWithPageNums; import stirling.software.SPDF.model.api.general.RearrangePagesRequest; import stirling.software.SPDF.utils.GeneralUtils; import stirling.software.SPDF.utils.WebResponseUtils; @@ -33,11 +34,12 @@ public class RearrangePagesPDFController { @PostMapping(consumes = "multipart/form-data", value = "/remove-pages") @Operation(summary = "Remove pages from a PDF file", description = "This endpoint removes specified pages from a given PDF file. Users can provide a comma-separated list of page numbers or ranges to delete. Input:PDF Output:PDF Type:SISO") - public ResponseEntity deletePages( - @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file from which pages will be removed") MultipartFile pdfFile, - @RequestParam("pagesToDelete") @Parameter(description = "Comma-separated list of pages or page ranges to delete, e.g., '1,3,5-8'") String pagesToDelete) + public ResponseEntity deletePages(@ModelAttribute PDFWithPageNums request ) throws IOException { + MultipartFile pdfFile = request.getFileInput(); + String pagesToDelete = request.getPageNumbers(); + PDDocument document = PDDocument.load(pdfFile.getBytes()); // Split the page order string into an array of page numbers or range of numbers diff --git a/src/main/resources/templates/remove-pages.html b/src/main/resources/templates/remove-pages.html index 749a1c2f..63c171dd 100644 --- a/src/main/resources/templates/remove-pages.html +++ b/src/main/resources/templates/remove-pages.html @@ -17,8 +17,8 @@
    - - + +
    From f3ddf18a236d742d88e18ce37b37f1977059d16d Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Thu, 5 Oct 2023 23:53:40 +0100 Subject: [PATCH 39/57] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e5dcc5d8..77170245 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,6 @@ Any file which has been downloaded by the user will have already been deleted fr Feel free to request any features or bug fixes either in github issues or our [Discord](https://discord.gg/Cn8pWhQRxZ) - ![stirling-home](images/stirling-home.png) ## Features @@ -232,6 +231,7 @@ For those wanting to use Stirling-PDFs backend API to link with their own custom ## Login authentication +![stirling-login](images/login-light.png) ### Prerequisites: - User must have the folder ./configs volumed within docker so that it is retained during updates. - Docker uses must download the security jar version by setting ``DOCKER_ENABLE_SECURITY`` to ``true`` in environment variables. @@ -265,4 +265,4 @@ For API usage you must provide a header with 'X-API-Key' and the associated API This is a issue caused commonly by your NGINX congifuration. The default file upload size for NGINX is 1MB, you need to add the following in your Nginx sites-available file. ``client_max_body_size SIZE;`` Where "SIZE" is 50M for example for 50MB files. ### Q3: Why is my download timing out -NGINX has timeout values by default so if you are running Stirling-PDF behind NGINX you may need to set a timeout value such as adding the config ``proxy_read_timeout 3600;`` \ No newline at end of file +NGINX has timeout values by default so if you are running Stirling-PDF behind NGINX you may need to set a timeout value such as adding the config ``proxy_read_timeout 3600;`` From 19e122be992c081afad14a7b4107369152409233 Mon Sep 17 00:00:00 2001 From: Dimitrios Kaitantzidis Date: Sat, 7 Oct 2023 17:53:03 +0300 Subject: [PATCH 40/57] WIP: Adds greek language support --- src/main/resources/messages_el_GR.properties | 817 ++++++++++++++++++ src/main/resources/static/images/flags/gr.svg | 16 + .../templates/fragments/languages.html | 5 +- 3 files changed, 837 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/messages_el_GR.properties create mode 100644 src/main/resources/static/images/flags/gr.svg diff --git a/src/main/resources/messages_el_GR.properties b/src/main/resources/messages_el_GR.properties new file mode 100644 index 00000000..14077264 --- /dev/null +++ b/src/main/resources/messages_el_GR.properties @@ -0,0 +1,817 @@ +########### +# Generic # +########### +# the direction that the language is written (ltr = left to right, rtl = right to left) +language.direction=ltr + +pdfPrompt=\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE PDF(s) +multiPdfPrompt=\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE PDFs (2+) +multiPdfDropPrompt=\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE (\u03AE \u03C4\u03C1\u03AC\u03B2\u03B7\u03B3\u03BC\u03B1 \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 \u03BA\u03B1\u03B9 \u03B1\u03C0\u03CC\u03B8\u03B5\u03C3\u03B7) \u03CC\u03BB\u03C9\u03BD \u03C4\u03C9\u03BD PDF \u03C0\u03BF\u03C5 \u03C7\u03C1\u03B5\u03B9\u03AC\u03B6\u03B5\u03C3\u03C4\u03B5 +imgPrompt=\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u0395\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2(\u0395\u03B9\u03BA\u03CC\u03BD\u03C9\u03BD) +genericSubmit=\u03A5\u03C0\u03BF\u03B2\u03BF\u03BB\u03AE +processTimeWarning=\u03A0\u03C1\u03BF\u03C3\u03BF\u03C7\u03AE: \u0391\u03C5\u03C4\u03AE \u03B7 \u03B4\u03B9\u03B1\u03B4\u03B9\u03BA\u03B1\u03C3\u03AF\u03B1 \u03BC\u03C0\u03BF\u03C1\u03B5\u03AF \u03BD\u03B1 \u03B4\u03B9\u03B1\u03C1\u03BA\u03AD\u03C3\u03B5\u03B9 \u03AD\u03C9\u03C2 \u03BA\u03B1\u03B9 \u03AD\u03BD\u03B1 \u03BB\u03B5\u03C0\u03C4\u03CC \u03B1\u03BD\u03AC\u03BB\u03BF\u03B3\u03B1 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03C4\u03BF\u03C5 \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 +pageOrderPrompt=\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03B7 \u03A3\u03B5\u03B9\u03C1\u03AC \u03A3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2 (\u03A0\u03C1\u03BF\u03C3\u03B8\u03AD\u03C3\u03C4\u03B5 \u03BC\u03AF\u03B1 \u03BB\u03AF\u03C3\u03C4\u03B5 \u03B1\u03C0\u03BF \u03B1\u03C1\u03B9\u03B8\u03BC\u03BF\u03CD\u03C2 \u03C3\u03B5\u03BB\u03B9\u03B4\u03CE\u03BD, \u03C7\u03C9\u03C1\u03B9\u03C3\u03BC\u03AD\u03BD\u03B5\u03C2 \u03BC\u03B5 \u03BA\u03CC\u03BC\u03BC\u03B1 \u03AE \u03C3\u03C5\u03BD\u03B1\u03C1\u03C4\u03AE\u03C3\u03B5\u03B9\u03C2 \u03CC\u03C0\u03C9\u03C2 2n+1) : +goToPage=Go +true=\u0391\u03BB\u03B7\u03B8\u03AD\u03C2 +false=\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF +unknown=\u0386\u03B3\u03BD\u03C9\u03C3\u03C4\u03BF +save=\u0391\u03C0\u03BF\u03B8\u03AE\u03BA\u03B5\u03C5\u03C3\u03B7 +close=\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF +filesSelected=\u03B1\u03C1\u03C7\u03B5\u03AF\u03B1 \u03C0\u03BF\u03C5 \u03B5\u03C0\u03B9\u03BB\u03AD\u03C7\u03B8\u03B7\u03BA\u03B1\u03BD +noFavourites=\u039A\u03B1\u03BD\u03AD\u03BD\u03B1 \u03B1\u03B3\u03B1\u03C0\u03AE\u03BC\u03B5\u03BD\u03BF \u03B4\u03B5\u03BD \u03AD\u03C7\u03B5\u03B9 \u03C0\u03C1\u03BF\u03C3\u03C4\u03B5\u03B8\u03B5\u03AF +bored=\u0392\u03B1\u03C1\u03B9\u03AD\u03C3\u03C4\u03B5 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03BC\u03AD\u03BD\u03B5\u03C4\u03B5; +alphabet=\u0391\u03BB\u03C6\u03AC\u03B2\u03B7\u03C4\u03BF +downloadPdf=\u039A\u03B1\u03C4\u03AD\u03B2\u03B1\u03C3\u03BC\u03B1 \u03C4\u03BF\u03C5 PDF +text=\u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF +font=\u0393\u03C1\u03B1\u03BC\u03BC\u03B1\u03C4\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC +selectFillter=-- \u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE -- +pageNum=\u0391\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03A3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2 +sizes.small=\u039C\u03B9\u03BA\u03C1\u03CC +sizes.medium=\u039C\u03B5\u03C3\u03B1\u03AF\u03BF +sizes.large=\u039C\u03B5\u03B3\u03AC\u03BB\u03BF +sizes.x-large=\u03A0\u03BF\u03BB\u03CD \u039C\u03B5\u03B3\u03AC\u03BB\u03BF +error.pdfPassword=\u03A4\u03BF PDF \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF \u03B5\u03AF\u03BD\u03B1\u03B9 \u03BA\u03BB\u03B5\u03B9\u03B4\u03C9\u03BC\u03AD\u03BD\u03BF \u03BC\u03B5 \u03BA\u03C9\u03B4\u03B9\u03BA\u03CC \u03BA\u03B1\u03B9 \u03B5\u03AF\u03C4\u03B5 \u03B4\u03B5\u03BD \u03AD\u03C7\u03B5\u03C4\u03B5 \u03B5\u03B9\u03C3\u03AC\u03B3\u03B5\u03B9 \u03BA\u03C9\u03B4\u03B9\u03BA\u03CC, \u03B5\u03AF\u03C4\u03B5 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03BB\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF\u03C2 +delete=\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE +username=\u038C\u03BD\u03BF\u03BC\u03B1 \u03A7\u03C1\u03AE\u03C3\u03C4\u03B7 +password=\u039A\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 +welcome=\u039A\u03B1\u03BB\u03C9\u03C2 \u0389\u03BB\u03B8\u03B1\u03C4\u03B5 +property=Property +black=\u039C\u03B1\u03CD\u03C1\u03BF +white=\u0386\u03C3\u03C0\u03C1\u03BF +red=\u039A\u03CC\u03BA\u03BA\u03B9\u03BD\u03BF +green=\u03A0\u03C1\u03AC\u03C3\u03B9\u03BD\u03BF +blue=\u039C\u03C0\u03BB\u03AD +custom=\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03B3\u03AE... + +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. +incorrectPasswordMessage=\u039F \u03C4\u03C1\u03AD\u03C7\u03C9\u03BD \u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03BB\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF\u03C2. +usernameExistsMessage=\u03A4\u03BF \u03BD\u03AD\u03BF \u03CC\u03BD\u03BF\u03BC\u03B1 \u03C7\u03C1\u03AE\u03C3\u03C4\u03B7 \u03C5\u03C0\u03AC\u03C1\u03C7\u03B5\u03B9 \u03AE\u03B4\u03B7. + + + +############# +# NAVBAR # +############# +navbar.convert=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE +navbar.security=\u0391\u03C3\u03C6\u03AC\u03BB\u03B5\u03B9\u03B1 +navbar.other=\u0394\u03B9\u03AC\u03C6\u03BF\u03C1\u03B1 +navbar.darkmode=\u039C\u03B1\u03CD\u03C1\u03BF \u0398\u03AD\u03BC\u03B1 +navbar.pageOps=\u039B\u03B5\u03B9\u03C4\u03BF\u03C5\u03C1\u03B3\u03AF\u03B5\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2 +navbar.settings=\u03A1\u03C5\u03B8\u03BC\u03AF\u03C3\u03B5\u03B9\u03C2 + +############# +# SETTINGS # +############# +settings.title=\u03A1\u03C5\u03B8\u03BC\u03AF\u03C3\u03B5\u03B9\u03C2 +settings.update=\u03A5\u03C0\u03AC\u03C1\u03C7\u03B5\u03B9 \u03B4\u03B9\u03B1\u03B8\u03AD\u03C3\u03B9\u03BC\u03B7 \u03B5\u03BD\u03B7\u03BC\u03AD\u03C1\u03C9\u03C3\u03B7 +settings.appVersion=\u0388\u03BA\u03B4\u03BF\u03C3\u03B7 \u03B5\u03C6\u03B1\u03C1\u03BC\u03BF\u03B3\u03AE\u03C2: App Version: +settings.downloadOption.title=\u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03B5\u03C4\u03B5 \u03C4\u03B7\u03BD \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03BB\u03AE\u03C8\u03B7\u03C2 (\u0393\u03B9\u03B1 \u03BB\u03AE\u03C8\u03B5\u03B9\u03C2 \u03BC\u03B5\u03BC\u03BF\u03BD\u03C9\u03BC\u03AD\u03BD\u03C9\u03BD \u03B1\u03C1\u03C7\u03B5\u03AF\u03C9\u03BD \u03C7\u03C9\u03C1\u03AF\u03C2 zip): +settings.downloadOption.1=\u0386\u03BD\u03BF\u03B9\u03B3\u03BC\u03B1 \u03C3\u03C4\u03BF \u03AF\u03B4\u03B9\u03BF \u03C0\u03B1\u03C1\u03AC\u03B8\u03C5\u03C1\u03BF +settings.downloadOption.2=\u0386\u03BD\u03BF\u03B9\u03B3\u03BC\u03B1 \u03C3\u03B5 \u03BD\u03AD\u03BF \u03C0\u03B1\u03C1\u03AC\u03B8\u03C5\u03C1\u03BF +settings.downloadOption.3=\u039B\u03AE\u03C8\u03B7 \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 +settings.zipThreshold=Zip \u03B1\u03C1\u03C7\u03B5\u03AF\u03B1 \u03CC\u03C4\u03B1\u03BD \u03BF \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C4\u03C9\u03BD \u03BB\u03B7\u03C6\u03B8\u03AD\u03BD\u03C4\u03C9\u03BD \u03B1\u03C1\u03C7\u03B5\u03AF\u03C9\u03BD \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF\u03C2 +settings.signOut=\u0391\u03C0\u03BF\u03C3\u03CD\u03BD\u03B4\u03B5\u03C3\u03B7 +settings.accountSettings=\u03A1\u03C5\u03B8\u03BC\u03AF\u03C3\u03B5\u03B9\u03C2 \u039B\u03BF\u03B3\u03B1\u03C1\u03B9\u03B1\u03C3\u03BC\u03BF\u03CD + + + +changeCreds.title=\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u0394\u03B9\u03B1\u03C0\u03B9\u03C3\u03C4\u03B5\u03C5\u03C4\u03B7\u03C1\u03AF\u03C9\u03BD +changeCreds.header=\u0395\u03BD\u03B7\u03BC\u03AD\u03C1\u03C9\u03C3\u03B7 \u03C4\u03C9\u03BD \u03BB\u03B5\u03C0\u03C4\u03BF\u03BC\u03B5\u03C1\u03B5\u03B9\u03CE\u03BD \u03C4\u03BF\u03C5 \u039B\u03BF\u03B3\u03B1\u03C1\u03B9\u03B1\u03C3\u03BC\u03BF\u03CD \u03C3\u03B1\u03C2 +changeCreds.changeUserAndPassword=\u03A7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF\u03C4\u03B5 \u03C4\u03B1 \u03C0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03B5\u03B3\u03BC\u03AD\u03BD\u03B1 \u03B4\u03B9\u03B1\u03C0\u03B9\u03C3\u03C4\u03B5\u03C5\u03C4\u03AE\u03C1\u03B9\u03B1 \u03C3\u03CD\u03BD\u03B4\u03B5\u03C3\u03B7\u03C2. \u03A0\u03B1\u03C1\u03B1\u03BA\u03B1\u03BB\u03CE \u03B5\u03B9\u03C3\u03AC\u03B3\u03B5\u03C4\u03B5 \u03BD\u03AD\u03BF \u03BA\u03C9\u03B4\u03B9\u03BA\u03CC \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2 (\u03BA\u03B1\u03B9 \u03CC\u03BD\u03BF\u03BC\u03B1 \u03C7\u03C1\u03AE\u03C3\u03C4\u03B7 \u03B1\u03BD \u03C4\u03BF \u03B5\u03C0\u03B9\u03B8\u03C5\u03BC\u03B5\u03AF\u03C4\u03B5) +changeCreds.newUsername=\u039D\u03AD\u03BF \u038C\u03BD\u03BF\u03BC\u03B1 \u03A7\u03C1\u03AE\u03C3\u03C4\u03B7 +changeCreds.oldPassword=\u03A4\u03C1\u03AD\u03C7\u03C9\u03BD \u039A\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03A0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2 +changeCreds.newPassword=\u039D\u03AD\u03BF\u03C2 \u039A\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03A0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2 +changeCreds.confirmNewPassword=\u0395\u03C0\u03B9\u03B2\u03B5\u03B2\u03B1\u03AF\u03C9\u03C3\u03B7 \u039D\u03AD\u03BF\u03C5 \u039A\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD \u03A0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2 +changeCreds.submit=\u03A5\u03C0\u03BF\u03B2\u03BF\u03BB\u03AE \u0391\u03BB\u03BB\u03B1\u03B3\u03CE\u03BD + + + +account.title=\u03A1\u03C5\u03B8\u03BC\u03AF\u03C3\u03B5\u03B9\u03C2 \u039B\u03BF\u03B3\u03B1\u03C1\u03B9\u03B1\u03C3\u03BC\u03BF\u03CD +account.accountSettings=\u03A1\u03C5\u03B8\u03BC\u03AF\u03C3\u03B5\u03B9\u03C2 \u039B\u03BF\u03B3\u03B1\u03C1\u03B9\u03B1\u03C3\u03BC\u03BF\u03CD +account.adminSettings=\u03A1\u03C5\u03B8\u03BC\u03AF\u03C3\u03B5\u03B9\u03C2 \u0394\u03B9\u03B1\u03C7\u03B5\u03B9\u03C1\u03B9\u03C3\u03C4\u03AE - \u03A0\u03C1\u03BF\u03B2\u03BF\u03BB\u03AE \u03BA\u03B1\u03B9 \u03C0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C7\u03C1\u03B7\u03C3\u03C4\u03CE\u03BD +account.userControlSettings=\u03A1\u03C5\u03B8\u03BC\u03AF\u03C3\u03B5\u03B9\u03C2 \u03A7\u03B5\u03B9\u03C1\u03B9\u03C3\u03BC\u03BF\u03CD \u03A7\u03C1\u03B7\u03C3\u03C4\u03CE\u03BD +account.changeUsername=\u039D\u03AD\u03BF \u038C\u03BD\u03BF\u03BC\u03B1 \u03A7\u03C1\u03AE\u03C3\u03C4\u03B7 +account.changeUsername=\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u039F\u03BD\u03CC\u03BC\u03B1\u03C4\u03BF\u03C2 \u03A7\u03C1\u03AE\u03C3\u03C4\u03B7 +account.password=\u0395\u03C0\u03B9\u03B2\u03B5\u03B2\u03B1\u03AF\u03C9\u03C3\u03B7 \u039A\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD \u03A0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2 +account.oldPassword=\u03A0\u03B1\u03BB\u03B9\u03CC\u03C2 \u039A\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03A0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2 +account.newPassword=\u039D\u03AD\u03BF\u03C2 \u039A\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03A0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2 +account.changePassword=\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u039A\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD \u03A0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2 +account.confirmNewPassword=\u0395\u03C0\u03B9\u03B2\u03B5\u03B2\u03B1\u03AF\u03C9\u03C3\u03B7 \u039D\u03AD\u03BF\u03C5 \u039A\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD +account.signOut=\u0391\u03C0\u03BF\u03C3\u03CD\u03BD\u03B4\u03B5\u03C3\u03B7 +account.yourApiKey=\u03A4\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03B1\u03C2 \u03B3\u03B9\u03B1 \u03C4\u03B7 \u03B4\u03B9\u03B5\u03C0\u03B1\u03C6\u03AE \u03C0\u03C1\u03BF\u03B3\u03C1\u03B1\u03BC\u03BC\u03B1\u03C4\u03B9\u03C3\u03BC\u03BF\u03CD \u03B5\u03C6\u03B1\u03C1\u03BC\u03BF\u03B3\u03CE\u03BD (API key) +account.syncTitle=\u03A3\u03C5\u03B3\u03C7\u03C1\u03BF\u03BD\u03B9\u03C3\u03BC\u03CC\u03C2 \u03C4\u03C9\u03BD \u03C1\u03C5\u03B8\u03BC\u03AF\u03C3\u03B5\u03C9\u03BD \u03C4\u03BF\u03C5 \u03C6\u03C5\u03BB\u03BB\u03BF\u03BC\u03B5\u03C4\u03C1\u03B7\u03C4\u03AE (Web Browser) \u03BC\u03B5 \u03C4\u03BF\u03BD \u03BB\u03BF\u03B3\u03B1\u03C1\u03B9\u03B1\u03C3\u03BC\u03CC +account.settingsCompare=\u03A3\u03CD\u03B3\u03BA\u03C1\u03B9\u03C3\u03B7 \u03A1\u03C5\u03B8\u03BC\u03AF\u03C3\u03B5\u03C9\u03BD: +account.property=Property +account.webBrowserSettings=\u03A1\u03CD\u03B8\u03BC\u03B9\u03C3\u03B7 \u03C6\u03C5\u03BB\u03BB\u03BF\u03BC\u03B5\u03C4\u03C1\u03B7\u03C4\u03AE (Web Browser) +account.syncToBrowser=\u03A3\u03C5\u03B3\u03C7\u03C1\u03BF\u03BD\u03B9\u03C3\u03BC\u03CC\u03C2 \u039B\u03BF\u03B3\u03B1\u03C1\u03B9\u03B1\u03C3\u03BC\u03BF\u03CD -> \u03A6\u03C5\u03BB\u03BB\u03BF\u03BC\u03B5\u03C4\u03C1\u03B7\u03C4\u03AE (Web Browser) +account.syncToAccount= \u03A3\u03C5\u03B3\u03C7\u03C1\u03BF\u03BD\u03B9\u03C3\u03BC\u03CC\u03C2 \u039B\u03BF\u03B3\u03B1\u03C1\u03B9\u03B1\u03C3\u03BC\u03BF\u03CD <- \u03A6\u03C5\u03BB\u03BB\u03BF\u03BC\u03B5\u03C4\u03C1\u03B7\u03C4\u03AE (Web Browser) + + +adminUserSettings.title= \u03A1\u03C5\u03B8\u03BC\u03AF\u03C3\u03B5\u03B9\u03C2 \u03B5\u03BB\u03AD\u03B3\u03C7\u03BF\u03C5 \u03C7\u03C1\u03AE\u03C3\u03C4\u03B7 +adminUserSettings.header=\u03A1\u03C5\u03B8\u03BC\u03AF\u03C3\u03B5\u03B9\u03C2 \u03B5\u03BB\u03AD\u03B3\u03C7\u03BF\u03C5 \u0394\u03B9\u03B1\u03C7\u03B5\u03B9\u03C1\u03B9\u03C3\u03C4\u03AE +adminUserSettings.admin=\u0394\u03B9\u03B1\u03C7\u03B5\u03B9\u03C1\u03B9\u03C3\u03C4\u03AE\u03C2 +adminUserSettings.user=\u03A7\u03C1\u03AE\u03C3\u03C4\u03B7\u03C2 +adminUserSettings.addUser=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03BD\u03AD\u03BF\u03C5 \u03A7\u03C1\u03AE\u03C3\u03C4\u03B7 +adminUserSettings.roles=\u03A1\u03CC\u03BB\u03BF\u03B9 +adminUserSettings.role=\u03A1\u03CC\u03BB\u03BF\u03C2 +adminUserSettings.actions=\u0395\u03BD\u03AD\u03C1\u03B3\u03B5\u03B9\u03B5\u03C2 +adminUserSettings.apiUser=\u03A0\u03B5\u03C1\u03B9\u03BF\u03C1\u03B9\u03C3\u03BC\u03AD\u03BD\u03BF\u03C2 \u03A7\u03C1\u03AE\u03C3\u03C4\u03B7\u03C2 \u03B3\u03B9\u03B1 \u03B4\u03B9\u03B5\u03C0\u03B1\u03C6\u03AE \u03C0\u03C1\u03BF\u03B3\u03C1\u03B1\u03BC\u03BC\u03B1\u03C4\u03B9\u03C3\u03BC\u03BF\u03CD \u03B5\u03C6\u03B1\u03C1\u03BC\u03BF\u03B3\u03CE\u03BD (API User) +adminUserSettings.webOnlyUser=\u03A7\u03C1\u03AE\u03C3\u03C4\u03B7\u03C2 \u03BC\u03CC\u03BD\u03BF \u0399\u03C3\u03C4\u03BF\u03CD +adminUserSettings.forceChange = \u0391\u03BD\u03B1\u03B3\u03BA\u03AC\u03C3\u03C4\u03B5 \u03C4\u03BF\u03BD \u03C7\u03C1\u03AE\u03C3\u03C4\u03B7 \u03BD\u03B1 \u03B1\u03BB\u03BB\u03AC\u03BE\u03B5\u03B9 \u03C4\u03BF \u03CC\u03BD\u03BF\u03BC\u03B1 \u03C7\u03C1\u03AE\u03C3\u03C4\u03B7/\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2 \u03BA\u03B1\u03C4\u03AC \u03C4\u03B7 \u03C3\u03CD\u03BD\u03B4\u03B5\u03C3\u03B7 +adminUserSettings.submit=\u0391\u03C0\u03BF\u03B8\u03AE\u03BA\u03B5\u03C5\u03C3\u03B7 \u03A7\u03C1\u03AE\u03C3\u03C4\u03B7 + +############# +# HOME-PAGE # +############# +home.desc= \u0397 \u03C4\u03BF\u03C0\u03B9\u03BA\u03AC \u03C6\u03B9\u03BB\u03BF\u03BE\u03B5\u03BD\u03BF\u03CD\u03BC\u03B5\u03BD\u03B7 one-stop-shop \u03C3\u03B1\u03C2 \u03B3\u03B9\u03B1 \u03CC\u03BB\u03B5\u03C2 \u03C4\u03B9\u03C2 \u03B1\u03BD\u03AC\u03B3\u03BA\u03B5\u03C2 \u03C3\u03B1\u03C2 \u03C3\u03B5 PDF. + + +home.multiTool.title=PDF \u03A0\u03BF\u03BB\u03C5\u03B5\u03C1\u03B3\u03B1\u03BB\u03B5\u03AF\u03BF +home.multiTool.desc=\u03A3\u03C5\u03B3\u03C7\u03CE\u03BD\u03B5\u03C5\u03C3\u03B7, \u03A0\u03B5\u03C1\u03B9\u03C3\u03C4\u03C1\u03BF\u03C6\u03AE, \u0391\u03BD\u03B1\u03B4\u03B9\u03AC\u03C4\u03B1\u03BE\u03B7 \u03BA\u03B1\u03B9 \u039A\u03B1\u03C4\u03AC\u03C1\u03B3\u03B7\u03C3\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD +multiTool.tags=Multi Tool,Multi operation,UI,click drag,front end,client side,interactive,intractable,move + +home.merge.title=\u03A3\u03C5\u03B3\u03C7\u03CE\u03BD\u03B5\u03C5\u03C3\u03B7 +home.merge.desc=\u03A3\u03C5\u03B3\u03C7\u03C9\u03BD\u03B5\u03CD\u03C3\u03C4\u03B5 \u03B5\u03CD\u03BA\u03BF\u03BB\u03B1 \u03C0\u03BF\u03BB\u03BB\u03AC PDF \u03C3\u03B5 \u03AD\u03BD\u03B1. +merge.tags=merge,Page operations,Back end,server side + +home.split.title=\u0394\u03B9\u03B1\u03C7\u03C9\u03C1\u03B9\u03C3\u03BC\u03CC\u03C2 +home.split.desc=\u0394\u03B9\u03B1\u03C7\u03C9\u03C1\u03AF\u03C3\u03C4\u03B5 \u03C4\u03B1 PDF \u03C3\u03B5 \u03C0\u03BF\u03BB\u03BB\u03AC \u03AD\u03B3\u03B3\u03C1\u03B1\u03C6\u03B1. +split.tags=Page operations,divide,Multi Page,cut,server side + +home.rotate.title=\u03A0\u03B5\u03C1\u03B9\u03C3\u03C4\u03C1\u03BF\u03C6\u03AE +home.rotate.desc=\u03A0\u03B5\u03C1\u03B9\u03C3\u03C4\u03C1\u03AD\u03C8\u03C4\u03B5 \u03B5\u03CD\u03BA\u03BF\u03BB\u03B1 \u03C4\u03B1 PDF \u03C3\u03B1\u03C2. +rotate.tags=server side + + +home.imageToPdf.title=\u0395\u03B9\u03BA\u03CC\u03BD\u03B1 \u03C3\u03B5 PDF +home.imageToPdf.desc=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 (PNG, JPEG, GIF) \u03C3\u03B5 PDF. +imageToPdf.tags=conversion,img,jpg,picture,photo + +home.pdfToImage.title=PDF \u03C3\u03B5 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1 +home.pdfToImage.desc=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03B5\u03BD\u03CC\u03C2 PDF \u03C3\u03B5 \u03BC\u03AF\u03B1 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1. (PNG, JPEG, GIF) +pdfToImage.tags=conversion,img,jpg,picture,photo + +home.pdfOrganiser.title=\u039F\u03C1\u03B3\u03AC\u03BD\u03C9\u03C3\u03B7 +home.pdfOrganiser.desc=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7.\u0391\u03BD\u03B1\u03B4\u03B9\u03AC\u03C4\u03B1\u03BE\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD \u03BC\u03B5 \u03BF\u03C0\u03BF\u03B9\u03B1\u03B4\u03AE\u03C0\u03BF\u03C4\u03B5 \u03C3\u03B5\u03B9\u03C1\u03AC +pdfOrganiser.tags=duplex,even,odd,sort,move + + +home.addImage.title=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u0395\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 +home.addImage.desc=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03BC\u03B9\u03B1\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1 \u03C3\u03B5 \u03BC\u03B9\u03B1 \u03BA\u03B1\u03B8\u03BF\u03C1\u03B9\u03C3\u03BC\u03AD\u03BD\u03B7 \u03B8\u03AD\u03C3\u03B7 \u03C3\u03C4\u03BF PDF +addImage.tags=img,jpg,picture,photo + +home.watermark.title=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03A5\u03B4\u03B1\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2 +home.watermark.desc=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03B5\u03BD\u03CC\u03C2 \u03C0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03BF\u03C5 \u03C5\u03B4\u03B1\u03C4\u03BF\u03B3\u03C1\u03AC\u03C6\u03B7\u03BC\u03B1\u03C4\u03BF\u03C2 \u03C3\u03C4\u03BF \u03AD\u03B3\u03B3\u03C1\u03B1\u03C6\u03CC PDF. +watermark.tags=Text,repeating,label,own,copyright,trademark,img,jpg,picture,photo + +home.permissions.title=\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u0394\u03B9\u03BA\u03B1\u03B9\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD +home.permissions.desc=\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u03C4\u03C9\u03BD \u0394\u03B9\u03BA\u03B1\u03B9\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD \u03C3\u03C4\u03BF \u03AD\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF PDF +permissions.tags=read,write,edit,print + + +home.removePages.title=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 +home.removePages.desc=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03BC\u03AE \u03B5\u03C0\u03B9\u03B8\u03C5\u03BC\u03B7\u03C4\u03CE\u03BD \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD \u03B1\u03C0\u03BF \u03C4\u03BF \u03AD\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF PDF. +removePages.tags=Remove pages,delete pages + +home.addPassword.title=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD +home.addPassword.desc=\u039A\u03C1\u03C5\u03C0\u03C4\u03BF\u03B3\u03C1\u03AC\u03C6\u03B7\u03C3\u03B7 - \u03BA\u03BB\u03B5\u03AF\u03B4\u03C9\u03BC\u03B1 \u03C4\u03BF\u03C5 PDF \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 \u03BC\u03B5 \u03AD\u03BD\u03B1\u03BD \u03BA\u03C9\u03B4\u03B9\u03BA\u03CC. +addPassword.tags=secure,security + +home.removePassword.title=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u039A\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD +home.removePassword.desc=\u039A\u03B1\u03C4\u03AC\u03C1\u03B3\u03AE\u03C3\u03B7 \u03C4\u03B7\u03C2 \u03C0\u03C1\u03BF\u03C3\u03C4\u03B1\u03C3\u03AF\u03B1\u03C2 \u03BC\u03B5 \u03BA\u03C9\u03B4\u03B9\u03BA\u03CC \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2 \u03B1\u03C0\u03CC \u03C4\u03BF \u03AD\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF PDF. +removePassword.tags=secure,Decrypt,security,unpassword,delete password + +home.compressPdfs.title=\u03A3\u03C5\u03BC\u03C0\u03AF\u03B5\u03C3\u03B7 +home.compressPdfs.desc=\u03A3\u03C5\u03BC\u03C0\u03AF\u03B5\u03C3\u03B7 \u03C4\u03C9\u03BD \u03B1\u03C1\u03C7\u03B5\u03AF\u03C9\u03BD PDF \u03B3\u03B9\u03B1 \u03C4\u03B7\u03BD \u03BC\u03B5\u03AF\u03C9\u03C3\u03B7 \u03C4\u03BF\u03C5 \u03BC\u03B5\u03B3\u03AD\u03B8\u03BF\u03C5\u03C2 \u03C4\u03BF\u03C5\u03C2. +compressPdfs.tags=squish,small,tiny + + +home.changeMetadata.title=\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u039C\u03B5\u03C4\u03B1\u03B4\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03C9\u03BD +home.changeMetadata.desc=\u0391\u03BB\u03BB\u03B1\u03B3\u03AE/\u039A\u03B1\u03C4\u03AC\u03C1\u03B3\u03B7\u03C3\u03B7/\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03BC\u03B5\u03C4\u03B1\u03B4\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03C9\u03BD \u03B1\u03C0\u03CC \u03AD\u03BD\u03B1 \u03AD\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF PDF. +changeMetadata.tags==Title,author,date,creation,time,publisher,producer,stats + +home.fileToPDF.title=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03B5\u03BD\u03CC\u03C2 \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 \u03C3\u03B5 PDF +home.fileToPDF.desc=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C3\u03C7\u03B5\u03B4\u03CC\u03BD \u03BF\u03C0\u03BF\u03B9\u03BF\u03C5\u03B4\u03AE\u03C0\u03BF\u03C4\u03B5 \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 \u03C3\u03B5 PDF (DOCX, PNG, XLS, PPT, TXT and more) +fileToPDF.tags=transformation,format,document,picture,slide,text,conversion,office,docs,word,excel,powerpoint + +home.ocr.title=\u03BF\u03C0\u03C4\u03B9\u03BA\u03AE \u03B1\u03BD\u03B1\u03B3\u03BD\u03CE\u03C1\u03B9\u03C3\u03B7 \u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03C9\u03BD (OCR) / \u03A3\u03B1\u03C1\u03CE\u03C3\u03B5\u03B9\u03C2 Cleanup +home.ocr.desc=\u03A4\u03BF Cleanup \u03C3\u03B1\u03C1\u03CE\u03BD\u03B5\u03B9 \u03BA\u03B1\u03B9 \u03B1\u03BD\u03B9\u03C7\u03BD\u03B5\u03CD\u03B5\u03B9 \u03BA\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF \u03B1\u03C0\u03CC \u03B5\u03B9\u03BA\u03CC\u03BD\u03B5\u03C2 \u03BC\u03AD\u03C3\u03B1 \u03C3\u03B5 \u03AD\u03BD\u03B1 PDF \u03BA\u03B1\u03B9 \u03C4\u03BF \u03C0\u03C1\u03BF\u03C3\u03B8\u03AD\u03C4\u03B5\u03B9 \u03BE\u03B1\u03BD\u03AC \u03C9\u03C2 \u03BA\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF +ocr.tags=recognition,text,image,scan,read,identify,detection,editable + + +home.extractImages.title=\u0395\u03BE\u03B1\u03B3\u03C9\u03B3\u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03C9\u03BD +home.extractImages.desc=\u0395\u03BE\u03B1\u03B3\u03C9\u03B3\u03AE \u03CC\u03BB\u03C9\u03BD \u03C4\u03C9\u03BD \u03B5\u03B9\u03BA\u03CC\u03BD\u03C9\u03BD \u03B1\u03C0\u03BF \u03AD\u03BD\u03B1 PDF \u03BA\u03B1\u03B9 \u03B1\u03C0\u03BF\u03B8\u03AE\u03BA\u03B5\u03C5\u03C3\u03B7 \u03B1\u03C5\u03C4\u03CE\u03BD \u03C3\u03B5 zip +extractImages.tags=picture,photo,save,archive,zip,capture,grab + +home.pdfToPDFA.title=PDF \u03C3\u03B5 PDF/A +home.pdfToPDFA.desc=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE PDF \u03C3\u03B5 PDF/A \u03B3\u03B9\u03B1 \u03BC\u03B1\u03BA\u03C1\u03BF\u03C7\u03C1\u03CC\u03BD\u03B9\u03B1 \u03B1\u03C0\u03BF\u03B8\u03AE\u03BA\u03B5\u03C5\u03C3\u03B7 +pdfToPDFA.tags=archive,long-term,standard,conversion,storage,preservation + +home.PDFToWord.title=PDF \u03C3\u03B5 Word +home.PDFToWord.desc=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03BF\u03C5 PDF \u03C3\u03B5 Word \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF (DOC, DOCX and ODT) +PDFToWord.tags=doc,docx,odt,word,transformation,format,conversion,office,microsoft,docfile + +home.PDFToPresentation.title=PDF \u03C3\u03B5 Powerpoint +home.PDFToPresentation.desc==\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03BF\u03C5 PDF \u03C3\u03B5 Powerpoint \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF (PPT, PPTX and ODP) +PDFToPresentation.tags=slides,show,office,microsoft + +home.PDFToText.title=PDF \u03C3\u03B5 RTF (\u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF) +home.PDFToText.desc=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03BF\u03C5 PDF \u03C3\u03B5 \u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF \u03AE \u03C3\u03B5 \u03BC\u03BF\u03C1\u03C6\u03AE RTF +PDFToText.tags=richformat,richtextformat,rich text format + +home.PDFToHTML.title=PDF \u03C3\u03B5 HTML +home.PDFToHTML.desc=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03BF\u03C5 PDF \u03C3\u03B5 \u03BC\u03BF\u03C1\u03C6\u03AE HTML +PDFToHTML.tags=web content,browser friendly + + +home.PDFToXML.title=PDF \u03C3\u03B5 XML +home.PDFToXML.desc=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03BF\u03C5 PDF \u03C3\u03B5 \u03BC\u03BF\u03C1\u03C6\u03AE XML +PDFToXML.tags=data-extraction,structured-content,interop,transformation,convert + +home.ScannerImageSplit.title= Detect/Split Scanned photos +home.ScannerImageSplit.desc=Splits multiple photos from within a photo/PDF +ScannerImageSplit.tags=separate,auto-detect,scans,multi-photo,organize + +home.sign.title=Sign +home.sign.desc=Adds signature to PDF by drawing, text or image +sign.tags=authorize,initials,drawn-signature,text-sign,image-signature + +home.flatten.title=Flatten +home.flatten.desc=Remove all interactive elements and forms from a PDF +flatten.tags=static,deactivate,non-interactive,streamline + +home.repair.title=Repair +home.repair.desc=Tries to repair a corrupt/broken PDF +repair.tags=fix,restore,correction,recover + +home.removeBlanks.title=Remove Blank pages +home.removeBlanks.desc=Detects and removes blank pages from a document +removeBlanks.tags=cleanup,streamline,non-content,organize + +home.compare.title=Compare +home.compare.desc=Compares and shows the differences between 2 PDF Documents +compare.tags=differentiate,contrast,changes,analysis + +home.certSign.title=Sign with Certificate +home.certSign.desc=Signs a PDF with a Certificate/Key (PEM/P12) +certSign.tags=authenticate,PEM,P12,official,encrypt + +home.pageLayout.title=Multi-Page Layout +home.pageLayout.desc=Merge multiple pages of a PDF document into a single page +pageLayout.tags=merge,composite,single-view,organize + +home.scalePages.title=Adjust page size/scale +home.scalePages.desc=Change the size/scale of a page and/or its contents. +scalePages.tags=resize,modify,dimension,adapt + +home.pipeline.title=Pipeline (Advanced) +home.pipeline.desc=Run multiple actions on PDFs by defining pipeline scripts +pipeline.tags=automate,sequence,scripted,batch-process + +home.add-page-numbers.title=Add Page Numbers +home.add-page-numbers.desc=Add Page numbers throughout a document in a set location +add-page-numbers.tags=paginate,label,organize,index + +home.auto-rename.title=Auto Rename PDF File +home.auto-rename.desc=Auto renames a PDF file based on its detected header +auto-rename.tags=auto-detect,header-based,organize,relabel + +home.adjust-contrast.title=Adjust Colors/Contrast +home.adjust-contrast.desc=Adjust Contrast, Saturation and Brightness of a PDF +adjust-contrast.tags=color-correction,tune,modify,enhance + +home.crop.title=Crop PDF +home.crop.desc=Crop a PDF to reduce its size (maintains text!) +crop.tags=trim,shrink,edit,shape + +home.autoSplitPDF.title=Auto Split Pages +home.autoSplitPDF.desc=Auto Split Scanned PDF with physical scanned page splitter QR Code +autoSplitPDF.tags=QR-based,separate,scan-segment,organize + +home.sanitizePdf.title=Sanitize +home.sanitizePdf.desc=Remove scripts and other elements from PDF files +sanitizePdf.tags=clean,secure,safe,remove-threats + +home.URLToPDF.title=URL/Website To PDF +home.URLToPDF.desc=Converts any http(s)URL to PDF +URLToPDF.tags=web-capture,save-page,web-to-doc,archive + +home.HTMLToPDF.title=HTML to PDF +home.HTMLToPDF.desc=Converts any HTML file or zip to PDF +HTMLToPDF.tags=markup,web-content,transformation,convert + + +home.MarkdownToPDF.title=Markdown to PDF +home.MarkdownToPDF.desc=Converts any Markdown file to PDF +MarkdownToPDF.tags=markup,web-content,transformation,convert + + +home.getPdfInfo.title=Get ALL Info on PDF +home.getPdfInfo.desc=Grabs any and all information possible on PDFs +getPdfInfo.tags=infomation,data,stats,statistics + + +home.extractPage.title=Extract page(s) +home.extractPage.desc=Extracts select pages from PDF +extractPage.tags=extract + + +home.PdfToSinglePage.title=PDF to Single Large Page +home.PdfToSinglePage.desc=Merges all PDF pages into one large single page +PdfToSinglePage.tags=single page + + +home.showJS.title=Show Javascript +home.showJS.desc=Searches and displays any JS injected into a PDF +showJS.tags=JS + +home.autoRedact.title=Auto Redact +home.autoRedact.desc=Auto Redacts(Blacks out) text in a PDF based on input text +showJS.tags=Redact,Hide,black out,black,marker,hidden + +########################### +# # +# WEB PAGES # +# # +########################### +#login +login.title=Sign in +login.signin=Sign in +login.rememberme=Remember me +login.invalid=Invalid username or password. +login.locked=Your account has been locked. +login.signinTitle=Please sign in + + +#auto-redact +autoRedact.title=Auto Redact +autoRedact.header=Auto Redact +autoRedact.colorLabel=Colour +autoRedact.textsToRedactLabel=Text to Redact (line-separated) +autoRedact.textsToRedactPlaceholder=e.g. \nConfidential \nTop-Secret +autoRedact.useRegexLabel=Use Regex +autoRedact.wholeWordSearchLabel=Whole Word Search +autoRedact.customPaddingLabel=Custom Extra Padding +autoRedact.convertPDFToImageLabel=Convert PDF to PDF-Image (Used to remove text behind the box) +autoRedact.submitButton=Submit + + +#showJS +showJS.title=Show Javascript +showJS.header=Show Javascript +showJS.downloadJS=Download Javascript +showJS.submit=Show + + +#pdfToSinglePage +pdfToSinglePage.title=PDF To Single Page +pdfToSinglePage.header=PDF To Single Page +pdfToSinglePage.submit=Convert To Single Page + + +#pageExtracter +pageExtracter.title=Extract Pages +pageExtracter.header=Extract Pages +pageExtracter.submit=Extract + + +#getPdfInfo +getPdfInfo.title=Get Info on PDF +getPdfInfo.header=Get Info on PDF +getPdfInfo.submit=Get Info +getPdfInfo.downloadJson=Download JSON + + +#markdown-to-pdf +MarkdownToPDF.title=Markdown To PDF +MarkdownToPDF.header=Markdown To PDF +MarkdownToPDF.submit=Convert +MarkdownToPDF.help=Work in progress +MarkdownToPDF.credit=Uses WeasyPrint + + + +#url-to-pdf +URLToPDF.title=URL To PDF +URLToPDF.header=URL To PDF +URLToPDF.submit=Convert +URLToPDF.credit=Uses WeasyPrint + + +#html-to-pdf +HTMLToPDF.title=HTML To PDF +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 + + +#sanitizePDF +sanitizePDF.title=Sanitize PDF +sanitizePDF.header=Sanitize a PDF file +sanitizePDF.selectText.1=Remove JavaScript actions +sanitizePDF.selectText.2=Remove embedded files +sanitizePDF.selectText.3=Remove metadata +sanitizePDF.selectText.4=Remove links +sanitizePDF.selectText.5=Remove fonts +sanitizePDF.submit=Sanitize PDF + + +#addPageNumbers +addPageNumbers.title=Add Page Numbers +addPageNumbers.header=Add Page Numbers +addPageNumbers.selectText.1=Select PDF file: +addPageNumbers.selectText.2=Margin Size +addPageNumbers.selectText.3=Position +addPageNumbers.selectText.4=Starting Number +addPageNumbers.selectText.5=Pages to Number +addPageNumbers.selectText.6=Custom Text +addPageNumbers.customTextDesc=Custom Text +addPageNumbers.numberPagesDesc=Which pages to number, default 'all', also accepts 1-5 or 2,5,9 etc +addPageNumbers.customNumberDesc=Defaults to {n}, also accepts 'Page {n} of {total}', 'Text-{n}', '{filename}-{n} +addPageNumbers.submit=Add Page Numbers + + +#auto-rename +auto-rename.title=Auto Rename +auto-rename.header=Auto Rename PDF +auto-rename.submit=Auto Rename + + +#adjustContrast +adjustContrast.title=Adjust Contrast +adjustContrast.header=Adjust Contrast +adjustContrast.contrast=Contrast: +adjustContrast.brightness=Brightness: +adjustContrast.saturation=Saturation: +adjustContrast.download=Download + + +#crop +crop.title=Crop +crop.header=Crop Image +crop.submit=Submit + + +#autoSplitPDF +autoSplitPDF.title=Auto Split PDF +autoSplitPDF.header=Auto Split PDF +autoSplitPDF.description=Print, Insert, Scan, upload, and let us auto-separate your documents. No manual work sorting needed. +autoSplitPDF.selectText.1=Print out some divider sheets from below (Black and white is fine). +autoSplitPDF.selectText.2=Scan all your documents at once by inserting the divider sheet between them. +autoSplitPDF.selectText.3=Upload the single large scanned PDF file and let Stirling PDF handle the rest. +autoSplitPDF.selectText.4=Divider pages are automatically detected and removed, guaranteeing a neat final document. +autoSplitPDF.formPrompt=Submit PDF containing Stirling-PDF Page dividers: +autoSplitPDF.duplexMode=Duplex Mode (Front and back scanning) +autoSplitPDF.dividerDownload1=Download 'Auto Splitter Divider (minimal).pdf' +autoSplitPDF.dividerDownload2=Download 'Auto Splitter Divider (with instructions).pdf' +autoSplitPDF.submit=Submit + + +#pipeline +pipeline.title=Pipeline + + +#pageLayout +pageLayout.title=Multi Page Layout +pageLayout.header=Multi Page Layout +pageLayout.pagesPerSheet=Pages per sheet: +pageLayout.addBorder=Add Borders +pageLayout.submit=Submit + + +#scalePages +scalePages.title=Adjust page-scale +scalePages.header=Adjust page-scale +scalePages.pageSize=Size of a page of the document. +scalePages.scaleFactor=Zoom level (crop) of a page. +scalePages.submit=Submit + + +#certSign +certSign.title=Certificate Signing +certSign.header=Sign a PDF with your certificate (Work in progress) +certSign.selectPDF=Select a PDF File for Signing: +certSign.selectKey=Select Your Private Key File (PKCS#8 format, could be .pem or .der): +certSign.selectCert=Select Your Certificate File (X.509 format, could be .pem or .der): +certSign.selectP12=Select Your PKCS#12 Keystore File (.p12 or .pfx) (Optional, If provided, it should contain your private key and certificate): +certSign.certType=Certificate Type +certSign.password=Enter Your Keystore or Private Key Password (If Any): +certSign.showSig=Show Signature +certSign.reason=Reason +certSign.location=Location +certSign.name=Name +certSign.submit=Sign PDF + + +#removeBlanks +removeBlanks.title=Remove Blanks +removeBlanks.header=Remove Blank Pages +removeBlanks.threshold=Pixel Whiteness Threshold: +removeBlanks.thresholdDesc=Threshold for determining how white a white pixel must be to be classed as 'White'. 0 = Black, 255 pure white. +removeBlanks.whitePercent=White Percent (%): +removeBlanks.whitePercentDesc=Percent of page that must be 'white' pixels to be removed +removeBlanks.submit=Remove Blanks + + +#compare +compare.title=Compare +compare.header=Compare PDFs +compare.document.1=Document 1 +compare.document.2=Document 2 +compare.submit=Compare + + +#sign +sign.title=Sign +sign.header=Sign PDFs +sign.upload=Upload Image +sign.draw=Draw Signature +sign.text=Text Input +sign.clear=Clear +sign.add=Add + + +#repair +repair.title=Repair +repair.header=Repair PDFs +repair.submit=Repair + + +#flatten +flatten.title=Flatten +flatten.header=Flatten PDFs +flatten.submit=Flatten + + +#ScannerImageSplit +ScannerImageSplit.selectText.1=Angle Threshold: +ScannerImageSplit.selectText.2=Sets the minimum absolute angle required for the image to be rotated (default: 10). +ScannerImageSplit.selectText.3=Tolerance: +ScannerImageSplit.selectText.4=Determines the range of color variation around the estimated background color (default: 30). +ScannerImageSplit.selectText.5=Minimum Area: +ScannerImageSplit.selectText.6=Sets the minimum area threshold for a photo (default: 10000). +ScannerImageSplit.selectText.7=Minimum Contour Area: +ScannerImageSplit.selectText.8=Sets the minimum contour area threshold for a photo +ScannerImageSplit.selectText.9=Border Size: +ScannerImageSplit.selectText.10=Sets the size of the border added and removed to prevent white borders in the output (default: 1). + + +#OCR +ocr.title=OCR / Scan Cleanup +ocr.header=Cleanup Scans / OCR (Optical Character Recognition) +ocr.selectText.1=Select languages that are to be detected within the PDF (Ones listed are the ones currently detected): +ocr.selectText.2=Produce text file containing OCR text alongside the OCR'ed PDF +ocr.selectText.3=Correct pages were scanned at a skewed angle by rotating them back into place +ocr.selectText.4=Clean page so its less likely that OCR will find text in background noise. (No output change) +ocr.selectText.5=Clean page so its less likely that OCR will find text in background noise, maintains cleanup in output. +ocr.selectText.6=Ignores pages that have interactive text on them, only OCRs pages that are images +ocr.selectText.7=Force OCR, will OCR Every page removing all original text elements +ocr.selectText.8=Normal (Will error if PDF contains text) +ocr.selectText.9=Additional Settings +ocr.selectText.10=OCR Mode +ocr.selectText.11=Remove images after OCR (Removes ALL images, only useful if part of conversion step) +ocr.selectText.12=Render Type (Advanced) +ocr.help=Please read this documentation on how to use this for other languages and/or use not in docker +ocr.credit=This service uses OCRmyPDF and Tesseract for OCR. +ocr.submit=Process PDF with OCR + + +#extractImages +extractImages.title=Extract Images +extractImages.header=Extract Images +extractImages.selectText=Select image format to convert extracted images to +extractImages.submit=Extract + + +#File to PDF +fileToPDF.title=File to PDF +fileToPDF.header=Convert any file to PDF +fileToPDF.credit=This service uses LibreOffice and Unoconv for file conversion. +fileToPDF.supportedFileTypes=Supported file types should include the below however for a full updated list of supported formats, please refer to the LibreOffice documentation +fileToPDF.submit=Convert to PDF + + +#compress +compress.title=Compress +compress.header=Compress PDF +compress.credit=This service uses Ghostscript for PDF Compress/Optimisation. +compress.selectText.1=Manual Mode - From 1 to 4 +compress.selectText.2=Optimization level: +compress.selectText.3=4 (Terrible for text images) +compress.selectText.4=Auto mode - Auto adjusts quality to get PDF to exact size +compress.selectText.5=Expected PDF Size (e.g. 25MB, 10.8MB, 25KB) +compress.submit=Compress + + +#Add image +addImage.title=Add Image +addImage.header=Add image to PDF +addImage.everyPage=Every Page? +addImage.upload=Add image +addImage.submit=Add image + + +#merge +merge.title=Merge +merge.header=Merge multiple PDFs (2+) +merge.sortByName=Sort by name +merge.sortByDate=Sort by date +merge.submit=Merge + + +#pdfOrganiser +pdfOrganiser.title=Page Organiser +pdfOrganiser.header=PDF Page Organiser +pdfOrganiser.submit=Rearrange Pages + + +#multiTool +multiTool.title=PDF Multi Tool +multiTool.header=PDF Multi Tool + + +#pageRemover +pageRemover.title=Page Remover +pageRemover.header=PDF Page remover +pageRemover.pagesToDelete=Pages to delete (Enter a comma-separated list of page numbers) : +pageRemover.submit=Delete Pages + + +#rotate +rotate.title=Rotate PDF +rotate.header=Rotate PDF +rotate.selectAngle=Select rotation angle (in multiples of 90 degrees): +rotate.submit=Rotate + + +#merge +split.title=Split PDF +split.header=Split PDF +split.desc.1=The numbers you select are the page number you wish to do a split on +split.desc.2=As such selecting 1,3,7-8 would split a 10 page document into 6 separate PDFS with: +split.desc.3=Document #1: Page 1 +split.desc.4=Document #2: Page 2 and 3 +split.desc.5=Document #3: Page 4, 5 and 6 +split.desc.6=Document #4: Page 7 +split.desc.7=Document #5: Page 8 +split.desc.8=Document #6: Page 9 and 10 +split.splitPages=Enter pages to split on: +split.submit=Split + + +#merge +imageToPDF.title=Image to PDF +imageToPDF.header=Image to PDF +imageToPDF.submit=Convert +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios +imageToPDF.selectText.2=Auto rotate PDF +imageToPDF.selectText.3=Multi file logic (Only enabled if working with multiple images) +imageToPDF.selectText.4=Merge into single PDF +imageToPDF.selectText.5=Convert to separate PDFs + + +#pdfToImage +pdfToImage.title=PDF to Image +pdfToImage.header=PDF to Image +pdfToImage.selectText=Image Format +pdfToImage.singleOrMultiple=Page to Image result type +pdfToImage.single=Single Big Image Combing all pages +pdfToImage.multi=Multiple Images, one image per page +pdfToImage.colorType=Colour type +pdfToImage.color=Colour +pdfToImage.grey=Greyscale +pdfToImage.blackwhite=Black and White (May lose data!) +pdfToImage.submit=Convert + + +#addPassword +addPassword.title=Add Password +addPassword.header=Add password (Encrypt) +addPassword.selectText.1=Select PDF to encrypt +addPassword.selectText.2=User Password +addPassword.selectText.3=Encryption Key Length +addPassword.selectText.4=Higher values are stronger, but lower values have better compatibility. +addPassword.selectText.5=Permissions to set (Recommended to be used along with Owner password) +addPassword.selectText.6=Prevent assembly of document +addPassword.selectText.7=Prevent content extraction +addPassword.selectText.8=Prevent extraction for accessibility +addPassword.selectText.9=Prevent filling in form +addPassword.selectText.10=Prevent modification +addPassword.selectText.11=Prevent annotation modification +addPassword.selectText.12=Prevent printing +addPassword.selectText.13=Prevent printing different formats +addPassword.selectText.14=Owner Password +addPassword.selectText.15=Restricts what can be done with the document once it is opened (Not supported by all readers) +addPassword.selectText.16=Restricts the opening of the document itself +addPassword.submit=Encrypt + + +#watermark +watermark.title=Add Watermark +watermark.header=Add Watermark +watermark.selectText.1=Select PDF to add watermark to: +watermark.selectText.2=Watermark Text: +watermark.selectText.3=Font Size: +watermark.selectText.4=Rotation (0-360): +watermark.selectText.5=widthSpacer (Space between each watermark horizontally): +watermark.selectText.6=heightSpacer (Space between each watermark vertically): +watermark.selectText.7=Opacity (0% - 100%): +watermark.selectText.8=Watermark Type: +watermark.selectText.9=Watermark Image: +watermark.submit=Add Watermark + + +#Change permissions +permissions.title=Change Permissions +permissions.header=Change Permissions +permissions.warning=Warning to have these permissions be unchangeable it is recommended to set them with a password via the add-password page +permissions.selectText.1=Select PDF to change permissions +permissions.selectText.2=Permissions to set +permissions.selectText.3=Prevent assembly of document +permissions.selectText.4=Prevent content extraction +permissions.selectText.5=Prevent extraction for accessibility +permissions.selectText.6=Prevent filling in form +permissions.selectText.7=Prevent modification +permissions.selectText.8=Prevent annotation modification +permissions.selectText.9=Prevent printing +permissions.selectText.10=Prevent printing different formats +permissions.submit=Change + + +#remove password +removePassword.title=Remove password +removePassword.header=Remove password (Decrypt) +removePassword.selectText.1=Select PDF to Decrypt +removePassword.selectText.2=Password +removePassword.submit=Remove + + +#changeMetadata +changeMetadata.title=Change Metadata +changeMetadata.header=Change Metadata +changeMetadata.selectText.1=Please edit the variables you wish to change +changeMetadata.selectText.2=Delete all metadata +changeMetadata.selectText.3=Show Custom Metadata: +changeMetadata.author=Author: +changeMetadata.creationDate=Creation Date (yyyy/MM/dd HH:mm:ss): +changeMetadata.creator=Creator: +changeMetadata.keywords=Keywords: +changeMetadata.modDate=Modification Date (yyyy/MM/dd HH:mm:ss): +changeMetadata.producer=Producer: +changeMetadata.subject=Subject: +changeMetadata.title=Title: +changeMetadata.trapped=Trapped: +changeMetadata.selectText.4=Other Metadata: +changeMetadata.selectText.5=Add Custom Metadata Entry +changeMetadata.submit=Change + + +#pdfToPDFA +pdfToPDFA.title=PDF To PDF/A +pdfToPDFA.header=PDF To PDF/A +pdfToPDFA.credit=This service uses OCRmyPDF for PDF/A conversion +pdfToPDFA.submit=Convert + + +#PDFToWord +PDFToWord.title=PDF to Word +PDFToWord.header=PDF to Word +PDFToWord.selectText.1=Output file format +PDFToWord.credit=This service uses LibreOffice for file conversion. +PDFToWord.submit=Convert + + +#PDFToPresentation +PDFToPresentation.title=PDF to Presentation +PDFToPresentation.header=PDF to Presentation +PDFToPresentation.selectText.1=Output file format +PDFToPresentation.credit=This service uses LibreOffice for file conversion. +PDFToPresentation.submit=Convert + + +#PDFToText +PDFToText.title=PDF to RTF (Text) +PDFToText.header=PDF to RTF (Text) +PDFToText.selectText.1=Output file format +PDFToText.credit=This service uses LibreOffice for file conversion. +PDFToText.submit=Convert + + +#PDFToHTML +PDFToHTML.title=PDF to HTML +PDFToHTML.header=PDF to HTML +PDFToHTML.credit=This service uses LibreOffice for file conversion. +PDFToHTML.submit=Convert + + +#PDFToXML +PDFToXML.title=PDF to XML +PDFToXML.header=PDF to XML +PDFToXML.credit=This service uses LibreOffice for file conversion. +PDFToXML.submit=Convert \ No newline at end of file diff --git a/src/main/resources/static/images/flags/gr.svg b/src/main/resources/static/images/flags/gr.svg new file mode 100644 index 00000000..599741ee --- /dev/null +++ b/src/main/resources/static/images/flags/gr.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/fragments/languages.html b/src/main/resources/templates/fragments/languages.html index f8a79eef..1ebed837 100644 --- a/src/main/resources/templates/fragments/languages.html +++ b/src/main/resources/templates/fragments/languages.html @@ -1,7 +1,7 @@ icon Български - + icon العربية @@ -56,4 +56,7 @@ icon 日本語 + + icon Ελληνικά + From bdeb6bf188c5edd39d459588132441d7f2820641 Mon Sep 17 00:00:00 2001 From: wood chen <95951386+woodchen-ink@users.noreply.github.com> Date: Sat, 7 Oct 2023 22:58:34 +0800 Subject: [PATCH 41/57] Update messages_zh_CN.properties --- src/main/resources/messages_zh_CN.properties | 674 +++++++++---------- 1 file changed, 332 insertions(+), 342 deletions(-) diff --git a/src/main/resources/messages_zh_CN.properties b/src/main/resources/messages_zh_CN.properties index bf6aede0..8a3554a9 100644 --- a/src/main/resources/messages_zh_CN.properties +++ b/src/main/resources/messages_zh_CN.properties @@ -12,30 +12,30 @@ genericSubmit=提交 processTimeWarning=警告:此过程可能需要多达一分钟,具体时间取决于文件大小 pageOrderPrompt=页面顺序(输入逗号分隔的页码列表): goToPage=到 -true=True -false=False +true=对 +false=错 unknown=未知 save=保存 close=关闭 -filesSelected=\u9009\u62E9\u7684\u6587\u4EF6 -noFavourites=\u6CA1\u6709\u6DFB\u52A0\u6536\u85CF\u5939 -bored=\u65E0\u804A\u7B49\u5F85\uFF1F -alphabet=\u5B57\u6BCD\u8868 -downloadPdf=\u4E0B\u8F7DPDF -text=\u6587\u672C -font=\u5B57\u4F53 +filesSelected=选中的文件 +noFavourites=没有添加收藏夹 +bored=无聊等待吗? +alphabet=字母表 +downloadPdf=下载PDF +text=文本 +font=字体 selectFillter=-- 选择-- pageNum=页码 -sizes.small=Small -sizes.medium=Medium -sizes.large=Large -sizes.x-large=X-Large -error.pdfPassword=The PDF Document is passworded and either the password was not provided or was incorrect -delete=Delete -username=Username -password=Password -welcome=Welcome -property=Property +sizes.small=小型尺寸 +sizes.medium=中型尺寸 +sizes.large=大型尺寸 +sizes.x-large=稍大型尺寸 +error.pdfPassword=PDF 文档有密码,未提供密码或密码不正确 +delete=删除 +username=用户名 +password=密码 +welcome=欢迎 +property=资产 black=Black white=White red=Red @@ -43,11 +43,11 @@ green=Green blue=Blue custom=Custom... -changedCredsMessage=Credentials changed! -notAuthenticatedMessage=User not authenticated. -userNotFoundMessage=User not found. -incorrectPasswordMessage=Current password is incorrect. -usernameExistsMessage=New Username already exists. +changedCredsMessage=凭证已更改! +notAuthenticatedMessage=用户未经过身份验证。 +userNotFoundMessage=未找到用户。 +incorrectPasswordMessage=当前密码不正确。 +usernameExistsMessage=新用户名已存在。 @@ -72,264 +72,254 @@ settings.downloadOption.1=在同一窗口打开 settings.downloadOption.2=在新窗口中打开 settings.downloadOption.3=下载文件 settings.zipThreshold=当下载的文件数量超过限制时,将文件压缩。 -settings.signOut=Sign Out -settings.accountSettings=Account Settings +settings.signOut=登出 +settings.accountSettings=帐号设定 -changeCreds.title=Change Credentials -changeCreds.header=Update Your Account Details -changeCreds.changeUserAndPassword=You are using default login credentials. Please enter a new password (and username if wanted) -changeCreds.newUsername=New Username -changeCreds.oldPassword=Current Password -changeCreds.newPassword=New Password -changeCreds.confirmNewPassword=Confirm New Password -changeCreds.submit=Submit Changes +changeCreds.title=更改凭证 +changeCreds.header=更新您的账户详情 +changeCreds.changeUserAndPassword=您正在使用默认登录凭据。请输入新密码(如果需要,还可以输入新用户名) +changeCreds.newUsername=新用户名 +changeCreds.oldPassword=当前密码 +changeCreds.newPassword=新密码 +changeCreds.confirmNewPassword=确认新密码 +changeCreds.submit=提交更改 -account.title=Account Settings -account.accountSettings=Account Settings -account.adminSettings=Admin Settings - View and Add Users -account.userControlSettings=User Control Settings -account.changeUsername=Change Username -account.changeUsername=Change Username -account.password=Confirmation Password -account.oldPassword=Old password -account.newPassword=New Password -account.changePassword=Change Password -account.confirmNewPassword=Confirm New Password -account.signOut=Sign Out -account.yourApiKey=Your API Key -account.syncTitle=Sync browser settings with Account -account.settingsCompare=Settings Comparison: -account.property=Property -account.webBrowserSettings=Web Browser Setting -account.syncToBrowser=Sync Account -> Browser -account.syncToAccount=Sync Account <- Browser +account.title=帐号设定 +account.accountSettings=帐号设定 +account.adminSettings=管理员设置 - 查看和添加用户 +account.userControlSettings=用户控制设置 +account.changeUsername=更改用户名 +account.password=确认密码 +account.oldPassword=旧密码 +account.newPassword=新密码 +account.changePassword=更改密码 +account.confirmNewPassword=确认新密码 +account.signOut=退出登录 +account.yourApiKey=您的 API 密钥 +account.syncTitle=将浏览器设置与账户同步 +account.settingsCompare=设置比较: +account.property=属性 +account.webBrowserSettings=Web 浏览器设置 +account.syncToBrowser=同步账户 -> 浏览器 +account.syncToAccount=同步账户 <- 浏览器 -adminUserSettings.title=User Control Settings -adminUserSettings.header=Admin User Control Settings -adminUserSettings.admin=Admin -adminUserSettings.user=User -adminUserSettings.addUser=Add New User -adminUserSettings.roles=Roles -adminUserSettings.role=Role -adminUserSettings.actions=Actions -adminUserSettings.apiUser=Limited API User -adminUserSettings.webOnlyUser=Web Only User -adminUserSettings.forceChange=Force user to change username/password on login -adminUserSettings.submit=Save User +adminUserSettings.title=用户控制设置 +adminUserSettings.header=管理员用户控制设置 +adminUserSettings.admin=管理员 +adminUserSettings.user=用户 +adminUserSettings.addUser=添加新用户 +adminUserSettings.roles=角色 +adminUserSettings.role=角色 +adminUserSettings.actions=操作 +adminUserSettings.apiUser=有限 API 用户 +adminUserSettings.webOnlyUser=仅限 Web 用户 +adminUserSettings.forceChange=强制用户在登录时更改用户名/密码 +adminUserSettings.submit=保存用户 ############# # HOME-PAGE # ############# -home.desc=您的本地托管一站式服务,满足您的所有PDF需求。 +home.desc=CZL一站式服务,满足您的所有PDF需求。 home.multiTool.title=PDF多功能工具 home.multiTool.desc=合并、旋转、重新排列和删除PDF页面 -multiTool.tags=Multi Tool,Multi operation,UI,click drag,front end,client side +multiTool.tags=多工具,多操作,用户界面,点击拖动,前端,客户端 home.merge.title=合并 home.merge.desc=轻松合并多个PDF为一个。 -merge.tags=merge,Page operations,Back end,server side +merge.tags=合并,页面操作,后端,服务器端 home.split.title=拆分 home.split.desc=将 PDF 拆分为多个文档。 -split.tags=Page operations,divide,Multi Page,cut,server side +split.tags=页面操作,划分,多页面,剪切,服务器端 home.rotate.title=旋转 home.rotate.desc=旋转PDF。 -rotate.tags=server side +rotate.tags=服务器端 home.imageToPdf.title=转换图像到PDF -home.imageToPdf.desc=转换图像(PNG, JPEG, GIF)到 PDF。 -imageToPdf.tags=conversion,img,jpg,picture,photo +home.imageToPdf.desc=将图像(PNG、JPEG、GIF)转换为PDF。 +imageToPdf.tags=转换、图像、JPG、图片、照片 home.pdfToImage.title=转换PDF到图像 -home.pdfToImage.desc=转换PDF到图像(PNG, JPEG, GIF) -pdfToImage.tags=conversion,img,jpg,picture,photo +home.pdfToImage.desc=将PDF转换为图像(PNG、JPEG、GIF)。 +pdfToImage.tags=转换、图像、JPG、图片、照片 home.pdfOrganiser.title=整理 -home.pdfOrganiser.desc=按任何顺序删除/重新排列页面。 -pdfOrganiser.tags=duplex,even,odd,sort,move - +home.pdfOrganiser.desc=按任意顺序删除/重新排列页面。 +pdfOrganiser.tags=双面、偶数、奇数、排序、移动 home.addImage.title=在PDF中添加图片 -home.addImage.desc=将图像添加到PDF的设定位置上 -addImage.tags=img,jpg,picture,photo +home.addImage.desc=将图像添加到PDF的指定位置。 +addImage.tags=图像、JPG、图片、照片 home.watermark.title=添加水印 -home.watermark.desc=在PDF中添加一个自定义的水印。 -watermark.tags=Text,repeating,label,own,copyright,trademark,img,jpg,picture,photo +home.watermark.desc=在PDF中添加自定义水印。 +watermark.tags=文本、重复、标签、自定义、版权、商标、图像、JPG、图片、照片 home.permissions.title=更改权限 -home.permissions.desc=改变你的PDF文档的权限。 -permissions.tags=read,write,edit,print - +home.permissions.desc=更改PDF文档的权限。 +permissions.tags=阅读、写入、编辑、打印 home.removePages.title=删除 -home.removePages.desc=从你的PDF文档中删除不需要的页面。 -removePages.tags=Remove pages,delete pages +home.removePages.desc=从PDF文档中删除不需要的页面。 +removePages.tags=删除页面、删除 home.addPassword.title=添加密码 -home.addPassword.desc=用密码来加密你的PDF文档。 -addPassword.tags=secure,security +home.addPassword.desc=使用密码对PDF文档进行加密。 +addPassword.tags=安全、密码、加密 home.removePassword.title=删除密码 -home.removePassword.desc=从你的PDF文档中移除密码保护。 -removePassword.tags=secure,Decrypt,security,unpassword,delete password +home.removePassword.desc=从PDF文档中移除密码保护。 +removePassword.tags=安全、解密、密码、安全性、删除密码 home.compressPdfs.title=压缩 -home.compressPdfs.desc=压缩PDF文件以减少其文件大小。 -compressPdfs.tags=squish,small,tiny - +home.compressPdfs.desc=压缩PDF文件以减小文件大小。 +compressPdfs.tags=压缩、小、微小 home.changeMetadata.title=更改元数据 home.changeMetadata.desc=更改/删除/添加PDF文档的元数据。 -changeMetadata.tags==Title,author,date,creation,time,publisher,producer,stats +changeMetadata.tags=标题、作者、日期、创建、时间、发布者、制作人、统计数据 home.fileToPDF.title=将文件转换为PDF文件 -home.fileToPDF.desc=将几乎所有文件转换为PDF(DOCX、PNG、XLS、PPT、TXT等) -fileToPDF.tags=transformation,format,document,picture,slide,text,conversion,office,docs,word,excel,powerpoint +home.fileToPDF.desc=将几乎所有文件转换为PDF(DOCX、PNG、XLS、PPT、TXT等)。 +fileToPDF.tags=转换、格式、文档、图片、幻灯片、文本、转换、办公室、文档、Word、Excel、PowerPoint home.ocr.title=运行OCR/清理扫描 -home.ocr.desc=清理和检测PDF中的文本图像,并将其重新添加为文本。 -ocr.tags=recognition,text,image,scan,read,identify,detection,editable +home.ocr.desc=清理和识别PDF中的图像文本,并将其转换为可编辑文本。 +ocr.tags=识别、文本、图像、扫描、阅读、识别、检测、可编辑 home.extractImages.title=提取图像 -home.extractImages.desc=从PDF中提取所有的图像并将其保存到压缩包中。 -extractImages.tags=picture,photo,save,archive,zip,capture,grab +home.extractImages.desc=从PDF中提取所有图像并保存到压缩包中。 +extractImages.tags=图片、照片、保存、归档、压缩包、截取、抓取 home.pdfToPDFA.title=PDF To PDF/A -home.pdfToPDFA.desc=将PDF转换为PDF/A以便长期保存 -pdfToPDFA.tags=archive,long-term,standard,conversion,storage,preservation +home.pdfToPDFA.desc=将PDF转换为PDF/A以进行长期保存。 +pdfToPDFA.tags=归档、长期、标准、转换、存储、保存 -home.PDFToWord.title=PDF to Word +home.PDFToWord.title=PDF转Word home.PDFToWord.desc=将PDF转换为Word格式(DOC、DOCX和ODT)。 -PDFToWord.tags=doc,docx,odt,word,transformation,format,conversion,office,microsoft,docfile +PDFToWord.tags=doc、docx、odt、word、转换、格式、办公、Microsoft、文档 -home.PDFToPresentation.title=PDF To Presentation -home.PDFToPresentation.desc=将PDF转换成演示文稿格式(PPT、PPTX和ODP)。 -PDFToPresentation.tags=slides,show,office,microsoft +home.PDFToPresentation.title=PDF转演示文稿 +home.PDFToPresentation.desc=将PDF转换为演示文稿格式(PPT、PPTX和ODP)。 +PDFToPresentation.tags=幻灯片、展示、办公、Microsoft -home.PDFToText.title=PDF to RTF (Text) -home.PDFToText.desc=将PDF转换为文本或RTF格式 -PDFToText.tags=richformat,richtextformat,rich text format +home.PDFToText.title=PDF转RTF(文本) +home.PDFToText.desc=将PDF转换为文本或RTF格式。 +PDFToText.tags=富文本格式、RTF、富文本格式 -home.PDFToHTML.title=PDF To HTML -home.PDFToHTML.desc=将PDF转换为HTML格式 -PDFToHTML.tags=web content,browser friendly +home.PDFToHTML.title=PDF转HTML +home.PDFToHTML.desc=将PDF转换为HTML格式。 +PDFToHTML.tags=网页内容、浏览器友好 +home.PDFToXML.title=PDF转XML +home.PDFToXML.desc=将PDF转换为XML格式。 +PDFToXML.tags=数据提取、结构化内容、互操作、转换 -home.PDFToXML.title=PDF To XML -home.PDFToXML.desc=将PDF转换为XML格式 -PDFToXML.tags=data-extraction,structured-content,interop,transformation,convert +home.ScannerImageSplit.title=检测/分割扫描图像 +home.ScannerImageSplit.desc=从一张照片或PDF中分割出多张照片。 +ScannerImageSplit.tags=分离、自动检测、扫描、多张照片、整理 -home.ScannerImageSplit.title=检测/分割扫描的照片 -home.ScannerImageSplit.desc=从一张照片/PDF中分割出多张照片 -ScannerImageSplit.tags=separate,auto-detect,scans,multi-photo,organize +home.sign.title=标志 +home.sign.desc=通过绘图、文字或图像向PDF添加签名 +sign.tags=授权、缩写、手绘签名、文本签名、图像签名 -home.sign.title=\u6807\u5FD7 -home.sign.desc=\u901A\u8FC7\u7ED8\u56FE\u3001\u6587\u672C\u6216\u56FE\u50CF\u5411 PDF \u6DFB\u52A0\u7B7E\u540D -sign.tags=authorize,initials,drawn-signature,text-sign,image-signature +home.flatten.title=展平 +home.flatten.desc=从PDF中删除所有互动元素和表单 +flatten.tags=静态、停用、非交互、简化 -home.flatten.title=\u5C55\u5E73 -home.flatten.desc=\u4ECE PDF \u4E2D\u5220\u9664\u6240\u6709\u4EA4\u4E92\u5143\u7D20\u548C\u8868\u5355 -flatten.tags=static,deactivate,non-interactive,streamline +home.repair.title=修复 +home.repair.desc=尝试修复损坏/损坏的PDF +repair.tags=修复、恢复、纠正、恢复 -home.repair.title=\u4FEE\u590D -home.repair.desc=\u5C1D\u8BD5\u4FEE\u590D\u635F\u574F/\u635F\u574F\u7684 PDF -repair.tags=fix,restore,correction,recover +home.removeBlanks.title=删除空白页 +home.removeBlanks.desc=检测并删除文档中的空白页 +removeBlanks.tags=清理、简化、非内容、整理 -home.removeBlanks.title=\u5220\u9664\u7A7A\u767D\u9875 -home.removeBlanks.desc=\u68C0\u6D4B\u5E76\u5220\u9664\u6587\u6863\u4E2D\u7684\u7A7A\u767D\u9875 -removeBlanks.tags=cleanup,streamline,non-content,organize +home.compare.title=比较 +home.compare.desc=比较并显示两个PDF文档之间的差异 +compare.tags=区分、对比、更改、分析 -home.compare.title=\u6BD4\u8F83 -home.compare.desc=\u6BD4\u8F83\u5E76\u663E\u793A 2 \u4E2A PDF \u6587\u6863\u4E4B\u95F4\u7684\u5DEE\u5F02 -compare.tags=differentiate,contrast,changes,analysis +home.certSign.title=使用证书签署 +home.certSign.desc=使用证书/密钥(PEM/P12)对PDF进行签署 +certSign.tags=身份验证、PEM、P12、官方、加密 -home.certSign.title=Sign with Certificate -home.certSign.desc=Signs a PDF with a Certificate/Key (PEM/P12) -certSign.tags=authenticate,PEM,P12,official,encrypt +home.pageLayout.title=多页布局 +home.pageLayout.desc=将PDF文档的多个页面合并成一页 +pageLayout.tags=合并、组合、单视图、整理 -home.pageLayout.title=Multi-Page Layout -home.pageLayout.desc=Merge multiple pages of a PDF document into a single page -pageLayout.tags=merge,composite,single-view,organize +home.scalePages.title=调整页面尺寸/缩放 +home.scalePages.desc=调整页面及/或其内容的尺寸/缩放 +scalePages.tags=调整大小、修改、尺寸、适应 -home.scalePages.title=Adjust page size/scale -home.scalePages.desc=Change the size/scale of page and/or its contents. -scalePages.tags=resize,modify,dimension,adapt +home.pipeline.title=管道(高级版) +home.pipeline.desc=通过定义管道脚本在PDF上运行多个操作 +pipeline.tags=自动化、顺序、脚本化、批处理 -home.pipeline.title=Pipeline (Advanced) -home.pipeline.desc=Run multiple actions on PDFs by defining pipeline scripts -pipeline.tags=automate,sequence,scripted,batch-process +home.add-page-numbers.title=添加页码 +home.add-page-numbers.desc=在文档的指定位置添加页码 +add-page-numbers.tags=分页、标签、整理、索引 -home.add-page-numbers.title=Add Page Numbers -home.add-page-numbers.desc=Add Page numbers throughout a document in a set location -add-page-numbers.tags=paginate,label,organize,index +home.auto-rename.title=自动重命名PDF文件 +home.auto-rename.desc=根据检测到的标题自动对PDF文件进行重命名 +auto-rename.tags=自动检测、基于标题、整理、重新标记 -home.auto-rename.title=Auto Rename PDF File -home.auto-rename.desc=Auto renames a PDF file based on its detected header -auto-rename.tags=auto-detect,header-based,organize,relabel +home.adjust-contrast.title=调整颜色/对比度 +home.adjust-contrast.desc=调整PDF的对比度、饱和度和亮度 +adjust-contrast.tags=颜色校正、调节、修改、增强 -home.adjust-contrast.title=Adjust Colors/Contrast -home.adjust-contrast.desc=Adjust Contrast, Saturation and Brightness of a PDF -adjust-contrast.tags=color-correction,tune,modify,enhance +home.crop.title=裁剪PDF +home.crop.desc=裁剪PDF以减小其文件大小(保留文本!) +crop.tags=修剪、缩小、编辑、形状 -home.crop.title=Crop PDF -home.crop.desc=Crop a PDF to reduce its size (maintains text!) -crop.tags=trim,shrink,edit,shape +home.autoSplitPDF.title=自动拆分页面 +home.autoSplitPDF.desc=使用物理扫描页面分割器QR代码自动拆分扫描的PDF +autoSplitPDF.tags=基于QR码、分离、扫描分割、整理 -home.autoSplitPDF.title=Auto Split Pages -home.autoSplitPDF.desc=Auto Split Scanned PDF with physical scanned page splitter QR Code -autoSplitPDF.tags=QR-based,separate,scan-segment,organize +home.sanitizePdf.title=清理 +home.sanitizePdf.desc=从PDF文件中删除脚本和其他元素 +sanitizePdf.tags=清理、安全、安全、删除威胁 -home.sanitizePdf.title=Sanitize -home.sanitizePdf.desc=Remove scripts and other elements from PDF files -sanitizePdf.tags=clean,secure,safe,remove-threats +home.URLToPDF.title=URL/网站转PDF +home.URLToPDF.desc=将任何http(s)URL转换为PDF +URLToPDF.tags=网页捕获、保存网页、网页转文档、归档 -home.URLToPDF.title=URL/Website To PDF -home.URLToPDF.desc=Converts any http(s)URL to PDF -URLToPDF.tags=web-capture,save-page,web-to-doc,archive +home.HTMLToPDF.title=HTML转PDF +home.HTMLToPDF.desc=将任何HTML文件或zip文件转换为PDF +HTMLToPDF.tags=标记、网页内容、转换、转换 -home.HTMLToPDF.title=HTML to PDF -home.HTMLToPDF.desc=Converts any HTML file or zip to PDF -HTMLToPDF.tags=markup,web-content,transformation,convert +home.MarkdownToPDF.title=Markdown转PDF +home.MarkdownToPDF.desc=将任何Markdown文件转换为PDF +MarkdownToPDF.tags=标记、网页内容、转换、转换 +home.getPdfInfo.title=获取PDF的所有信息 +home.getPdfInfo.desc=获取PDF的所有可能的信息 +getPdfInfo.tags=信息、数据、统计、统计数据 -home.MarkdownToPDF.title=Markdown to PDF -home.MarkdownToPDF.desc=Converts any Markdown file to PDF -MarkdownToPDF.tags=markup,web-content,transformation,convert +home.extractPage.title=提取页面 +home.extractPage.desc=从PDF中提取选定的页面 +extractPage.tags=提取 +home.PdfToSinglePage.title=PDF转单一大页 +home.PdfToSinglePage.desc=将所有PDF页面合并为一个大的单页 +PdfToSinglePage.tags=单页 -home.getPdfInfo.title=Get ALL Info on PDF -home.getPdfInfo.desc=Grabs any and all information possible on PDFs -getPdfInfo.tags=infomation,data,stats,statistics +home.showJS.title=显示JavaScript +home.showJS.desc=搜索并显示嵌入到PDF中的任何JavaScript代码 +showJS.tags=JavaScript - -home.extractPage.title=Extract page(s) -home.extractPage.desc=Extracts select pages from PDF -extractPage.tags=extract - - -home.PdfToSinglePage.title=PDF to Single Large Page -home.PdfToSinglePage.desc=Merges all PDF pages into one large single page -PdfToSinglePage.tags=single page - - -home.showJS.title=Show Javascript -home.showJS.desc=Searches and displays any JS injected into a PDF -showJS.tags=JS - -home.autoRedact.title=Auto Redact -home.autoRedact.desc=Auto Redacts(Blacks out) text in a PDF based on input text -showJS.tags=JS +home.autoRedact.title=自动删除 +home.autoRedact.desc=根据输入文本自动删除(覆盖)PDF中的文本 +showJS.tags=JavaScript ########################### # # @@ -337,160 +327,160 @@ showJS.tags=JS # # ########################### #login -login.title=Sign in -login.signin=Sign in -login.rememberme=Remember me -login.invalid=Invalid username or password. -login.locked=Your account has been locked. -login.signinTitle=Please sign in +login.title=登录 +login.signin=登录 +login.rememberme=记住我 +login.invalid=用户名或密码无效。 +login.locked=您的账户已被锁定。 +login.signinTitle=请登录 #auto-redact -autoRedact.title=Auto Redact -autoRedact.header=Auto Redact -autoRedact.colorLabel=Colour -autoRedact.textsToRedactLabel=Text to Redact (line-separated) -autoRedact.textsToRedactPlaceholder=e.g. \nConfidential \nTop-Secret -autoRedact.useRegexLabel=Use Regex -autoRedact.wholeWordSearchLabel=Whole Word Search -autoRedact.customPaddingLabel=Custom Extra Padding -autoRedact.convertPDFToImageLabel=Convert PDF to PDF-Image (Used to remove text behind the box) -autoRedact.submitButton=Submit +autoRedact.title=自动删除 +autoRedact.header=自动删除 +autoRedact.colorLabel=颜色 +autoRedact.textsToRedactLabel=要删除的文本(每行一个) +autoRedact.textsToRedactPlaceholder=例如:\n保密\n绝密 +autoRedact.useRegexLabel=使用正则表达式 +autoRedact.wholeWordSearchLabel=全字匹配 +autoRedact.customPaddingLabel=自定义额外间距 +autoRedact.convertPDFToImageLabel=将PDF转换为PDF-Image(用于删除方框后面的文本) +autoRedact.submitButton=提交 #showJS -showJS.title=Show Javascript -showJS.header=Show Javascript -showJS.downloadJS=Download Javascript -showJS.submit=Show +showJS.title=显示 JavaScript +showJS.header=显示 JavaScript +showJS.downloadJS=下载 JavaScript +showJS.submit=显示 #pdfToSinglePage -pdfToSinglePage.title=PDF To Single Page -pdfToSinglePage.header=PDF To Single Page -pdfToSinglePage.submit=Convert To Single Page +pdfToSinglePage.title=PDF转为单页 +pdfToSinglePage.header=PDF转为单页 +pdfToSinglePage.submit=转为单页 #pageExtracter -pageExtracter.title=Extract Pages -pageExtracter.header=Extract Pages -pageExtracter.submit=Extract +pageExtracter.title=提取页面 +pageExtracter.header=提取页面 +pageExtracter.submit=提取 #getPdfInfo -getPdfInfo.title=Get Info on PDF -getPdfInfo.header=Get Info on PDF -getPdfInfo.submit=Get Info -getPdfInfo.downloadJson=Download JSON +getPdfInfo.title=获取PDF信息 +getPdfInfo.header=获取PDF信息 +getPdfInfo.submit=获取信息 +getPdfInfo.downloadJson=下载JSON #markdown-to-pdf -MarkdownToPDF.title=Markdown To PDF -MarkdownToPDF.header=Markdown To PDF -MarkdownToPDF.submit=Convert -MarkdownToPDF.help=Work in progress -MarkdownToPDF.credit=Uses WeasyPrint +MarkdownToPDF.title=Markdown转PDF +MarkdownToPDF.header=Markdown转PDF +MarkdownToPDF.submit=转换 +MarkdownToPDF.help=正在努力中 +MarkdownToPDF.credit=使用WeasyPrint #url-to-pdf -URLToPDF.title=URL To PDF -URLToPDF.header=URL To PDF -URLToPDF.submit=Convert -URLToPDF.credit=Uses WeasyPrint +URLToPDF.title=URL转PDF +URLToPDF.header=URL转PDF +URLToPDF.submit=转换 +URLToPDF.credit=使用WeasyPrint #html-to-pdf -HTMLToPDF.title=HTML To PDF -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.title=HTML转PDF +HTMLToPDF.header=HTML转PDF +HTMLToPDF.help=接受HTML文件和包含所需的html/css/images等的ZIP文件 +HTMLToPDF.submit=转换 +HTMLToPDF.credit=使用WeasyPrint #sanitizePDF -sanitizePDF.title=Sanitize PDF -sanitizePDF.header=Sanitize a PDF file -sanitizePDF.selectText.1=Remove JavaScript actions -sanitizePDF.selectText.2=Remove embedded files -sanitizePDF.selectText.3=Remove metadata -sanitizePDF.selectText.4=Remove links -sanitizePDF.selectText.5=Remove fonts -sanitizePDF.submit=Sanitize PDF +sanitizePDF.title=清理PDF +sanitizePDF.header=清理PDF文件 +sanitizePDF.selectText.1=移除JavaScript操作 +sanitizePDF.selectText.2=移除嵌入的文件 +sanitizePDF.selectText.3=移除元数据 +sanitizePDF.selectText.4=移除链接 +sanitizePDF.selectText.5=移除字体 +sanitizePDF.submit=清理PDF #addPageNumbers -addPageNumbers.title=Add Page Numbers -addPageNumbers.header=Add Page Numbers -addPageNumbers.selectText.1=Select PDF file: -addPageNumbers.selectText.2=Margin Size -addPageNumbers.selectText.3=Position -addPageNumbers.selectText.4=Starting Number -addPageNumbers.selectText.5=Pages to Number -addPageNumbers.selectText.6=Custom Text -addPageNumbers.customTextDesc=Custom Text -addPageNumbers.numberPagesDesc=Which pages to number, default 'all', also accepts 1-5 or 2,5,9 etc -addPageNumbers.customNumberDesc=Defaults to {n}, also accepts 'Page {n} of {total}', 'Text-{n}', '{filename}-{n} -addPageNumbers.submit=Add Page Numbers +addPageNumbers.title=添加页码 +addPageNumbers.header=添加页码 +addPageNumbers.selectText.1=选择PDF文件: +addPageNumbers.selectText.2=边距大小 +addPageNumbers.selectText.3=位置 +addPageNumbers.selectText.4=起始页码 +addPageNumbers.selectText.5=添加页码的页数 +addPageNumbers.selectText.6=自定义文本 +addPageNumbers.customTextDesc=自定义文本 +addPageNumbers.numberPagesDesc=要添加页码的页数,默认为“所有”,也可以接受1-5或2,5,9等 +addPageNumbers.customNumberDesc=默认为{n},也可以接受“第{n}页/共{total}页”,“文本-{n}”,“{filename}-{n}” +addPageNumbers.submit=添加页码 #auto-rename -auto-rename.title=Auto Rename -auto-rename.header=Auto Rename PDF -auto-rename.submit=Auto Rename +auto-rename.title=自动重命名 +auto-rename.header=自动重命名PDF +auto-rename.submit=自动重命名 #adjustContrast -adjustContrast.title=Adjust Contrast -adjustContrast.header=Adjust Contrast -adjustContrast.contrast=Contrast: -adjustContrast.brightness=Brightness: -adjustContrast.saturation=Saturation: -adjustContrast.download=Download +adjustContrast.title=调整对比度 +adjustContrast.header=调整对比度 +adjustContrast.contrast=对比度: +adjustContrast.brightness=亮度: +adjustContrast.saturation=饱和度: +adjustContrast.download=下载 #crop -crop.title=Crop -crop.header=Crop Image -crop.submit=Submit +crop.title=裁剪 +crop.header=裁剪图像 +crop.submit=提交 #autoSplitPDF -autoSplitPDF.title=Auto Split PDF -autoSplitPDF.header=Auto Split PDF -autoSplitPDF.description=Print, Insert, Scan, upload, and let us auto-separate your documents. No manual work sorting needed. -autoSplitPDF.selectText.1=Print out some divider sheets from below (Black and white is fine). -autoSplitPDF.selectText.2=Scan all your documents at once by inserting the divider sheet between them. -autoSplitPDF.selectText.3=Upload the single large scanned PDF file and let Stirling PDF handle the rest. -autoSplitPDF.selectText.4=Divider pages are automatically detected and removed, guaranteeing a neat final document. -autoSplitPDF.formPrompt=Submit PDF containing Stirling-PDF Page dividers: -autoSplitPDF.duplexMode=Duplex Mode (Front and back scanning) -autoSplitPDF.dividerDownload1=Download 'Auto Splitter Divider (minimal).pdf' -autoSplitPDF.dividerDownload2=Download 'Auto Splitter Divider (with instructions).pdf' -autoSplitPDF.submit=Submit +autoSplitPDF.title=自动拆分PDF +autoSplitPDF.header=自动拆分PDF +autoSplitPDF.description=打印、插入、扫描、上传,让我们自动分离您的文档。无需手动排序。 +autoSplitPDF.selectText.1=从下面打印一些分隔页(黑白打印即可)。 +autoSplitPDF.selectText.2=在文档之间插入分隔页,一次性扫描所有文档。 +autoSplitPDF.selectText.3=上传单个大型扫描的PDF文件,让Stirling PDF处理剩下的事情。 +autoSplitPDF.selectText.4=分隔页会自动检测和删除,确保最终文档整洁。 +autoSplitPDF.formPrompt=提交包含Stirling-PDF分隔页的PDF: +autoSplitPDF.duplexMode=双面模式(正反面扫描) +autoSplitPDF.dividerDownload1=下载“自动拆分分隔页(最小化).pdf” +autoSplitPDF.dividerDownload2=下载“自动拆分分隔页(带指导说明).pdf” +autoSplitPDF.submit=提交 #pipeline -pipeline.title=Pipeline +pipeline.title=流水线 #pageLayout -pageLayout.title=Multi Page Layout -pageLayout.header=Multi Page Layout -pageLayout.pagesPerSheet=Pages per sheet: +pageLayout.title=多页布局 +pageLayout.header=多页布局 +pageLayout.pagesPerSheet=每页的页面数: ########################## ### TODO: Translate ### ########################## -pageLayout.addBorder=Add Borders -pageLayout.submit=Submit +pageLayout.addBorder=添加边框 +pageLayout.submit=提交 #scalePages -scalePages.title=Adjust page-scale -scalePages.header=Adjust page-scale -scalePages.pageSize=Size of a page of the document. -scalePages.scaleFactor=Zoom level (crop) of a page. -scalePages.submit=Submit +scalePages.title=调整页面缩放比例 +scalePages.header=调整页面缩放比例 +scalePages.pageSize=文档页面的尺寸。 +scalePages.scaleFactor=页面的缩放级别(裁剪)。 +scalePages.submit=提交 #certSign @@ -510,43 +500,43 @@ certSign.submit=签署 PDF #removeBlanks -removeBlanks.title=\u5220\u9664\u7A7A\u767D -removeBlanks.header=\u5220\u9664\u7A7A\u767D\u9875 -removeBlanks.threshold=\u9608\u503C\uFF1A -removeBlanks.thresholdDesc=\u786E\u5B9A\u767D\u8272\u50CF\u7D20\u5FC5\u987B\u6709\u591A\u767D\u7684\u9608\u503C -removeBlanks.whitePercent=\u767D\u8272\u767E\u5206\u6BD4\uFF08%\uFF09\uFF1A -removeBlanks.whitePercentDesc=\u5FC5\u987B\u4E3A\u767D\u8272\u624D\u80FD\u5220\u9664\u7684\u9875\u9762\u767E\u5206\u6BD4 -removeBlanks.submit=\u5220\u9664\u7A7A\u767D +removeBlanks.title=删除空白 +removeBlanks.header=删除空白页 +removeBlanks.threshold=阈值: +removeBlanks.thresholdDesc=确定白色像素必须有多白的阈值 +removeBlanks.whitePercent=白色百分比(%): +removeBlanks.whitePercentDesc=必须为白色才能删除的页面百分比 +removeBlanks.submit=删除空白 #compare -compare.title=\u6BD4\u8F83 -compare.header=\u6BD4\u8F83 PDF -compare.document.1=\u6587\u6863 1 -compare.document.2=\u6587\u6863 2 -compare.submit=\u6BD4\u8F83 +compare.title=比较 +compare.header=比较 PDF +compare.document.1=文档 1 +compare.document.2=文档 2 +compare.submit=比较 #sign -sign.title=\u7B7E\u540D -sign.header=\u7B7E\u7F72 PDF -sign.upload=\u4E0A\u4F20\u56FE\u7247 -sign.draw=\u7ED8\u5236\u7B7E\u540D -sign.text=\u6587\u672C\u8F93\u5165 -sign.clear=\u6E05\u9664 -sign.add=\u6DFB\u52A0 +sign.title=签名 +sign.header=签署 PDF +sign.upload=上传图片 +sign.draw=绘制签名 +sign.text=文本输入 +sign.clear=清除 +sign.add=添加 #repair -repair.title=\u4FEE\u590D -repair.header=\u4FEE\u590D PDF -repair.submit=\u4FEE\u590D +repair.title=修复 +repair.header=修复 PDF +repair.submit=修复 #flatten -flatten.title=\u5C55\u5E73 -flatten.header=\u5C55\u5E73 PDF -flatten.submit=\u5C55\u5E73 +flatten.title=展平 +flatten.header=展平 PDF +flatten.submit=展平 #ScannerImageSplit @@ -611,7 +601,7 @@ compress.submit=压缩 #Add image addImage.title=添加图像 -addImage.header=添加图片到PDF (Work in progress) +addImage.header=添加图片到PDF(正在进行中) addImage.everyPage=每一页? addImage.upload=添加图片 addImage.submit=添加图片 @@ -620,8 +610,8 @@ addImage.submit=添加图片 #merge merge.title=合并 merge.header=合并多个PDF(2个以上)。 -merge.sortByName=Sort by name -merge.sortByDate=Sort by date +merge.sortByName=按名称排序 +merge.sortByDate=按日期排序 merge.submit=合并 @@ -655,12 +645,12 @@ split.title=拆分PDF split.header=拆分PDF split.desc.1=选择希望进行分割的页数 split.desc.2=如选择1,3,7-8将把一个10页的文件分割成6个独立的PDF: -split.desc.3=Document #1: Page 1 -split.desc.4=Document #2: Page 2 and 3 -split.desc.5=Document #3: Page 4, 5 and 6 -split.desc.6=Document #4: Page 7 -split.desc.7=Document #5: Page 8 -split.desc.8=Document #6: Page 9 and 10 +split.desc.3=文档 #1:第1页 +split.desc.4=文档 #2:第2页和第3页 +split.desc.5=文档 #3:第4页、第5页和第6页 +split.desc.6=文档 #4:第7页 +split.desc.7=文档 #5:第8页 +split.desc.8=文档 #6:第9页和第10页 split.splitPages=输入要分割的页面: split.submit=拆分 @@ -669,10 +659,10 @@ split.submit=拆分 imageToPDF.title=图片转PDF imageToPDF.header=图像转为PDF imageToPDF.submit=转换 -imageToPDF.selectLabel=Image Fit Options -imageToPDF.fillPage=Fill Page -imageToPDF.fitDocumentToImage=Fit Page to Image -imageToPDF.maintainAspectRatio=Maintain Aspect Ratios +imageToPDF.selectLabel=图片适应选项 +imageToPDF.fillPage=填充页面 +imageToPDF.fitDocumentToImage=适应图片大小 +imageToPDF.maintainAspectRatio=保持纵横比例 imageToPDF.selectText.2=自动旋转PDF imageToPDF.selectText.3=多文件逻辑(仅在处理多个图像时启用) imageToPDF.selectText.4=合并成一个PDF文件 @@ -708,10 +698,10 @@ addPassword.selectText.9=防止填写表格 addPassword.selectText.10=防止修改 addPassword.selectText.11=防止修改注释 addPassword.selectText.12=防止打印 -addPassword.selectText.13=防止打印不同的格� -addPassword.selectText.14=Owner Password -addPassword.selectText.15=Restricts what can be done with the document once it is opened (Not supported by all readers) -addPassword.selectText.16=Restricts the opening of the document itself� +addPassword.selectText.13=防止打印不同的格式 +addPassword.selectText.14=所有者密码 +addPassword.selectText.15=限制打开后对文档的操作(不被所有阅读器支持) +addPassword.selectText.16=限制打开文档本身 addPassword.submit=加密 @@ -722,11 +712,11 @@ watermark.selectText.1=选择要添加水印的PDF: watermark.selectText.2=水印文本: watermark.selectText.3=字体大小: watermark.selectText.4=旋转(0-360): -watermark.selectText.5=widthSpacer(水平方向上每个水印之间的空间): -watermark.selectText.6=heightSpacer(每个水印之间的垂直空间): +watermark.selectText.5=水平间距(每个水印之间的水平距离): +watermark.selectText.6=垂直间距(每个水印之间的垂直距离): watermark.selectText.7=透明度(0% - 100%): -watermark.selectText.8=Watermark Type: -watermark.selectText.9=Watermark Image: +watermark.selectText.8=水印类型: +watermark.selectText.9=水印图片: watermark.submit=添加水印 @@ -776,8 +766,8 @@ changeMetadata.submit=更改 #pdfToPDFA -pdfToPDFA.title=PDF To PDF/A -pdfToPDFA.header=PDF to PDF/A +pdfToPDFA.title=将PDF转换为PDF/A +pdfToPDFA.header=PDF转换为PDF/A pdfToPDFA.credit=此服务使用OCRmyPDF进行PDF/A转换 pdfToPDFA.submit=转换 @@ -791,7 +781,7 @@ PDFToWord.submit=转换 #PDFToPresentation -PDFToPresentation.title=PDF To Presentation +PDFToPresentation.title=PDF转换为演示文稿 PDFToPresentation.header=将PDF转为演示文稿 PDFToPresentation.selectText.1=输出文件格式 PDFToPresentation.credit=该服务使用LibreOffice进行文件转换。 From 604d9827c5f889793566af0652f05c039c793998 Mon Sep 17 00:00:00 2001 From: Dimitrios Kaitantzidis Date: Sat, 7 Oct 2023 18:39:37 +0300 Subject: [PATCH 42/57] WIP: Adds greek language support --- src/main/resources/messages_el_GR.properties | 124 +++++++++---------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/src/main/resources/messages_el_GR.properties b/src/main/resources/messages_el_GR.properties index 14077264..9f1dfbff 100644 --- a/src/main/resources/messages_el_GR.properties +++ b/src/main/resources/messages_el_GR.properties @@ -230,105 +230,105 @@ home.PDFToXML.title=PDF \u03C3\u03B5 XML home.PDFToXML.desc=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03BF\u03C5 PDF \u03C3\u03B5 \u03BC\u03BF\u03C1\u03C6\u03AE XML PDFToXML.tags=data-extraction,structured-content,interop,transformation,convert -home.ScannerImageSplit.title= Detect/Split Scanned photos -home.ScannerImageSplit.desc=Splits multiple photos from within a photo/PDF +home.ScannerImageSplit.title=\u0391\u03BD\u03AF\u03C7\u03BD\u03B5\u03C5\u03C3\u03B7/\u0394\u03B9\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03C3\u03B1\u03C1\u03C9\u03BC\u03AD\u03BD\u03C9\u03BD \u03C6\u03C9\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03B9\u03CE\u03BD +home.ScannerImageSplit.desc=\u0394\u03B9\u03B1\u03C7\u03C9\u03C1\u03AF\u03C3\u03BC\u03CC\u03C2 \u03C0\u03BF\u03BB\u03BB\u03CE\u03BD \u03C6\u03C9\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AF\u03CE\u03BD \u03BC\u03AD\u03C3\u03B1 \u03B1\u03C0\u03CC \u03BC\u03B9\u03B1 \u03C6\u03C9\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AF\u03B1/PDF ScannerImageSplit.tags=separate,auto-detect,scans,multi-photo,organize -home.sign.title=Sign -home.sign.desc=Adds signature to PDF by drawing, text or image +home.sign.title=\u03A5\u03C0\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE +home.sign.desc=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C5\u03C0\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE\u03C2 \u03C3\u03C4\u03BF PDF \u03BC\u03B5 \u03C3\u03C7\u03AD\u03B4\u03B9\u03BF, \u03BA\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF \u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1. sign.tags=authorize,initials,drawn-signature,text-sign,image-signature home.flatten.title=Flatten -home.flatten.desc=Remove all interactive elements and forms from a PDF +home.flatten.desc=\u039A\u03B1\u03C4\u03AC\u03C1\u03B3\u03B7\u03C3\u03B7 \u03CC\u03BB\u03C9\u03BD \u03C4\u03C9\u03BD \u03B4\u03B9\u03B1\u03B4\u03C1\u03B1\u03C3\u03C4\u03B9\u03BA\u03CE\u03BD \u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03C9\u03BD \u03BA\u03B1\u03B9 \u03C6\u03BF\u03C1\u03BC\u03CE\u03BD \u03B1\u03C0\u03CC \u03AD\u03BD\u03B1 PDF flatten.tags=static,deactivate,non-interactive,streamline -home.repair.title=Repair -home.repair.desc=Tries to repair a corrupt/broken PDF +home.repair.title=\u0395\u03C0\u03B9\u03B4\u03B9\u03CC\u03C1\u03B8\u03C9\u03C3\u03B7 +home.repair.desc=\u03A0\u03C1\u03BF\u03C3\u03C0\u03AC\u03B8\u03B5\u03B9\u03B1 \u03B5\u03C0\u03B9\u03B4\u03B9\u03CC\u03C1\u03B8\u03C9\u03C3\u03B7\u03C2 \u03B5\u03BD\u03CC\u03C2 \u03BA\u03B1\u03C4\u03B5\u03C3\u03C4\u03C1\u03B1\u03BC\u03BC\u03AD\u03BD\u03BF\u03C5 PDF repair.tags=fix,restore,correction,recover -home.removeBlanks.title=Remove Blank pages -home.removeBlanks.desc=Detects and removes blank pages from a document +home.removeBlanks.title=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03BA\u03B5\u03BD\u03CE\u03BD \u03A3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD +home.removeBlanks.desc=\u0391\u03BD\u03AF\u03C7\u03B5\u03C5\u03C3\u03B7 \u03BA\u03B1\u03B9 \u03B1\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03BA\u03B5\u03BD\u03CE\u03BD \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD \u03B1\u03C0\u03CC \u03AD\u03BD\u03B1 \u03AD\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF removeBlanks.tags=cleanup,streamline,non-content,organize -home.compare.title=Compare -home.compare.desc=Compares and shows the differences between 2 PDF Documents +home.compare.title=\u03A3\u03CD\u03B3\u03BA\u03C1\u03B9\u03C3\u03B7 +home.compare.desc=\u03A3\u03CD\u03B3\u03BA\u03C1\u03B9\u03C3\u03B7 \u03BA\u03B1\u03B9 \u03B5\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7 \u03C4\u03C9\u03BD \u03B4\u03B9\u03B1\u03C6\u03BF\u03C1\u03CE\u03BD \u03BC\u03B5\u03C4\u03B1\u03BE\u03CD \u03B4\u03CD\u03BF PDF \u03B1\u03C1\u03C7\u03B5\u03AF\u03C9\u03BD compare.tags=differentiate,contrast,changes,analysis -home.certSign.title=Sign with Certificate -home.certSign.desc=Signs a PDF with a Certificate/Key (PEM/P12) +home.certSign.title=\u03A5\u03C0\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE \u03BC\u03B5 \u03A0\u03B9\u03C3\u03C4\u03BF\u03C0\u03BF\u03B9\u03B7\u03C4\u03B9\u03BA\u03CC +home.certSign.desc=\u03A5\u03C0\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE \u03B5\u03BD\u03CC\u03C2 PDF \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 \u03BC\u03B5 \u03AD\u03BD\u03B1 \u03A0\u03B9\u03C3\u03C4\u03BF\u03C0\u03BF\u03B9\u03B7\u03C4\u03B9\u03BA\u03CC/\u039A\u03BB\u03B5\u03B9\u03B4\u03AF (PEM/P12) certSign.tags=authenticate,PEM,P12,official,encrypt -home.pageLayout.title=Multi-Page Layout -home.pageLayout.desc=Merge multiple pages of a PDF document into a single page +home.pageLayout.title=\u0394\u03B9\u03AC\u03C4\u03B1\u03BE\u03B7 \u03C0\u03BF\u03BB\u03BB\u03CE\u03BD \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD +home.pageLayout.desc=\u03A3\u03C5\u03B3\u03C7\u03CE\u03BD\u03B5\u03C5\u03C3\u03B7 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03CE\u03BD \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD \u03B5\u03BD\u03CC\u03C2 \u03B5\u03B3\u03B3\u03C1\u03AC\u03C6\u03BF\u03C5 PDF \u03C3\u03B5 \u03BC\u03AF\u03B1 \u03BC\u03CC\u03BD\u03BF \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1 pageLayout.tags=merge,composite,single-view,organize -home.scalePages.title=Adjust page size/scale -home.scalePages.desc=Change the size/scale of a page and/or its contents. +home.scalePages.title=\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03B3\u03AE \u03C4\u03BF\u03C5 \u03BC\u03B5\u03B3\u03AD\u03B8\u03BF\u03C5\u03C2/\u03BA\u03BB\u03AF\u03BC\u03B1\u03BA\u03B1\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2 +home.scalePages.desc=\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u03C4\u03BF\u03C5 \u03BC\u03B5\u03B3\u03AD\u03B8\u03BF\u03C5\u03C2/\u03BA\u03BB\u03AF\u03BC\u03B1\u03BA\u03B1\u03C2 \u03BC\u03AF\u03B1\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2 \u03BA\u03B1\u03B9/\u03B7 \u03C4\u03BF\u03C5 \u03C0\u03B5\u03C1\u03B9\u03B5\u03C7\u03BF\u03BC\u03AD\u03BD\u03BF\u03C5 \u03C4\u03B7\u03C2. scalePages.tags=resize,modify,dimension,adapt -home.pipeline.title=Pipeline (Advanced) -home.pipeline.desc=Run multiple actions on PDFs by defining pipeline scripts +home.pipeline.title=Pipeline (\u0393\u03B9\u03B1 \u03C0\u03C1\u03BF\u03C7\u03C9\u03C1\u03B7\u03BC\u03AD\u03BD\u03BF\u03C5\u03C2) +home.pipeline.desc= \u0395\u03BA\u03C4\u03AD\u03BB\u03B5\u03C3\u03B7 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03CE\u03BD \u03B5\u03BD\u03B5\u03C1\u03B3\u03B5\u03B9\u03CE\u03BD \u03C3\u03B5 \u03B1\u03C1\u03C7\u03B5\u03AF\u03B1 PDF \u03BF\u03C1\u03AF\u03B6\u03BF\u03BD\u03C4\u03B1\u03C2 pipeline scripts pipeline.tags=automate,sequence,scripted,batch-process -home.add-page-numbers.title=Add Page Numbers -home.add-page-numbers.desc=Add Page numbers throughout a document in a set location +home.add-page-numbers.title=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CE\u03BD \u03C3\u03B5 \u03A3\u03B5\u03BB\u03AF\u03B4\u03B5\u03C2 Add Page Numbers +home.add-page-numbers.desc=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CE\u03BD \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD \u03C3\u03B5 \u03AD\u03BD\u03B1 \u03AD\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF \u03C3\u03B5 \u03BC\u03B9\u03B1 \u03BA\u03B1\u03B8\u03BF\u03C1\u03B9\u03C3\u03BC\u03AD\u03BD\u03B7 \u03B8\u03AD\u03C3\u03B7 add-page-numbers.tags=paginate,label,organize,index -home.auto-rename.title=Auto Rename PDF File -home.auto-rename.desc=Auto renames a PDF file based on its detected header +home.auto-rename.title=\u0391\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03B7 \u03BC\u03B5\u03C4\u03BF\u03BD\u03BF\u03BC\u03B1\u03C3\u03AF\u03B1 \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 PDF +home.auto-rename.desc=\u0391\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03B7 \u03BC\u03B5\u03C4\u03BF\u03BD\u03BF\u03BC\u03B1\u03C3\u03AF\u03B1 \u03B5\u03BD\u03CC\u03C2 \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 PDF \u03BC\u03B5 \u03B2\u03AC\u03C3\u03B7 \u03C4\u03B7\u03BD \u03BA\u03B5\u03C6\u03B1\u03BB\u03AF\u03B4\u03B1 \u03C0\u03BF\u03C5 \u03AD\u03C7\u03B5\u03B9 \u03B5\u03BD\u03C4\u03BF\u03C0\u03B9\u03C3\u03C4\u03B5\u03AF auto-rename.tags=auto-detect,header-based,organize,relabel -home.adjust-contrast.title=Adjust Colors/Contrast -home.adjust-contrast.desc=Adjust Contrast, Saturation and Brightness of a PDF +home.adjust-contrast.title=\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03B3\u03AE \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD/\u0391\u03BD\u03C4\u03AF\u03B8\u03B5\u03C3\u03B7 +home.adjust-contrast.desc=\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03B3\u03AE \u03C4\u03B7\u03C2 \u03B1\u03BD\u03C4\u03AF\u03B8\u03B5\u03C3\u03B7\u03C2, \u03C4\u03BF\u03C5 \u03BA\u03BF\u03C1\u03B5\u03C3\u03BC\u03BF\u03CD \u03BA\u03B1\u03B9 \u03C4\u03B7\u03C2 \u03C6\u03C9\u03C4\u03B5\u03B9\u03BD\u03CC\u03C4\u03B7\u03C4\u03B1\u03C2 \u03B5\u03BD\u03CC\u03C2 PDF adjust-contrast.tags=color-correction,tune,modify,enhance -home.crop.title=Crop PDF -home.crop.desc=Crop a PDF to reduce its size (maintains text!) +home.crop.title=\u03A0\u03B5\u03C1\u03B9\u03BA\u03BF\u03C0\u03AE PDF +home.crop.desc=\u03A0\u03B5\u03C1\u03B9\u03BA\u03BF\u03C0\u03AE \u03B5\u03BD\u03CC\u03C2 PDF \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03BC\u03B5\u03B9\u03C9\u03B8\u03B5\u03AF \u03C4\u03BF \u03BC\u03AD\u03B3\u03B5\u03B8\u03CC\u03C2 \u03C4\u03BF\u03C5 (\u03B4\u03B9\u03B1\u03C4\u03B7\u03C1\u03B5\u03AF \u03C4\u03BF \u03BA\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF!) crop.tags=trim,shrink,edit,shape -home.autoSplitPDF.title=Auto Split Pages -home.autoSplitPDF.desc=Auto Split Scanned PDF with physical scanned page splitter QR Code +home.autoSplitPDF.title=\u0391\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03BF\u03C2 \u03B4\u03B9\u03B1\u03C7\u03C9\u03C1\u03B9\u03C3\u03BC\u03CC\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD +home.autoSplitPDF.desc=\u0391\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03BF\u03C2 \u03B4\u03B9\u03B1\u03C7\u03C9\u03C1\u03B9\u03C3\u03BC\u03CC\u03C2 \u03C3\u03B1\u03C1\u03C9\u03BC\u03AD\u03BD\u03BF\u03C5 PDF \u03BC\u03B5 \u03C6\u03C5\u03C3\u03B9\u03BA\u03CC \u03C3\u03B1\u03C1\u03C9\u03BC\u03AD\u03BD\u03BF \u03B4\u03B9\u03B1\u03C7\u03C9\u03C1\u03B9\u03C3\u03C4\u03AE \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD QR Code autoSplitPDF.tags=QR-based,separate,scan-segment,organize -home.sanitizePdf.title=Sanitize -home.sanitizePdf.desc=Remove scripts and other elements from PDF files +home.sanitizePdf.title=\u0391\u03C0\u03BF\u03BB\u03CD\u03BC\u03B1\u03BD\u03C3\u03B7 +home.sanitizePdf.desc=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03C3\u03B5\u03BD\u03B1\u03C1\u03AF\u03C9\u03BD \u03BA\u03B1\u03B9 \u03AC\u03BB\u03BB\u03C9\u03BD \u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03C9\u03BD \u03B1\u03C0\u03CC \u03B1\u03C1\u03C7\u03B5\u03AF\u03B1 PDF sanitizePdf.tags=clean,secure,safe,remove-threats -home.URLToPDF.title=URL/Website To PDF -home.URLToPDF.desc=Converts any http(s)URL to PDF +home.URLToPDF.title=URL/\u0399\u03C3\u03C4\u03CC\u03C4\u03BF\u03C0\u03BF\u03C2 \u03C3\u03B5 PDF +home.URLToPDF.desc=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03BF\u03C0\u03BF\u03B9\u03B1\u03B4\u03AE\u03C0\u03BF\u03C4\u03B5 \u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7\u03C2 URL http(s) \u03C3\u03B5 PDF URLToPDF.tags=web-capture,save-page,web-to-doc,archive -home.HTMLToPDF.title=HTML to PDF -home.HTMLToPDF.desc=Converts any HTML file or zip to PDF +home.HTMLToPDF.title=HTML \u03C3\u03B5 PDF +home.HTMLToPDF.desc=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03BF\u03C0\u03BF\u03B9\u03BF\u03C5\u03B4\u03AE\u03C0\u03BF\u03C4\u03B5 \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 HTML \u03AE zip \u03C3\u03B5 PDF HTMLToPDF.tags=markup,web-content,transformation,convert -home.MarkdownToPDF.title=Markdown to PDF -home.MarkdownToPDF.desc=Converts any Markdown file to PDF +home.MarkdownToPDF.title=Markdown \u03C3\u03B5 PDF +home.MarkdownToPDF.desc=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03BF\u03C0\u03BF\u03B9\u03BF\u03C5\u03B4\u03AE\u03C0\u03BF\u03C4\u03B5 \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 Markdown \u03C3\u03B5 PDF MarkdownToPDF.tags=markup,web-content,transformation,convert -home.getPdfInfo.title=Get ALL Info on PDF -home.getPdfInfo.desc=Grabs any and all information possible on PDFs +home.getPdfInfo.title=\u039B\u03AE\u03C8\u03B7 \u03CC\u03BB\u03C9\u03BD \u03C4\u03C9\u03BD \u03C0\u03BB\u03B7\u03C1\u03BF\u03C6\u03BF\u03C1\u03B9\u03CE\u03BD \u03B1\u03C0\u03CC \u03C4\u03BF PDF +home.getPdfInfo.desc=\u039B\u03AE\u03C8\u03B7 \u03CC\u03BB\u03C9\u03BD \u03C4\u03C9\u03BD \u03C0\u03B9\u03B8\u03B1\u03BD\u03CE\u03BD \u03C0\u03BB\u03B7\u03C1\u03BF\u03C6\u03BF\u03C1\u03B9\u03CE\u03BD \u03B1\u03C0\u03CC \u03C4\u03B1 \u03B1\u03C1\u03C7\u03B5\u03AF\u03B1 PDF getPdfInfo.tags=infomation,data,stats,statistics -home.extractPage.title=Extract page(s) -home.extractPage.desc=Extracts select pages from PDF +home.extractPage.title=\u0395\u03BE\u03B1\u03B3\u03C9\u03B3\u03AE \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD +home.extractPage.desc=\u0395\u03BE\u03B1\u03B3\u03C9\u03B3\u03AE \u03C4\u03C9\u03BD \u03B5\u03C0\u03B9\u03BB\u03B5\u03B3\u03BC\u03AD\u03BD\u03C9\u03BD \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD \u03B1\u03C0\u03CC \u03AD\u03BD\u03B1 PDF extractPage.tags=extract -home.PdfToSinglePage.title=PDF to Single Large Page -home.PdfToSinglePage.desc=Merges all PDF pages into one large single page +home.PdfToSinglePage.title=PDF \u03C3\u03B5 \u03BC\u03AF\u03B1 \u03BC\u03B5\u03B3\u03AC\u03BB\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1 +home.PdfToSinglePage.desc=\u03A3\u03C5\u03B3\u03C7\u03CE\u03BD\u03B5\u03C5\u03C3\u03B7 \u03CC\u03BB\u03C9\u03BD \u03C4\u03C9\u03BD \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD PDF \u03C3\u03B5 \u03BC\u03B9\u03B1 \u03BC\u03B5\u03B3\u03AC\u03BB\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1 PdfToSinglePage.tags=single page -home.showJS.title=Show Javascript -home.showJS.desc=Searches and displays any JS injected into a PDF +home.showJS.title=\u0395\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7 Javascript +home.showJS.desc=\u0391\u03BD\u03B6\u03AE\u03C4\u03B7\u03C3\u03B7 \u03BA\u03B1\u03B9 \u03B5\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7 \u03BA\u03CE\u03B4\u03B9\u03BA\u03B1 Javascript \u03C0\u03BF\u03C5 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03B5\u03BD\u03C3\u03C9\u03BC\u03B1\u03C4\u03C9\u03BC\u03AD\u03BD\u03BF \u03BC\u03AD\u03C3\u03B1 \u03C3\u03B5 \u03AD\u03BD\u03B1 PDF showJS.tags=JS -home.autoRedact.title=Auto Redact -home.autoRedact.desc=Auto Redacts(Blacks out) text in a PDF based on input text +home.autoRedact.title=\u0391\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03BF \u039C\u03B1\u03CD\u03C1\u03B9\u03C3\u03BC\u03B1 \u039A\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5 +home.autoRedact.desc=\u0391\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03B7 \u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 (\u039C\u03B1\u03CD\u03C1\u03B9\u03C3\u03BC\u03B1) \u03BA\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF\u03C5 \u03C3\u03B5 PDF \u03BC\u03B5 \u03B2\u03AC\u03C3\u03B7 \u03C4\u03BF \u03BA\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF \u03B5\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE\u03C2 showJS.tags=Redact,Hide,black out,black,marker,hidden ########################### @@ -337,25 +337,25 @@ showJS.tags=Redact,Hide,black out,black,marker,hidden # # ########################### #login -login.title=Sign in -login.signin=Sign in -login.rememberme=Remember me -login.invalid=Invalid username or password. -login.locked=Your account has been locked. -login.signinTitle=Please sign in +login.title=\u0395\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2 +login.signin=\u0395\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2 +login.rememberme=\u039D\u03B1 \u039C\u03B5 \u0398\u03C5\u03BC\u03AC\u03C3\u03B1\u03B9 +login.invalid=\u039B\u03AC\u03B8\u03BF\u03C2 \u03CC\u03BD\u03BF\u03BC\u03B1 \u03C7\u03C1\u03AE\u03C3\u03C4\u03B7 \u03AE \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2. +login.locked=\u039F \u03BB\u03BF\u03B3\u03B1\u03C1\u03B9\u03B1\u03C3\u03BC\u03CC\u03C2 \u03C3\u03B1\u03C2 \u03AD\u03C7\u03B5\u03B9 \u03BA\u03BB\u03B5\u03B9\u03B4\u03C9\u03B8\u03B5\u03AF. +login.signinTitle=\u03A0\u03B1\u03C1\u03B1\u03BA\u03B1\u03BB\u03CE, \u03C3\u03C5\u03BD\u03B4\u03B5\u03B8\u03B5\u03AF\u03C4\u03B5 #auto-redact -autoRedact.title=Auto Redact -autoRedact.header=Auto Redact -autoRedact.colorLabel=Colour -autoRedact.textsToRedactLabel=Text to Redact (line-separated) -autoRedact.textsToRedactPlaceholder=e.g. \nConfidential \nTop-Secret -autoRedact.useRegexLabel=Use Regex -autoRedact.wholeWordSearchLabel=Whole Word Search +autoRedact.title=\u0391\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03BF \u039C\u03B1\u03CD\u03C1\u03B9\u03C3\u03BC\u03B1 \u039A\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5 +autoRedact.header=\u0391\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03BF \u039C\u03B1\u03CD\u03C1\u03B9\u03C3\u03BC\u03B1 \u039A\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5 +autoRedact.colorLabel=\u03A7\u03C1\u03CE\u03BC\u03B1 +autoRedact.textsToRedactLabel=\u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF \u03B3\u03B9\u03B1 \u03BC\u03B1\u03CD\u03C1\u03B9\u03C3\u03BC\u03B1 (\u03B4\u03B9\u03B1\u03C7\u03C9\u03C1\u03B9\u03C3\u03BC\u03AD\u03BD\u03BF \u03C3\u03B5 \u03B3\u03C1\u03B1\u03BC\u03BC\u03AD\u03C2) +autoRedact.textsToRedactPlaceholder=\u03C0.\u03C7. \n\u0395\u03BC\u03C0\u03B9\u03C3\u03C4\u03B5\u03C5\u03C4\u03B9\u03BA\u03CC \n\u0391\u03BA\u03C1\u03CE\u03C2 \u03B1\u03C0\u03CC\u03C1\u03C1\u03B7\u03C4\u03BF +autoRedact.useRegexLabel=\u03A7\u03C1\u03AE\u03C3\u03B7 Regex +autoRedact.wholeWordSearchLabel=\u0391\u03BD\u03B1\u03B6\u03AE\u03C4\u03B7\u03C3\u03B7 \u03BF\u03BB\u03CC\u03BA\u03BB\u03B7\u03C1\u03B7\u03C2 \u03C4\u03B7\u03C2 \u03BB\u03AD\u03BE\u03B7\u03C2 autoRedact.customPaddingLabel=Custom Extra Padding -autoRedact.convertPDFToImageLabel=Convert PDF to PDF-Image (Used to remove text behind the box) -autoRedact.submitButton=Submit +autoRedact.convertPDFToImageLabel=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE PDF \u03C3\u03B5 PDF-\u0395\u03B9\u03BA\u03CC\u03BD\u03B1 (\u03A7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF\u03C4\u03B1\u03B9 \u03B3\u03B9\u03B1 \u03C4\u03B7\u03BD \u03B1\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03BA\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5 \u03C0\u03AF\u03C3\u03C9 \u03B1\u03C0\u03CC \u03C4\u03BF \u03C0\u03BB\u03B1\u03AF\u03C3\u03B9\u03BF) +autoRedact.submitButton=\u03A5\u03C0\u03BF\u03B2\u03BF\u03BB\u03AE #showJS From cdc075b27ca3bae0c61fea97483ee96db250e5b7 Mon Sep 17 00:00:00 2001 From: Dimitrios Kaitantzidis Date: Sat, 7 Oct 2023 18:56:43 +0300 Subject: [PATCH 43/57] WIP: Adds greek language support --- src/main/resources/messages_el_GR.properties | 154 +++++++++---------- 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/src/main/resources/messages_el_GR.properties b/src/main/resources/messages_el_GR.properties index 9f1dfbff..847bde18 100644 --- a/src/main/resources/messages_el_GR.properties +++ b/src/main/resources/messages_el_GR.properties @@ -359,115 +359,115 @@ autoRedact.submitButton=\u03A5\u03C0\u03BF\u03B2\u03BF\u03BB\u03AE #showJS -showJS.title=Show Javascript -showJS.header=Show Javascript -showJS.downloadJS=Download Javascript -showJS.submit=Show +showJS.title=\u0395\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7 Javascript +showJS.header=\u0395\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7 Javascript +showJS.downloadJS=\u039B\u03AE\u03C8\u03B7 Javascript +showJS.submit=\u0395\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7 #pdfToSinglePage -pdfToSinglePage.title=PDF To Single Page -pdfToSinglePage.header=PDF To Single Page -pdfToSinglePage.submit=Convert To Single Page +pdfToSinglePage.title=PDF \u03C3\u03B5 \u039C\u03BF\u03BD\u03AE \u03A3\u03B5\u03BB\u03AF\u03B4\u03B1 +pdfToSinglePage.header=PDF \u03C3\u03B5 \u039C\u03BF\u03BD\u03AE \u03A3\u03B5\u03BB\u03AF\u03B4\u03B1 +pdfToSinglePage.submit=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C3\u03B5 \u039C\u03BF\u03BD\u03AE \u03A3\u03B5\u03BB\u03AF\u03B4\u03B1 #pageExtracter -pageExtracter.title=Extract Pages -pageExtracter.header=Extract Pages -pageExtracter.submit=Extract +pageExtracter.title=\u0395\u03BE\u03B1\u03B3\u03C9\u03B3\u03AE \u03A3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD +pageExtracter.header=E\u0395\u03BE\u03B1\u03B3\u03C9\u03B3\u03AE \u03A3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD +pageExtracter.submit=\u0395\u03BE\u03B1\u03B3\u03C9\u03B3\u03AE #getPdfInfo -getPdfInfo.title=Get Info on PDF -getPdfInfo.header=Get Info on PDF -getPdfInfo.submit=Get Info -getPdfInfo.downloadJson=Download JSON +getPdfInfo.title=\u0391\u03BD\u03AC\u03BA\u03C4\u03B7\u03C3\u03B7 \u03C0\u03BB\u03B7\u03C1\u03BF\u03C6\u03BF\u03C1\u03B9\u03CE\u03BD \u03B1\u03C0\u03CC \u03C4\u03BF PDF +getPdfInfo.header=\u0391\u03BD\u03AC\u03BA\u03C4\u03B7\u03C3\u03B7 \u03C0\u03BB\u03B7\u03C1\u03BF\u03C6\u03BF\u03C1\u03B9\u03CE\u03BD \u03B1\u03C0\u03CC \u03C4\u03BF PDF +getPdfInfo.submit=\u0391\u03BD\u03AC\u03BA\u03C4\u03B7\u03C3\u03B7 \u03C0\u03BB\u03B7\u03C1\u03BF\u03C6\u03BF\u03C1\u03B9\u03CE\u03BD +getPdfInfo.downloadJson=\u039B\u03AE\u03C8\u03B7 JSON #markdown-to-pdf -MarkdownToPDF.title=Markdown To PDF -MarkdownToPDF.header=Markdown To PDF -MarkdownToPDF.submit=Convert -MarkdownToPDF.help=Work in progress -MarkdownToPDF.credit=Uses WeasyPrint +MarkdownToPDF.title=Markdown \u03C3\u03B5 PDF +MarkdownToPDF.header=Markdown \u03C3\u03B5 PDF +MarkdownToPDF.submit=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE +MarkdownToPDF.help=\u0395\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03C3\u03B5 \u03B5\u03BE\u03AD\u03BB\u03B9\u03BE\u03B7 +MarkdownToPDF.credit=\u03A7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF WeasyPrint #url-to-pdf -URLToPDF.title=URL To PDF -URLToPDF.header=URL To PDF -URLToPDF.submit=Convert -URLToPDF.credit=Uses WeasyPrint +URLToPDF.title=URL \u03C3\u03B5 PDF +URLToPDF.header=URL \u03C3\u03B5 PDF +URLToPDF.submit=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE +URLToPDF.credit=\u03A7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF WeasyPrint #html-to-pdf -HTMLToPDF.title=HTML To PDF -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.title=HTML \u03C3\u03B5 PDF +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 #sanitizePDF -sanitizePDF.title=Sanitize PDF -sanitizePDF.header=Sanitize a PDF file -sanitizePDF.selectText.1=Remove JavaScript actions -sanitizePDF.selectText.2=Remove embedded files -sanitizePDF.selectText.3=Remove metadata -sanitizePDF.selectText.4=Remove links -sanitizePDF.selectText.5=Remove fonts -sanitizePDF.submit=Sanitize PDF +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 +sanitizePDF.selectText.1=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 JavaScript +sanitizePDF.selectText.2=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03B5\u03BC\u03C3\u03C9\u03BC\u03B1\u03C4\u03C9\u03BC\u03AD\u03BD\u03C9\u03BD \u03B1\u03C1\u03C7\u03B5\u03AF\u03C9\u03BD +sanitizePDF.selectText.3=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03BC\u03B5\u03C4\u03B1\u03B4\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03C9\u03BD +sanitizePDF.selectText.4=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03C3\u03C5\u03BD\u03B4\u03AD\u03C3\u03BC\u03C9\u03BD (links) +sanitizePDF.selectText.5=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03B3\u03C1\u03B1\u03BC\u03BC\u03B1\u03C4\u03BF\u03C3\u03B5\u03B9\u03C1\u03CE\u03BD +sanitizePDF.submit=\u0391\u03C0\u03BF\u03BB\u03CD\u03BC\u03B1\u03BD\u03C3\u03B7 PDF #addPageNumbers -addPageNumbers.title=Add Page Numbers -addPageNumbers.header=Add Page Numbers -addPageNumbers.selectText.1=Select PDF file: -addPageNumbers.selectText.2=Margin Size -addPageNumbers.selectText.3=Position -addPageNumbers.selectText.4=Starting Number -addPageNumbers.selectText.5=Pages to Number -addPageNumbers.selectText.6=Custom Text -addPageNumbers.customTextDesc=Custom Text -addPageNumbers.numberPagesDesc=Which pages to number, default 'all', also accepts 1-5 or 2,5,9 etc -addPageNumbers.customNumberDesc=Defaults to {n}, also accepts 'Page {n} of {total}', 'Text-{n}', '{filename}-{n} -addPageNumbers.submit=Add Page Numbers +addPageNumbers.title=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CE\u03BD \u03C3\u03B5 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B5\u03C2 +addPageNumbers.header=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CE\u03BD \u03C3\u03B5 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B5\u03C2 +addPageNumbers.selectText.1=\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE PDF \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5: +addPageNumbers.selectText.2=\u039C\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03C0\u03B5\u03C1\u03B9\u03B8\u03C9\u03C1\u03AF\u03BF\u03C5 +addPageNumbers.selectText.3=\u0398\u03AD\u03C3\u03B7 +addPageNumbers.selectText.4=\u0391\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03BF\u03C5 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03B7 \u03B1\u03C1\u03AF\u03B8\u03BC\u03B7\u03C3\u03B7 +addPageNumbers.selectText.5=\u03A3\u03B5\u03BB\u03AF\u03B4\u03B5\u03C2 \u03C3\u03B5 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC +addPageNumbers.selectText.6=\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03BF \u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF +addPageNumbers.customTextDesc=\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03BF \u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF +addPageNumbers.numberPagesDesc=\u03A0\u03BF\u03B9\u03AD\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B5\u03C2 \u03BD\u03B1 \u03B1\u03C1\u03B9\u03B8\u03BC\u03B7\u03B8\u03BF\u03CD\u03BD, \u03C0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE 'all' (\u03CC\u03BB\u03B5\u03C2), \u03B5\u03C0\u03AF\u03C3\u03B7\u03C2 \u03B4\u03AD\u03C7\u03B5\u03C4\u03B1\u03B9 1-5 \u03AE 2,5,9 \u03BA.\u03BB.\u03C0 +addPageNumbers.customNumberDesc=\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03C3\u03B5 {n}, \u03B4\u03AD\u03C7\u03B5\u03C4\u03B1\u03B9 \u03B5\u03C0\u03AF\u03C3\u03B7\u03C2 "\u03A3\u03B5\u03BB\u03AF\u03B4\u03B1 {n} \u03B1\u03C0\u03CC {total}", "Text-{n}", "{filename}-{n} +addPageNumbers.submit=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CE\u03BD \u03C3\u03B5 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B5\u03C2 #auto-rename -auto-rename.title=Auto Rename -auto-rename.header=Auto Rename PDF -auto-rename.submit=Auto Rename +auto-rename.title=\u0391\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03B7 \u03BC\u03B5\u03C4\u03BF\u03BD\u03BF\u03BC\u03B1\u03C3\u03AF\u03B1 +auto-rename.header=\u0391\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03B7 \u03BC\u03B5\u03C4\u03BF\u03BD\u03BF\u03BC\u03B1\u03C3\u03AF\u03B1 PDF +auto-rename.submit=\u0391\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03B7 \u03BC\u03B5\u03C4\u03BF\u03BD\u03BF\u03BC\u03B1\u03C3\u03AF\u03B1 #adjustContrast -adjustContrast.title=Adjust Contrast -adjustContrast.header=Adjust Contrast -adjustContrast.contrast=Contrast: -adjustContrast.brightness=Brightness: -adjustContrast.saturation=Saturation: -adjustContrast.download=Download +adjustContrast.title=\u03A0\u03C1\u03BF\u03C3\u03C0\u03B1\u03C1\u03BC\u03BF\u03B3\u03AE \u03C4\u03B7\u03C2 \u0391\u03BD\u03C4\u03AF\u03B8\u03B5\u03C3\u03B7\u03C2 +adjustContrast.header=\u03A0\u03C1\u03BF\u03C3\u03C0\u03B1\u03C1\u03BC\u03BF\u03B3\u03AE \u03C4\u03B7\u03C2 \u0391\u03BD\u03C4\u03AF\u03B8\u03B5\u03C3\u03B7\u03C2 +adjustContrast.contrast=\u0391\u03BD\u03C4\u03AF\u03B8\u03B5\u03C3\u03B7: +adjustContrast.brightness=\u03A6\u03C9\u03C4\u03B5\u03B9\u03BD\u03CC\u03C4\u03B7\u03C4\u03B1: +adjustContrast.saturation=\u039A\u03BF\u03C1\u03B5\u03C3\u03BC\u03CC\u03C2: +adjustContrast.download=\u039B\u03AE\u03C8\u03B7 #crop -crop.title=Crop -crop.header=Crop Image -crop.submit=Submit +crop.title=\u039A\u03BF\u03C0\u03AE +crop.header=\u039A\u03BF\u03C0\u03AE \u0395\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 +crop.submit=\u03A5\u03C0\u03BF\u03B2\u03BF\u03BB\u03AE #autoSplitPDF -autoSplitPDF.title=Auto Split PDF -autoSplitPDF.header=Auto Split PDF -autoSplitPDF.description=Print, Insert, Scan, upload, and let us auto-separate your documents. No manual work sorting needed. -autoSplitPDF.selectText.1=Print out some divider sheets from below (Black and white is fine). -autoSplitPDF.selectText.2=Scan all your documents at once by inserting the divider sheet between them. -autoSplitPDF.selectText.3=Upload the single large scanned PDF file and let Stirling PDF handle the rest. -autoSplitPDF.selectText.4=Divider pages are automatically detected and removed, guaranteeing a neat final document. -autoSplitPDF.formPrompt=Submit PDF containing Stirling-PDF Page dividers: -autoSplitPDF.duplexMode=Duplex Mode (Front and back scanning) -autoSplitPDF.dividerDownload1=Download 'Auto Splitter Divider (minimal).pdf' -autoSplitPDF.dividerDownload2=Download 'Auto Splitter Divider (with instructions).pdf' -autoSplitPDF.submit=Submit +autoSplitPDF.title=\u0391\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03B7 \u03B4\u03B9\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 PDF +autoSplitPDF.header=\u0391\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03B7 \u03B4\u03B9\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 PDF +autoSplitPDF.description=\u0395\u03BA\u03C4\u03C5\u03C0\u03CE\u03C3\u03C4\u03B5, \u03B5\u03B9\u03C3\u03AC\u03B3\u03B5\u03C4\u03B5, \u03C3\u03B1\u03C1\u03CE\u03C3\u03C4\u03B5, \u03B1\u03BD\u03B5\u03B2\u03AC\u03C3\u03C4\u03B5 \u03BA\u03B1\u03B9 \u03B1\u03C6\u03AE\u03C3\u03C4\u03B5 \u03BC\u03B1\u03C2 \u03BD\u03B1 \u03B4\u03B9\u03B1\u03C7\u03C9\u03C1\u03AF\u03C3\u03BF\u03C5\u03BC\u03B5 \u03B1\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03B1 \u03C4\u03B1 \u03AD\u03B3\u03B3\u03C1\u03B1\u03C6\u03AC \u03C3\u03B1\u03C2. \u0394\u03B5\u03BD \u03B1\u03C0\u03B1\u03B9\u03C4\u03B5\u03AF\u03C4\u03B1\u03B9 \u03C7\u03B5\u03B9\u03C1\u03BF\u03BA\u03AF\u03BD\u03B7\u03C4\u03B7 \u03C4\u03B1\u03BE\u03B9\u03BD\u03CC\u03BC\u03B7\u03C3\u03B7. +autoSplitPDF.selectText.1=\u0395\u03BA\u03C4\u03C5\u03C0\u03CE\u03C3\u03C4\u03B5 \u03BC\u03B5\u03C1\u03B9\u03BA\u03AC \u03C6\u03CD\u03BB\u03BB\u03B1 \u03B4\u03B9\u03B1\u03C7\u03C9\u03C1\u03B9\u03C3\u03BC\u03BF\u03CD \u03B1\u03C0\u03CC \u03BA\u03AC\u03C4\u03C9 (\u03C4\u03BF \u03B1\u03C3\u03C0\u03C1\u03CC\u03BC\u03B1\u03C5\u03C1\u03BF \u03B5\u03AF\u03BD\u03B1\u03B9 \u03BC\u03B9\u03B1 \u03C7\u03B1\u03C1\u03AC). +autoSplitPDF.selectText.2=\u03A3\u03B1\u03C1\u03CE\u03C3\u03C4\u03B5 \u03CC\u03BB\u03B1 \u03C4\u03B1 \u03AD\u03B3\u03B3\u03C1\u03B1\u03C6\u03AC \u03C3\u03B1\u03C2 \u03C4\u03B1\u03C5\u03C4\u03CC\u03C7\u03C1\u03BF\u03BD\u03B1, \u03BC\u03B5 \u03C4\u03BF \u03BD\u03B1 \u03B5\u03B9\u03C3\u03AC\u03B3\u03B5\u03C4\u03B5 \u03C4\u03BF \u03B4\u03B9\u03B1\u03C7\u03C9\u03C1\u03B9\u03C3\u03C4\u03B9\u03BA\u03CC \u03C6\u03CD\u03BB\u03BB\u03BF \u03BC\u03B5\u03C4\u03B1\u03BE\u03CD \u03C4\u03BF\u03C5\u03C2. +autoSplitPDF.selectText.3=\u0391\u03BD\u03B5\u03B2\u03AC\u03C3\u03C4\u03B5 \u03AD\u03BD\u03B1 \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF \u03C3\u03B1\u03C1\u03C9\u03BC\u03AD\u03BD\u03BF PDF \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF \u03BA\u03B1\u03B9 \u03B1\u03C6\u03AE\u03C3\u03C4\u03B5 \u03C4\u03BF Stirling PDF \u03BD\u03B1 \u03C7\u03B5\u03B9\u03C1\u03B9\u03C3\u03C4\u03B5\u03AF \u03C4\u03B1 \u03C5\u03C0\u03CC\u03BB\u03BF\u03B9\u03C0\u03B1 +autoSplitPDF.selectText.4=\u039F\u03B9 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B5\u03C2 \u03B4\u03B9\u03B1\u03C7\u03C9\u03C1\u03B9\u03C3\u03BC\u03BF\u03CD \u03B5\u03BD\u03C4\u03BF\u03C0\u03AF\u03B6\u03BF\u03BD\u03C4\u03B1\u03B9 \u03BA\u03B1\u03B9 \u03B1\u03C6\u03B1\u03B9\u03C1\u03BF\u03CD\u03BD\u03C4\u03B1\u03B9 \u03B1\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03B1, \u03B4\u03B9\u03B1\u03C3\u03C6\u03B1\u03BB\u03AF\u03B6\u03BF\u03BD\u03C4\u03B1\u03C2 \u03AD\u03BD\u03B1 \u03C0\u03C1\u03BF\u03C3\u03B5\u03B3\u03BC\u03AD\u03BD\u03BF \u03C4\u03B5\u03BB\u03B9\u03BA\u03CC \u03AD\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF. +autoSplitPDF.formPrompt=\u03A5\u03C0\u03BF\u03B2\u03BF\u03BB\u03AE PDF \u03C0\u03BF\u03C5 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 \u03B4\u03B9\u03B1\u03B9\u03C1\u03AD\u03C4\u03B5\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD Stirling-PDF: +autoSplitPDF.duplexMode=\u039B\u03B5\u03B9\u03C4\u03BF\u03C5\u03C1\u03B3\u03AF\u03B1 \u03B4\u03B9\u03C0\u03BB\u03AE\u03C2 \u03CC\u03C8\u03B7\u03C2 (\u03A3\u03AC\u03C1\u03C9\u03C3\u03B7 \u03BC\u03C0\u03C1\u03BF\u03C3\u03C4\u03AC \u03BA\u03B1\u03B9 \u03C0\u03AF\u03C3\u03C9) +autoSplitPDF.dividerDownload1=\u039B\u03AE\u03C8\u03B7 'Auto Splitter Divider (minimal).pdf' +autoSplitPDF.dividerDownload2=\u039B\u03AE\u03C8\u03B7 'Auto Splitter Divider (with instructions).pdf' +autoSplitPDF.submit=\u03A5\u03C0\u03BF\u03B2\u03BF\u03BB\u03AE #pipeline @@ -475,11 +475,11 @@ pipeline.title=Pipeline #pageLayout -pageLayout.title=Multi Page Layout -pageLayout.header=Multi Page Layout -pageLayout.pagesPerSheet=Pages per sheet: -pageLayout.addBorder=Add Borders -pageLayout.submit=Submit +pageLayout.title=\u0394\u03B9\u03AC\u03C4\u03B1\u03BE\u03B7 \u03C0\u03BF\u03BB\u03BB\u03CE\u03BD \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD +pageLayout.header=\u0394\u03B9\u03AC\u03C4\u03B1\u03BE\u03B7 \u03C0\u03BF\u03BB\u03BB\u03CE\u03BD \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD +pageLayout.pagesPerSheet=\u03A3\u03B5\u03BB\u03AF\u03B4\u03B5\u03C2 \u03B1\u03BD\u03AC \u03C6\u03CD\u03BB\u03BB\u03BF: +pageLayout.addBorder=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C0\u03B5\u03C1\u03B9\u03B3\u03C1\u03B1\u03BC\u03BC\u03AC\u03C4\u03C9\u03BD +pageLayout.submit=\u03A5\u03C0\u03BF\u03B2\u03BF\u03BB\u03AE #scalePages From 0287d88895ab2d30694b08b637ec3cb0431f5bbb Mon Sep 17 00:00:00 2001 From: Dimitrios Kaitantzidis Date: Sat, 7 Oct 2023 20:25:39 +0300 Subject: [PATCH 44/57] WIP: Adds greek language support --- src/main/resources/messages_el_GR.properties | 332 +++++++++---------- 1 file changed, 166 insertions(+), 166 deletions(-) diff --git a/src/main/resources/messages_el_GR.properties b/src/main/resources/messages_el_GR.properties index 847bde18..31b18cd9 100644 --- a/src/main/resources/messages_el_GR.properties +++ b/src/main/resources/messages_el_GR.properties @@ -483,61 +483,61 @@ pageLayout.submit=\u03A5\u03C0\u03BF\u03B2\u03BF\u03BB\u03AE #scalePages -scalePages.title=Adjust page-scale -scalePages.header=Adjust page-scale -scalePages.pageSize=Size of a page of the document. -scalePages.scaleFactor=Zoom level (crop) of a page. -scalePages.submit=Submit +scalePages.title=\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03B3\u03AE \u03BA\u03BB\u03AF\u03BC\u03B1\u03BA\u03B1\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2 +scalePages.header=\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03B3\u03AE \u03BA\u03BB\u03AF\u03BC\u03B1\u03BA\u03B1\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2 +scalePages.pageSize=\u039C\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03BC\u03B9\u03B1\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2 \u03C4\u03BF\u03C5 \u03B5\u03B3\u03B3\u03C1\u03AC\u03C6\u03BF\u03C5. +scalePages.scaleFactor=\u0395\u03C0\u03AF\u03C0\u03B5\u03B4\u03BF \u03B6\u03BF\u03C5\u03BC (\u03C0\u03B5\u03C1\u03B9\u03BA\u03BF\u03C0\u03AE) \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2. +scalePages.submit=\u03A5\u03C0\u03BF\u03B2\u03BF\u03BB\u03AE #certSign -certSign.title=Certificate Signing -certSign.header=Sign a PDF with your certificate (Work in progress) -certSign.selectPDF=Select a PDF File for Signing: -certSign.selectKey=Select Your Private Key File (PKCS#8 format, could be .pem or .der): -certSign.selectCert=Select Your Certificate File (X.509 format, could be .pem or .der): -certSign.selectP12=Select Your PKCS#12 Keystore File (.p12 or .pfx) (Optional, If provided, it should contain your private key and certificate): -certSign.certType=Certificate Type -certSign.password=Enter Your Keystore or Private Key Password (If Any): -certSign.showSig=Show Signature -certSign.reason=Reason -certSign.location=Location -certSign.name=Name -certSign.submit=Sign PDF +certSign.title=\u03A5\u03C0\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE \u03A0\u03B9\u03C3\u03C4\u03BF\u03C0\u03BF\u03B9\u03B7\u03C4\u03B9\u03BA\u03BF\u03CD +certSign.header=\u03A5\u03C0\u03BF\u03B3\u03C1\u03AC\u03C8\u03C4\u03B5 \u03AD\u03BD\u03B1 \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF PDF \u03BC\u03B5 \u03C4\u03BF \u03C0\u03B9\u03C3\u03C4\u03BF\u03C0\u03BF\u03B9\u03B7\u03C4\u03B9\u03BA\u03CC \u03C3\u03B1\u03C2 (\u0395\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03C3\u03B5 \u03B5\u03BE\u03AD\u03BB\u03B9\u03BE\u03B7) +certSign.selectPDF=\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 PDF \u03B3\u03B9\u03B1 \u03C5\u03C0\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE: +certSign.selectKey=\u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03C4\u03BF \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF \u03C4\u03BF\u03C5 \u03B9\u03B4\u03B9\u03C9\u03C4\u03B9\u03BA\u03BF\u03CD \u03BA\u03BB\u03B5\u03B9\u03B4\u03B9\u03BF\u03CD \u03C3\u03B1\u03C2 (\u03BC\u03BF\u03C1\u03C6\u03AE PKCS#8, \u03BC\u03C0\u03BF\u03C1\u03B5\u03AF \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 .pem \u03AE .der): +certSign.selectCert=\u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03C4\u03BF \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF \u03C0\u03B9\u03C3\u03C4\u03BF\u03C0\u03BF\u03B9\u03B7\u03C4\u03B9\u03BA\u03BF\u03CD \u03C3\u03B1\u03C2 (\u03BC\u03BF\u03C1\u03C6\u03AE X.509, \u03BC\u03C0\u03BF\u03C1\u03B5\u03AF \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 .pem \u03AE .der): +certSign.selectP12=\u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03C4\u03BF \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF PKCS#12 Keystore (.p12 \u03AE .pfx) (\u03A0\u03C1\u03BF\u03B1\u03B9\u03C1\u03B5\u03C4\u03B9\u03BA\u03CC, \u03B5\u03AC\u03BD \u03C0\u03B1\u03C1\u03AD\u03C7\u03B5\u03C4\u03B1\u03B9, \u03B8\u03B1 \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 \u03C4\u03BF \u03B9\u03B4\u03B9\u03C9\u03C4\u03B9\u03BA\u03CC \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03BA\u03B1\u03B9 \u03C4\u03BF \u03C0\u03B9\u03C3\u03C4\u03BF\u03C0\u03BF\u03B9\u03B7\u03C4\u03B9\u03BA\u03CC \u03C3\u03B1\u03C2): +certSign.certType=\u03A4\u03CD\u03C0\u03BF\u03C2 \u03A0\u03B9\u03C3\u03C4\u03BF\u03C0\u03BF\u03B9\u03B7\u03C4\u03B9\u03BA\u03BF\u03CD +certSign.password=\u0395\u03B9\u03C3\u03B1\u03B3\u03AC\u03B3\u03B5\u03C4\u03B5 \u03C4\u03BF\u03BD \u03BA\u03C9\u03B4\u03B9\u03BA\u03CC \u03C4\u03BF\u03C5 Keystore \u03AE \u03C4\u03BF\u03C5 \u0399\u03B4\u03B9\u03C9\u03C4\u03B9\u03BA\u03BF\u03CD \u039A\u03BB\u03B5\u03B9\u03B4\u03B9\u03BF\u03CD (\u03B5\u03AC\u03BD \u03C5\u03C0\u03AC\u03C1\u03C7\u03B5\u03B9): +certSign.showSig=\u0395\u03BC\u03C6\u03AC\u03BD\u03B9\u03C3\u03B7 \u03A5\u03C0\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE\u03C2 +certSign.reason=\u0391\u03B9\u03C4\u03AF\u03B1 +certSign.location=\u03A4\u03BF\u03C0\u03BF\u03B8\u03B5\u03C3\u03AF\u03B1 +certSign.name=\u038C\u03BD\u03BF\u03BC\u03B1 +certSign.submit=\u03A5\u03C0\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE PDF #removeBlanks -removeBlanks.title=Remove Blanks -removeBlanks.header=Remove Blank Pages -removeBlanks.threshold=Pixel Whiteness Threshold: -removeBlanks.thresholdDesc=Threshold for determining how white a white pixel must be to be classed as 'White'. 0 = Black, 255 pure white. -removeBlanks.whitePercent=White Percent (%): -removeBlanks.whitePercentDesc=Percent of page that must be 'white' pixels to be removed -removeBlanks.submit=Remove Blanks +removeBlanks.title=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u039A\u03B5\u03BD\u03CE\u03BD +removeBlanks.header=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u039A\u03B5\u03BD\u03CE\u03BD \u03A3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD +removeBlanks.threshold=\u038C\u03C1\u03B9\u03BF \u03BB\u03B5\u03C5\u03BA\u03CC\u03C4\u03B7\u03C4\u03B1\u03C2 pixel: +removeBlanks.thresholdDesc=\u038C\u03C1\u03B9\u03BF \u03B3\u03B9\u03B1 \u03C4\u03BF\u03BD \u03C0\u03C1\u03BF\u03C3\u03B4\u03B9\u03BF\u03C1\u03B9\u03C3\u03BC\u03CC \u03C4\u03BF\u03C5 \u03C0\u03CC\u03C3\u03BF \u03BB\u03B5\u03C5\u03BA\u03CC \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03AD\u03BD\u03B1 \u03BB\u03B5\u03C5\u03BA\u03CC \u03B5\u03B9\u03BA\u03BF\u03BD\u03BF\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03BF (pixel) \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03C4\u03B1\u03BE\u03B9\u03BD\u03BF\u03BC\u03B7\u03B8\u03B5\u03AF \u03C9\u03C2 "\u039B\u03B5\u03C5\u03BA\u03CC". 0 = \u039C\u03B1\u03CD\u03C1\u03BF, 255 \u03BA\u03B1\u03B8\u03B1\u03C1\u03CC \u03BB\u03B5\u03C5\u03BA\u03CC. +removeBlanks.whitePercent=\u03A0\u03BF\u03C3\u03BF\u03C3\u03C4\u03CC \u039B\u03B5\u03C5\u03BA\u03BF\u03CD (%): +removeBlanks.whitePercentDesc=\u03A4\u03BF \u03C0\u03BF\u03C3\u03BF\u03C3\u03C4\u03CC \u03C4\u03B7\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2 \u03C0\u03BF\u03C5 \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 "\u03BB\u03B5\u03C5\u03BA\u03AC" pixel \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03B1\u03C6\u03B1\u03B9\u03C1\u03B5\u03B8\u03B5\u03AF +removeBlanks.submit=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u039A\u03B5\u03BD\u03CE\u03BD #compare -compare.title=Compare -compare.header=Compare PDFs -compare.document.1=Document 1 -compare.document.2=Document 2 -compare.submit=Compare +compare.title=\u03A3\u03CD\u03B3\u03BA\u03C1\u03B9\u03C3\u03B7 +compare.header=\u03A3\u03CD\u03B3\u03BA\u03C1\u03B9\u03C3\u03B7 PDFs +compare.document.1=\u0388\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF 1 +compare.document.2=\u0388\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF 2 +compare.submit=\u03A3\u03CD\u03B3\u03BA\u03C1\u03B9\u03C3\u03B7 #sign -sign.title=Sign -sign.header=Sign PDFs -sign.upload=Upload Image -sign.draw=Draw Signature -sign.text=Text Input -sign.clear=Clear -sign.add=Add +sign.title=\u03A5\u03C0\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE +sign.header=\u03A5\u03C0\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE PDFs +sign.upload=\u0391\u03BD\u03AD\u03B2\u03B1\u03C3\u03BC\u03B1 \u0395\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 +sign.draw=\u03A3\u03C7\u03B5\u03B4\u03AF\u03B1\u03C3\u03B7 \u03C5\u03C0\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE\u03C2 +sign.text=\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03BA\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5 +sign.clear=\u039A\u03B1\u03B8\u03AC\u03C1\u03B9\u03C3\u03BC\u03B1 +sign.add=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 #repair -repair.title=Repair -repair.header=Repair PDFs -repair.submit=Repair +repair.title=\u0395\u03C0\u03B9\u03B4\u03B9\u03CC\u03C1\u03B8\u03C9\u03C3\u03B7 +repair.header=\u0395\u03C0\u03B9\u03B4\u03B9\u03CC\u03C1\u03B8\u03C9\u03C3\u03B7 PDFs +repair.submit=\u0395\u03C0\u03B9\u03B4\u03B9\u03CC\u03C1\u03B8\u03C9\u03C3\u03B7 #flatten @@ -547,177 +547,177 @@ flatten.submit=Flatten #ScannerImageSplit -ScannerImageSplit.selectText.1=Angle Threshold: -ScannerImageSplit.selectText.2=Sets the minimum absolute angle required for the image to be rotated (default: 10). -ScannerImageSplit.selectText.3=Tolerance: -ScannerImageSplit.selectText.4=Determines the range of color variation around the estimated background color (default: 30). -ScannerImageSplit.selectText.5=Minimum Area: -ScannerImageSplit.selectText.6=Sets the minimum area threshold for a photo (default: 10000). -ScannerImageSplit.selectText.7=Minimum Contour Area: -ScannerImageSplit.selectText.8=Sets the minimum contour area threshold for a photo -ScannerImageSplit.selectText.9=Border Size: -ScannerImageSplit.selectText.10=Sets the size of the border added and removed to prevent white borders in the output (default: 1). +ScannerImageSplit.selectText.1=\u038C\u03C1\u03B9\u03BF \u03B3\u03C9\u03BD\u03AF\u03B1\u03C2: +ScannerImageSplit.selectText.2=\u039F\u03C1\u03AF\u03B6\u03B5\u03B9 \u03C4\u03B7\u03BD \u03B5\u03BB\u03AC\u03C7\u03B9\u03C3\u03C4\u03B7 \u03B1\u03C0\u03CC\u03BB\u03C5\u03C4\u03B7 \u03B3\u03C9\u03BD\u03AF\u03B1 \u03C0\u03BF\u03C5 \u03B1\u03C0\u03B1\u03B9\u03C4\u03B5\u03AF\u03C4\u03B1\u03B9 \u03B3\u03B9\u03B1 \u03C4\u03B7\u03BD \u03C0\u03B5\u03C1\u03B9\u03C3\u03C4\u03C1\u03BF\u03C6\u03AE \u03C4\u03B7\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 (\u03C0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: 10). +ScannerImageSplit.selectText.3=\u0391\u03BD\u03B5\u03BA\u03C4\u03B9\u03BA\u03CC\u03C4\u03B7\u03C4\u03B1 (Tolerance): +ScannerImageSplit.selectText.4=\u039A\u03B1\u03B8\u03BF\u03C1\u03AF\u03B6\u03B5\u03B9 \u03C4\u03BF \u03B5\u03CD\u03C1\u03BF\u03C2 \u03C4\u03B7\u03C2 \u03C7\u03C1\u03C9\u03BC\u03B1\u03C4\u03B9\u03BA\u03AE\u03C2 \u03B4\u03B9\u03B1\u03BA\u03CD\u03BC\u03B1\u03BD\u03C3\u03B7\u03C2 \u03B3\u03CD\u03C1\u03C9 \u03B1\u03C0\u03CC \u03C4\u03BF \u03B5\u03BA\u03C4\u03B9\u03BC\u03CE\u03BC\u03B5\u03BD\u03BF \u03C7\u03C1\u03CE\u03BC\u03B1 \u03C6\u03CC\u03BD\u03C4\u03BF\u03C5 (\u03C0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: 30). +ScannerImageSplit.selectText.5=\u0395\u03BB\u03AC\u03C7\u03B9\u03C3\u03C4\u03B7 \u03A0\u03B5\u03C1\u03B9\u03BF\u03C7\u03AE: +ScannerImageSplit.selectText.6=\u039F\u03C1\u03AF\u03B6\u03B5\u03B9 \u03C4\u03BF \u03B5\u03BB\u03AC\u03C7\u03B9\u03C3\u03C4\u03BF \u03CC\u03C1\u03B9\u03BF \u03B5\u03C0\u03B9\u03C6\u03AC\u03BD\u03B5\u03B9\u03B1\u03C2 \u03B3\u03B9\u03B1 \u03BC\u03B9\u03B1 \u03C6\u03C9\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AF\u03B1 (\u03C0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: 10000). +ScannerImageSplit.selectText.7=\u0395\u03BB\u03AC\u03C7\u03B9\u03C3\u03C4\u03B7 \u03B5\u03C0\u03B9\u03C6\u03AC\u03BD\u03B5\u03B9\u03B1 \u03C0\u03B5\u03C1\u03B9\u03B3\u03C1\u03AC\u03BC\u03BC\u03B1\u03C4\u03BF\u03C2: +ScannerImageSplit.selectText.8=\u03A1\u03C5\u03B8\u03BC\u03AF\u03B6\u03B5\u03B9 \u03C4\u03BF \u03B5\u03BB\u03AC\u03C7\u03B9\u03C3\u03C4\u03BF \u03CC\u03C1\u03B9\u03BF \u03C0\u03B5\u03C1\u03B9\u03B3\u03C1\u03AC\u03BC\u03BC\u03B1\u03C4\u03BF\u03C2 \u03B3\u03B9\u03B1 \u03BC\u03B9\u03B1 \u03C6\u03C9\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AF\u03B1 +ScannerImageSplit.selectText.9=\u039C\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03C0\u03B5\u03C1\u03B9\u03B3\u03C1\u03AC\u03BC\u03BC\u03B1\u03C4\u03BF\u03C2: +ScannerImageSplit.selectText.10=\u039F\u03C1\u03AF\u03B6\u03B5\u03B9 \u03C4\u03BF \u03BC\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u03C4\u03BF\u03C5 \u03C0\u03B5\u03C1\u03B9\u03B3\u03C1\u03AC\u03BC\u03BC\u03B1\u03C4\u03BF\u03C2 \u03C0\u03BF\u03C5 \u03C0\u03C1\u03BF\u03C3\u03C4\u03AF\u03B8\u03B5\u03C4\u03B1\u03B9 \u03BA\u03B1\u03B9 \u03B1\u03C6\u03B1\u03B9\u03C1\u03B5\u03AF\u03C4\u03B1\u03B9 \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03B1\u03C0\u03BF\u03C4\u03C1\u03AD\u03C0\u03BF\u03BD\u03C4\u03B1\u03B9 \u03BB\u03B5\u03C5\u03BA\u03AC \u03C0\u03B5\u03C1\u03B9\u03B3\u03C1\u03AC\u03BC\u03BC\u03B1\u03C4\u03B1 \u03C3\u03C4\u03B7\u03BD \u03AD\u03BE\u03BF\u03B4\u03BF (\u03C0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: 1). + - #OCR -ocr.title=OCR / Scan Cleanup -ocr.header=Cleanup Scans / OCR (Optical Character Recognition) -ocr.selectText.1=Select languages that are to be detected within the PDF (Ones listed are the ones currently detected): -ocr.selectText.2=Produce text file containing OCR text alongside the OCR'ed PDF -ocr.selectText.3=Correct pages were scanned at a skewed angle by rotating them back into place -ocr.selectText.4=Clean page so its less likely that OCR will find text in background noise. (No output change) -ocr.selectText.5=Clean page so its less likely that OCR will find text in background noise, maintains cleanup in output. -ocr.selectText.6=Ignores pages that have interactive text on them, only OCRs pages that are images -ocr.selectText.7=Force OCR, will OCR Every page removing all original text elements -ocr.selectText.8=Normal (Will error if PDF contains text) -ocr.selectText.9=Additional Settings -ocr.selectText.10=OCR Mode -ocr.selectText.11=Remove images after OCR (Removes ALL images, only useful if part of conversion step) -ocr.selectText.12=Render Type (Advanced) -ocr.help=Please read this documentation on how to use this for other languages and/or use not in docker -ocr.credit=This service uses OCRmyPDF and Tesseract for OCR. -ocr.submit=Process PDF with OCR +ocr.title=\u039F\u03C0\u03C4\u03B9\u03BA\u03AE \u03B1\u03BD\u03B1\u03B3\u03BD\u03CE\u03C1\u03B9\u03C3\u03B7 \u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03C9\u03BD (OCR) / \u03A3\u03B1\u03C1\u03CE\u03C3\u03B5\u03B9\u03C2 Cleanup +ocr.header=\u03A3\u03B1\u03C1\u03CE\u03C3\u03B5\u03B9\u03C2 Cleanup / OCR (Optical Character Recognition - \u039F\u03C0\u03C4\u03B9\u03BA\u03AE \u03B1\u03BD\u03B1\u03B3\u03BD\u03CE\u03C1\u03B9\u03C3\u03B7 \u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03C9\u03BD) +ocr.selectText.1=\u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03B3\u03BB\u03CE\u03C3\u03C3\u03B5\u03C2 \u03C0\u03BF\u03C5 \u03C0\u03C1\u03CC\u03BA\u03B5\u03B9\u03C4\u03B1\u03B9 \u03BD\u03B1 \u03B5\u03BD\u03C4\u03BF\u03C0\u03B9\u03C3\u03C4\u03BF\u03CD\u03BD \u03C3\u03C4\u03BF PDF (\u039F\u03B9 \u03C0\u03BF\u03C5 \u03B1\u03BD\u03B1\u03C6\u03AD\u03C1\u03BF\u03BD\u03C4\u03B1\u03B9 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03B1\u03C5\u03C4\u03AD\u03C2 \u03C0\u03BF\u03C5 \u03B1\u03BD\u03B9\u03C7\u03BD\u03B5\u03CD\u03BF\u03BD\u03C4\u03B1\u03B9 \u03B1\u03C5\u03C4\u03AE\u03BD \u03C4\u03B7 \u03C3\u03C4\u03B9\u03B3\u03BC\u03AE): +ocr.selectText.2=\u0394\u03B7\u03BC\u03B9\u03BF\u03C5\u03C1\u03B3\u03AE\u03C3\u03C4\u03B5 \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF \u03BA\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5 \u03C0\u03BF\u03C5 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 \u03BA\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF OCR \u03BC\u03B1\u03B6\u03AF \u03BC\u03B5 \u03C4\u03BF PDF \u03C0\u03BF\u03C5 \u03AD\u03C7\u03B5\u03B9 \u03C5\u03C0\u03BF\u03B2\u03BB\u03B7\u03B8\u03B5\u03AF \u03C3\u03B5 OCR +ocr.selectText.3=\u039F\u03B9 \u03C3\u03C9\u03C3\u03C4\u03AD\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B5\u03C2 \u03C3\u03B1\u03C1\u03CE\u03B8\u03B7\u03BA\u03B1\u03BD \u03BC\u03B5 \u03BB\u03BF\u03BE\u03AE \u03B3\u03C9\u03BD\u03AF\u03B1 \u03C0\u03B5\u03C1\u03B9\u03C3\u03C4\u03C1\u03AD\u03C6\u03BF\u03BD\u03C4\u03AC\u03C2 \u03C4\u03B5\u03C2 \u03C3\u03C4\u03B7 \u03B8\u03AD\u03C3\u03B7 \u03C4\u03BF\u03C5\u03C2 +ocr.selectText.4=C\u039A\u03B1\u03B8\u03B1\u03C1\u03AF\u03C3\u03C4\u03B5 \u03C4\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1, \u03CE\u03C3\u03C4\u03B5 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03BB\u03B9\u03B3\u03CC\u03C4\u03B5\u03C1\u03BF \u03C0\u03B9\u03B8\u03B1\u03BD\u03CC \u03C4\u03BF OCR \u03BD\u03B1 \u03B2\u03C1\u03B5\u03B9 \u03BA\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF \u03C3\u03C4\u03BF \u03B8\u03CC\u03C1\u03C5\u03B2\u03BF \u03C6\u03CC\u03BD\u03C4\u03BF\u03C5 (background noise). (\u039A\u03B1\u03BC\u03AF\u03B1 \u03B1\u03BB\u03BB\u03B1\u03B3\u03AE \u03C3\u03C4\u03BF \u03B5\u03BE\u03B1\u03B3\u03CC\u03BC\u03B5\u03BD\u03BF) +ocr.selectText.5=\u039A\u03B1\u03B8\u03B1\u03C1\u03AF\u03C3\u03C4\u03B5 \u03C4\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1, \u03CE\u03C3\u03C4\u03B5 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03BB\u03B9\u03B3\u03CC\u03C4\u03B5\u03C1\u03BF \u03C0\u03B9\u03B8\u03B1\u03BD\u03CC \u03C4\u03BF OCR \u03BD\u03B1 \u03B2\u03C1\u03B5\u03B9 \u03BA\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF \u03C3\u03C4\u03BF \u03B8\u03CC\u03C1\u03C5\u03B2\u03BF \u03C6\u03CC\u03BD\u03C4\u03BF\u03C5, \u03B4\u03B9\u03B1\u03C4\u03B7\u03C1\u03B5\u03AF \u03C4\u03B7\u03BD \u03B5\u03BA\u03BA\u03B1\u03B8\u03AC\u03C1\u03B9\u03C3\u03B7 \u03C3\u03C4\u03BF \u03C0\u03B1\u03C1\u03B1\u03B3\u03CC\u03BC\u03B5\u03BD\u03BF. +ocr.selectText.6=\u0391\u03B3\u03BD\u03BF\u03B5\u03AF \u03C4\u03B9\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B5\u03C2 \u03C0\u03BF\u03C5 \u03AD\u03C7\u03BF\u03C5\u03BD \u03B4\u03B9\u03B1\u03B4\u03C1\u03B1\u03C3\u03C4\u03B9\u03BA\u03CC \u03BA\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF, \u03BC\u03CC\u03BD\u03BF \u03C4\u03B9\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B5\u03C2 OCR \u03C0\u03BF\u03C5 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B5\u03C2 +ocr.selectText.7=\u0395\u03C0\u03B9\u03B2\u03BF\u03BB\u03AE OCR, \u03B8\u03B1 \u03C0\u03C1\u03B1\u03B3\u03BC\u03B1\u03C4\u03BF\u03C0\u03BF\u03B9\u03AE\u03C3\u03B5\u03B9 \u039F\u03C0\u03C4\u03B9\u03BA\u03AE \u03B1\u03BD\u03B1\u03B3\u03BD\u03CE\u03C1\u03B9\u03C3\u03B7 \u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03C9\u03BD \u03C3\u03B5 \u03BA\u03AC\u03B8\u03B5 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1 \u03B1\u03C6\u03B1\u03B9\u03C1\u03CE\u03BD\u03C4\u03B1\u03C2 \u03CC\u03BB\u03BF \u03C4\u03B1 \u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1 \u03C4\u03BF\u03C5 \u03B1\u03C1\u03C7\u03B9\u03BA\u03BF\u03CD \u03BA\u03B5\u03AF\u03BC\u03AD\u03BD\u03BF\u03C5 +ocr.selectText.8=\u039A\u03B1\u03BD\u03BF\u03BD\u03B9\u03BA\u03CC (\u0398\u03B1 \u03C0\u03B1\u03C1\u03AC\u03BE\u03B5\u03B9 \u03C3\u03C6\u03AC\u03BB\u03BC\u03B1 \u03B1\u03BD \u03C4\u03BF PDF \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 \u03BA\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF) +ocr.selectText.9=\u0395\u03C0\u03B9\u03C0\u03C1\u03CC\u03C3\u03B8\u03B5\u03C4\u03B5\u03C2 \u03A1\u03C5\u03B8\u03BC\u03AF\u03C3\u03B5\u03B9\u03C2 +ocr.selectText.10=\u039B\u03B5\u03B9\u03C4\u03BF\u03C5\u03C1\u03B3\u03AF\u03B1 OCR +ocr.selectText.11=\u039A\u03B1\u03C4\u03AC\u03C1\u03B3\u03B7\u03C3\u03B7 \u03B5\u03B9\u03BA\u03CC\u03BD\u03C9\u03BD \u03BC\u03B5\u03C4\u03AC \u03C4\u03BF OCR (\u039A\u03B1\u03C4\u03B1\u03C1\u03B3\u03B5\u03AF \u039F\u039B\u0395\u03A3 \u03C4\u03B9\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B5\u03C2, \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C7\u03C1\u03AE\u03C3\u03B9\u03BC\u03BF \u03BC\u03CC\u03BD\u03BF \u03B1\u03BD \u03B1\u03C0\u03BF\u03C4\u03B5\u03BB\u03B5\u03AF \u03BC\u03AD\u03C1\u03BF\u03C2 \u03C4\u03BF\u03C5 \u03B2\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2 \u03BC\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE\u03C2) +ocr.selectText.12=\u03A4\u03CD\u03C0\u03BF\u03C2 \u03B1\u03C0\u03CC\u03B4\u03BF\u03C3\u03B7\u03C2 (\u0393\u03B9\u03B1 \u03C0\u03C1\u03BF\u03C7\u03C9\u03C1\u03B7\u03BC\u03AD\u03BD\u03BF\u03C5\u03C2) +ocr.help=\u0394\u03B9\u03B1\u03B2\u03AC\u03C3\u03C4\u03B5 \u03B1\u03C5\u03C4\u03AE\u03BD \u03C4\u03B7\u03BD \u03C4\u03B5\u03BA\u03BC\u03B7\u03C1\u03AF\u03C9\u03C3\u03B7 \u03C3\u03C7\u03B5\u03C4\u03B9\u03BA\u03AC \u03BC\u03B5 \u03C4\u03BF\u03BD \u03C4\u03C1\u03CC\u03C0\u03BF \u03C7\u03C1\u03AE\u03C3\u03B7\u03C2 \u03B1\u03C5\u03C4\u03AE\u03C2 \u03B3\u03B9\u03B1 \u03AC\u03BB\u03BB\u03B5\u03C2 \u03B3\u03BB\u03CE\u03C3\u03C3\u03B5\u03C2 \u03AE/\u03BA\u03B1\u03B9 \u03BC\u03B7 \u03C7\u03C1\u03AE\u03C3\u03B7\u03C2 \u03C3\u03B5 docker +ocr.credit=\u0391\u03C5\u03C4\u03AE \u03B7 \u03C5\u03C0\u03B7\u03C1\u03B5\u03C3\u03AF\u03B1 \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF OCRmyPDF \u03BA\u03B1\u03B9 Tesseract \u03B3\u03B9\u03B1 OCR. +ocr.submit=\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 PDF \u03BC\u03B5 OCR #extractImages -extractImages.title=Extract Images -extractImages.header=Extract Images -extractImages.selectText=Select image format to convert extracted images to -extractImages.submit=Extract +extractImages.title=\u0395\u03BE\u03B1\u03B3\u03C9\u03B3\u03AE \u0395\u03B9\u03BA\u03CC\u03BD\u03C9\u03BD +extractImages.header=\u0395\u03BE\u03B1\u03B3\u03C9\u03B3\u03AE \u0395\u03B9\u03BA\u03CC\u03BD\u03C9\u03BD +extractImages.selectText=\u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03BC\u03BF\u03C1\u03C6\u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03BC\u03B5\u03C4\u03B1\u03C4\u03C1\u03AD\u03C8\u03B5\u03C4\u03B5 \u03C4\u03B9\u03C2 \u03B5\u03BE\u03B1\u03B3\u03CC\u03BC\u03B5\u03BD\u03B5\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B5\u03C2 +extractImages.submit=\u0395\u03BE\u03B1\u03B3\u03C9\u03B3\u03AE #File to PDF -fileToPDF.title=File to PDF -fileToPDF.header=Convert any file to PDF -fileToPDF.credit=This service uses LibreOffice and Unoconv for file conversion. -fileToPDF.supportedFileTypes=Supported file types should include the below however for a full updated list of supported formats, please refer to the LibreOffice documentation -fileToPDF.submit=Convert to PDF +fileToPDF.title=\u0391\u03C1\u03C7\u03B5\u03AF\u03BF \u03C3\u03B5 PDF +fileToPDF.header=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03BF\u03C0\u03BF\u03B9\u03BF\u03C5\u03B4\u03AE\u03C0\u03BF\u03C4\u03B5 \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 \u03C3\u03B5 PDF +fileToPDF.credit=\u0391\u03C5\u03C4\u03AE \u03B7 \u03C5\u03C0\u03B7\u03C1\u03B5\u03C3\u03AF\u03B1 \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF LibreOffice \u03BA\u03B1\u03B9 Unoconv \u03B3\u03B9\u03B1 \u03C4\u03B7\u03BD \u03BC\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03C9\u03BD \u03B1\u03C1\u03C7\u03B5\u03AF\u03C9\u03BD. +fileToPDF.supportedFileTypes=\u039F\u03B9 \u03C5\u03C0\u03BF\u03C3\u03C4\u03B7\u03C1\u03B9\u03B6\u03CC\u03BC\u03B5\u03BD\u03BF\u03B9 \u03C4\u03CD\u03C0\u03BF\u03B9 \u03B1\u03C1\u03C7\u03B5\u03AF\u03C9\u03BD \u03B8\u03B1 \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03BB\u03B1\u03BC\u03B2\u03AC\u03BD\u03BF\u03C5\u03BD \u03C4\u03B1 \u03C0\u03B1\u03C1\u03B1\u03BA\u03AC\u03C4\u03C9, \u03C9\u03C3\u03C4\u03CC\u03C3\u03BF, \u03B3\u03B9\u03B1 \u03BC\u03B9\u03B1 \u03C0\u03BB\u03AE\u03C1\u03B7 \u03B5\u03BD\u03B7\u03BC\u03B5\u03C1\u03C9\u03BC\u03AD\u03BD\u03B7 \u03BB\u03AF\u03C3\u03C4\u03B1 \u03BC\u03B5 \u03C4\u03B9\u03C2 \u03C5\u03C0\u03BF\u03C3\u03C4\u03B7\u03C1\u03B9\u03B6\u03CC\u03BC\u03B5\u03BD\u03B5\u03C2 \u03BC\u03BF\u03C1\u03C6\u03AD\u03C2, \u03B1\u03BD\u03B1\u03C4\u03C1\u03AD\u03BE\u03C4\u03B5 \u03C3\u03C4\u03B7\u03BD \u03C4\u03B5\u03BA\u03BC\u03B7\u03C1\u03AF\u03C9\u03C3\u03B7 \u03C4\u03BF\u03C5 LibreOffice +fileToPDF.submit=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C3\u03B5 PDF #compress -compress.title=Compress -compress.header=Compress PDF -compress.credit=This service uses Ghostscript for PDF Compress/Optimisation. -compress.selectText.1=Manual Mode - From 1 to 4 -compress.selectText.2=Optimization level: -compress.selectText.3=4 (Terrible for text images) -compress.selectText.4=Auto mode - Auto adjusts quality to get PDF to exact size -compress.selectText.5=Expected PDF Size (e.g. 25MB, 10.8MB, 25KB) -compress.submit=Compress +compress.title=\u03A3\u03C5\u03BC\u03C0\u03AF\u03B5\u03C3\u03B7 +compress.header=\u03A3\u03C5\u03BC\u03C0\u03AF\u03B5\u03C3\u03B7 PDF +compress.credit=\u0391\u03C5\u03C4\u03AE \u03B7 \u03C5\u03C0\u03B7\u03C1\u03B5\u03C3\u03AF\u03B1 \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF Ghostscript \u03B3\u03B9\u03B1 PDF \u03A3\u03C5\u03BC\u03C0\u03AF\u03B5\u03C3\u03B7/\u0392\u03B5\u03BB\u03C4\u03B9\u03C3\u03C4\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7. +compress.selectText.1=\u03A7\u03B5\u03B9\u03C1\u03BF\u03BA\u03AF\u03BD\u03B7\u03C4\u03B7 \u039B\u03B5\u03B9\u03C4\u03BF\u03C5\u03C1\u03B3\u03AF\u03B1 - \u0391\u03C0\u03CC 1 \u03AD\u03C9\u03C2 4 +compress.selectText.2=\u0395\u03C0\u03AF\u03C0\u03B5\u03B4\u03BF \u0392\u03B5\u03BB\u03C4\u03B9\u03C3\u03C4\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7\u03C2: +compress.selectText.3=4 (\u03A0\u03BF\u03BB\u03CD \u03BA\u03B1\u03BA\u03CC \u03B3\u03B9\u03B1 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B5\u03C2 \u03BA\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5) +compress.selectText.4=\u0391\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03B7 \u039B\u03B5\u03B9\u03C4\u03BF\u03C5\u03C1\u03B3\u03AF\u03B1 - Auto mode - \u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03CC\u03B6\u03B5\u03B9 \u03B1\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03B1 \u03C4\u03B7\u03BD \u03C0\u03BF\u03B9\u03CC\u03C4\u03B7\u03C4\u03B1 \u03B3\u03B9\u03B1 \u03BB\u03AE\u03C8\u03B7 PDF \u03C3\u03C4\u03BF \u03B1\u03BA\u03C1\u03B9\u03B2\u03AD\u03C2 \u03BC\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 +compress.selectText.5=\u0391\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03BC\u03B5\u03BD\u03BF \u039C\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 PDF (\u03C0.\u03C7 25MB, 10.8MB, 25KB) +compress.submit=\u03A3\u03C5\u03BC\u03C0\u03AF\u03B5\u03C3\u03B7 #Add image -addImage.title=Add Image -addImage.header=Add image to PDF -addImage.everyPage=Every Page? -addImage.upload=Add image -addImage.submit=Add image +addImage.title=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u0395\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 +addImage.header=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u0395\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 \u03C3\u03B5 PDF +addImage.everyPage=\u039A\u03AC\u03B8\u03B5 \u03A3\u03B5\u03BB\u03AF\u03B4\u03B1? +addImage.upload=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u0395\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 +addImage.submit=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u0395\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 #merge -merge.title=Merge -merge.header=Merge multiple PDFs (2+) -merge.sortByName=Sort by name -merge.sortByDate=Sort by date -merge.submit=Merge +merge.title=\u03A3\u03C5\u03B3\u03C7\u03CE\u03BD\u03B5\u03C5\u03C3\u03B7 +merge.header=\u03A3\u03C5\u03B3\u03C7\u03CE\u03BD\u03B5\u03C5\u03C3\u03B7 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03CE\u03BD PDFs (2+) +merge.sortByName=\u03A4\u03B1\u03BE\u03B9\u03BD\u03CC\u03BC\u03B7\u03C3\u03B7 \u03BC\u03B5 \u03B2\u03AC\u03C3\u03B7 \u03C4\u03BF \u038C\u03BD\u03BF\u03BC\u03B1 +merge.sortByDate=\u03A4\u03B1\u03BE\u03B9\u03BD\u03CC\u03BC\u03B7\u03C3\u03B7 \u03BC\u03B5 \u03B2\u03AC\u03C3\u03B7 \u03C4\u03B7\u03BD \u0397\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 +merge.submit=\u03A3\u03C5\u03B3\u03C7\u03CE\u03BD\u03B5\u03C5\u03C3\u03B7 #pdfOrganiser -pdfOrganiser.title=Page Organiser -pdfOrganiser.header=PDF Page Organiser -pdfOrganiser.submit=Rearrange Pages +pdfOrganiser.title=\u0394\u03B9\u03BF\u03C1\u03B3\u03B1\u03BD\u03C9\u03C4\u03AE\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2 +pdfOrganiser.header=\u0394\u03B9\u03BF\u03C1\u03B3\u03B1\u03BD\u03C9\u03C4\u03AE\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2 PDF +pdfOrganiser.submit=\u0391\u03BD\u03B1\u03B4\u03B9\u03AC\u03C4\u03B1\u03BE\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD #multiTool -multiTool.title=PDF Multi Tool -multiTool.header=PDF Multi Tool +multiTool.title=PDF \u03A0\u03BF\u03BB\u03C5\u03B5\u03C1\u03B3\u03B1\u03BB\u03B5\u03AF\u03BF +multiTool.header=PDF \u03A0\u03BF\u03BB\u03C5\u03B5\u03C1\u03B3\u03B1\u03BB\u03B5\u03AF\u03BF #pageRemover -pageRemover.title=Page Remover -pageRemover.header=PDF Page remover -pageRemover.pagesToDelete=Pages to delete (Enter a comma-separated list of page numbers) : -pageRemover.submit=Delete Pages +pageRemover.title=\u0391\u03C6\u03B1\u03B9\u03C1\u03B5\u03C4\u03AE\u03C2 \u03A3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD +pageRemover.header=\u0391\u03C6\u03B1\u03B9\u03C1\u03B5\u03C4\u03AE\u03C2 \u03A3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD PDF +pageRemover.pagesToDelete=\u03A3\u03B5\u03BB\u03AF\u03B4\u03B5\u03C2 \u03C0\u03C1\u03BF\u03C2 \u03B4\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE (\u0395\u03B9\u03C3\u03B1\u03B3\u03AC\u03B3\u03B5\u03C4\u03B5 \u03BC\u03B9\u03B1 \u03BB\u03AF\u03C3\u03C4\u03B1 \u03BC\u03B5 \u03B1\u03C1\u03B9\u03B8\u03BC\u03BF\u03CD\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD \u03B4\u03B9\u03B1\u03C7\u03C9\u03C1\u03B9\u03C3\u03BC\u03AD\u03BD\u03C9\u03BD \u03BC\u03B5 \u03BA\u03CC\u03BC\u03BC\u03B1\u03C4\u03B1): +pageRemover.submit=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03A3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD #rotate -rotate.title=Rotate PDF -rotate.header=Rotate PDF -rotate.selectAngle=Select rotation angle (in multiples of 90 degrees): +rotate.title=\u03A0\u03B5\u03C1\u03B9\u03C3\u03C4\u03C1\u03BF\u03C6\u03AE PDF +rotate.header=\u03A0\u03B5\u03C1\u03B9\u03C3\u03C4\u03C1\u03BF\u03C6\u03AE PDF +rotate.\u03A0\u03B5\u03C1\u03B9\u03C3\u03C4\u03C1\u03BF\u03C6\u03AE=\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03B3\u03C9\u03BD\u03AF\u03B1\u03C2 \u03C0\u03B5\u03C1\u03B9\u03C3\u03C4\u03C1\u03BF\u03C6\u03AE\u03C2 (\u03C3\u03B5 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03C9\u03BD 90 \u03BC\u03BF\u03B9\u03C1\u03CE\u03BD): rotate.submit=Rotate #merge -split.title=Split PDF -split.header=Split PDF -split.desc.1=The numbers you select are the page number you wish to do a split on -split.desc.2=As such selecting 1,3,7-8 would split a 10 page document into 6 separate PDFS with: -split.desc.3=Document #1: Page 1 -split.desc.4=Document #2: Page 2 and 3 -split.desc.5=Document #3: Page 4, 5 and 6 -split.desc.6=Document #4: Page 7 -split.desc.7=Document #5: Page 8 -split.desc.8=Document #6: Page 9 and 10 -split.splitPages=Enter pages to split on: -split.submit=Split +split.title=\u0394\u03B9\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 PDF +split.header=\u0394\u03B9\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 PDF +split.desc.1=\u039F\u03B9 \u03B1\u03C1\u03B9\u03B8\u03BC\u03BF\u03AF \u03C0\u03BF\u03C5 \u03B5\u03C0\u03B9\u03BB\u03AD\u03B3\u03B5\u03C4\u03B5 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03BF \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2 \u03C3\u03C4\u03BF\u03BD \u03BF\u03C0\u03BF\u03AF\u03BF \u03B8\u03AD\u03BB\u03B5\u03C4\u03B5 \u03BD\u03B1 \u03BA\u03AC\u03BD\u03B5\u03C4\u03B5 \u03B4\u03B9\u03B1\u03C7\u03C9\u03C1\u03B9\u03C3\u03BC\u03CC +split.desc.2=\u03A9\u03C2 \u03B5\u03BA \u03C4\u03BF\u03CD\u03C4\u03BF\u03C5, \u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE 1,3,7-8 \u03B8\u03B1 \u03C7\u03C9\u03C1\u03AF\u03C3\u03B5\u03B9 \u03AD\u03BD\u03B1 \u03AD\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF 10 \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD \u03C3\u03B5 6 \u03BE\u03B5\u03C7\u03C9\u03C1\u03B9\u03C3\u03C4\u03AC \u03B1\u03C1\u03C7\u03B5\u03AF\u03B1 PDF \u03BC\u03B5: +split.desc.3=\u0388\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF #1: \u03A3\u03B5\u03BB\u03AF\u03B4\u03B1 1 +split.desc.4=\u0388\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF #2: \u03A3\u03B5\u03BB\u03AF\u03B4\u03B1 2 \u03BA\u03B1\u03B9 3 +split.desc.5=\u0388\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF #3: \u03A3\u03B5\u03BB\u03AF\u03B4\u03B1 4, 5 \u03BA\u03C3\u03B9 6 +split.desc.6=\u0388\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF #4: \u03A3\u03B5\u03BB\u03AF\u03B4\u03B1 7 +split.desc.7=\u0388\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF #5: \u03A3\u03B5\u03BB\u03AF\u03B4\u03B1 8 +split.desc.8=\u0388\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF #6: \u03A3\u03B5\u03BB\u03AF\u03B4\u03B1 9 \u03BA\u03B1\u03B9 10 +split.splitPages=\u0395\u03B9\u03C3\u03B1\u03B3\u03AC\u03B3\u03B5\u03C4\u03B5 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B5\u03C2 \u03B3\u03B9\u03B1 \u03B4\u03B9\u03B1\u03C7\u03C9\u03C1\u03B9\u03C3\u03BC\u03CC: +split.submit=\u0394\u03B9\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 #merge -imageToPDF.title=Image to PDF -imageToPDF.header=Image to PDF -imageToPDF.submit=Convert -imageToPDF.selectLabel=Image Fit Options -imageToPDF.fillPage=Fill Page -imageToPDF.fitDocumentToImage=Fit Page to Image -imageToPDF.maintainAspectRatio=Maintain Aspect Ratios -imageToPDF.selectText.2=Auto rotate PDF -imageToPDF.selectText.3=Multi file logic (Only enabled if working with multiple images) -imageToPDF.selectText.4=Merge into single PDF -imageToPDF.selectText.5=Convert to separate PDFs +imageToPDF.title=\u0395\u03B9\u03BA\u03CC\u03BD\u03B1 \u03C3\u03B5 PDF +imageToPDF.header=\u0395\u03B9\u03BA\u03CC\u03BD\u03B1 \u03C3\u03B5 PDF +imageToPDF.submit=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE +imageToPDF.selectLabel=\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 \u03C0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03B3\u03AE\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 +imageToPDF.fillPage=\u0393\u03AD\u03BC\u03B9\u03C3\u03BC\u03B1 \u03A3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2 +imageToPDF.fitDocumentToImage=\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03B3\u03AE \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2 \u03C3\u03B5 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1 +imageToPDF.maintainAspectRatio=\u0394\u03B9\u03B1\u03C4\u03AE\u03C1\u03B7\u03C3\u03B7 \u03B1\u03BD\u03B1\u03BB\u03BF\u03B3\u03B9\u03CE\u03BD \u03B4\u03B9\u03B1\u03C3\u03C4\u03AC\u03C3\u03B5\u03C9\u03BD +imageToPDF.selectText.2=\u0391\u03C5\u03C4\u03CC\u03BC\u03B1\u03C4\u03B7 \u03C0\u03B5\u03C1\u03B9\u03C3\u03C4\u03C1\u03BF\u03C6\u03AE PDF +imageToPDF.selectText.3=\u039B\u03BF\u03B3\u03B9\u03BA\u03AE \u03C0\u03BF\u03BB\u03BB\u03CE\u03BD \u03B1\u03C1\u03C7\u03B5\u03AF\u03C9\u03BD (\u0395\u03BD\u03B5\u03C1\u03B3\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF\u03C4\u03B1\u03B9 \u03BC\u03CC\u03BD\u03BF \u03B5\u03AC\u03BD \u03B5\u03C1\u03B3\u03AC\u03B6\u03B5\u03C3\u03C4\u03B5 \u03BC\u03B5 \u03C0\u03BF\u03BB\u03BB\u03AD\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B5\u03C2) +imageToPDF.selectText.4=\u03A3\u03C5\u03B3\u03C7\u03CE\u03BD\u03B5\u03C5\u03C3\u03B7 \u03C3\u03B5 \u03AD\u03BD\u03B1 PDF +imageToPDF.selectText.5=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C3\u03B5 \u03BE\u03B5\u03C7\u03C9\u03C1\u03B9\u03C3\u03C4\u03AC \u03B1\u03C1\u03C7\u03B5\u03AF\u03B1 PDF #pdfToImage -pdfToImage.title=PDF to Image -pdfToImage.header=PDF to Image -pdfToImage.selectText=Image Format -pdfToImage.singleOrMultiple=Page to Image result type -pdfToImage.single=Single Big Image Combing all pages -pdfToImage.multi=Multiple Images, one image per page -pdfToImage.colorType=Colour type -pdfToImage.color=Colour -pdfToImage.grey=Greyscale -pdfToImage.blackwhite=Black and White (May lose data!) -pdfToImage.submit=Convert +pdfToImage.title=PDF \u03C3\u03B5 \u0395\u03B9\u03BA\u03CC\u03BD\u03B1 +pdfToImage.header=PDF \u03C3\u03B5 \u0395\u03B9\u03BA\u03CC\u03BD\u03B1 +pdfToImage.selectText=\u039C\u03BF\u03C1\u03C6\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 +pdfToImage.singleOrMultiple=\u03A4\u03CD\u03C0\u03BF\u03C2 \u03B1\u03C0\u03BF\u03C4\u03B5\u03BB\u03AD\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2 \u03B1\u03C0\u03CC \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1 \u03C3\u03B5 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1 +pdfToImage.single=\u0395\u03BD\u03B9\u03B1\u03AF\u03B1 \u03BC\u03B5\u03B3\u03AC\u03BB\u03B7 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1 \u03C0\u03BF\u03C5 \u03C3\u03C5\u03BD\u03B4\u03C5\u03AC\u03B6\u03B5\u03B9 \u03CC\u03BB\u03B5\u03C2 \u03C4\u03B9\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B5\u03C2 +pdfToImage.multi=\u03A0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AD\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B5\u03C2, \u03BC\u03AF\u03B1 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1 \u03B1\u03BD\u03AC \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1 +pdfToImage.colorType=\u03A4\u03CD\u03C0\u03BF\u03C2 \u03A7\u03C1\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2 +pdfToImage.color=\u03A7\u03C1\u03CE\u03BC\u03B1 +pdfToImage.grey=\u039A\u03BB\u03AF\u03BC\u03B1\u03BA\u03B1 \u03C4\u03BF\u03C5 \u03B3\u03BA\u03C1\u03B9 +pdfToImage.blackwhite=\u0391\u03C3\u03C0\u03C1\u03CC\u03BC\u03B1\u03C5\u03C1\u03BF (\u039C\u03C0\u03BF\u03C1\u03B5\u03AF \u03BD\u03B1 \u03C7\u03B1\u03B8\u03BF\u03CD\u03BD \u03B4\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03B1!) +pdfToImage.submit=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE #addPassword -addPassword.title=Add Password -addPassword.header=Add password (Encrypt) -addPassword.selectText.1=Select PDF to encrypt -addPassword.selectText.2=User Password -addPassword.selectText.3=Encryption Key Length -addPassword.selectText.4=Higher values are stronger, but lower values have better compatibility. -addPassword.selectText.5=Permissions to set (Recommended to be used along with Owner password) -addPassword.selectText.6=Prevent assembly of document -addPassword.selectText.7=Prevent content extraction -addPassword.selectText.8=Prevent extraction for accessibility -addPassword.selectText.9=Prevent filling in form -addPassword.selectText.10=Prevent modification -addPassword.selectText.11=Prevent annotation modification -addPassword.selectText.12=Prevent printing -addPassword.selectText.13=Prevent printing different formats -addPassword.selectText.14=Owner Password -addPassword.selectText.15=Restricts what can be done with the document once it is opened (Not supported by all readers) -addPassword.selectText.16=Restricts the opening of the document itself -addPassword.submit=Encrypt +addPassword.title=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u039A\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD +addPassword.header=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u039A\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD (\u039A\u03C1\u03C5\u03C0\u03C4\u03BF\u03B3\u03C1\u03AC\u03C6\u03B7\u03C3\u03B7) +addPassword.selectText.1=\u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 PDF \u03B3\u03B9\u03B1 \u03BA\u03C1\u03C5\u03C0\u03C4\u03BF\u03B3\u03C1\u03AC\u03C6\u03B7\u03C3\u03B7 +addPassword.selectText.2=\u039A\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03A7\u03C1\u03AE\u03C3\u03C4\u03B7 +addPassword.selectText.3=\u039C\u03AE\u03BA\u03BF\u03C2 \u039A\u03BB\u03B5\u03B9\u03B4\u03B9\u03BF\u03CD \u039A\u03C1\u03C5\u03C0\u03C4\u03BF\u03B3\u03C1\u03AC\u03C6\u03B7\u03C3\u03B7\u03C2 +addPassword.selectText.4=\u039F\u03B9 \u03C5\u03C8\u03B7\u03BB\u03CC\u03C4\u03B5\u03C1\u03B5\u03C2 \u03C4\u03B9\u03BC\u03AD\u03C2 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03B9\u03C3\u03C7\u03C5\u03C1\u03CC\u03C4\u03B5\u03C1\u03B5\u03C2, \u03B1\u03BB\u03BB\u03AC \u03BF\u03B9 \u03C7\u03B1\u03BC\u03B7\u03BB\u03CC\u03C4\u03B5\u03C1\u03B5\u03C2 \u03C4\u03B9\u03BC\u03AD\u03C2 \u03AD\u03C7\u03BF\u03C5\u03BD \u03BA\u03B1\u03BB\u03CD\u03C4\u03B5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03B1\u03C4\u03CC\u03C4\u03B7\u03C4\u03B1. +addPassword.selectText.5=\u0394\u03B9\u03BA\u03B1\u03B9\u03CE\u03BC\u03B1\u03C4\u03B1 \u03B3\u03B9\u03B1 \u03C1\u03CD\u03B8\u03BC\u03B9\u03C3\u03B7 (\u03A3\u03C5\u03BD\u03B9\u03C3\u03C4\u03AC\u03C4\u03B1\u03B9 \u03BD\u03B1 \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF\u03C4\u03B1\u03B9 \u03BC\u03B1\u03B6\u03AF \u03BC\u03B5 \u03C4\u03BF\u03BD \u03BA\u03C9\u03B4\u03B9\u03BA\u03CC \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2 \u03BA\u03B1\u03C4\u03CC\u03C7\u03BF\u03C5 (Owner password) +addPassword.selectText.6=\u0391\u03C0\u03BF\u03C4\u03C1\u03BF\u03C0\u03AE \u03C3\u03C5\u03BD\u03B1\u03C1\u03BC\u03BF\u03BB\u03CC\u03B3\u03B7\u03C3\u03B7\u03C2 \u03B5\u03B3\u03B3\u03C1\u03AC\u03C6\u03BF\u03C5 +addPassword.selectText.7=\u0391\u03C0\u03BF\u03C4\u03C1\u03BF\u03C0\u03AE \u03B5\u03BE\u03B1\u03B3\u03C9\u03B3\u03AE\u03C2 \u03C0\u03B5\u03C1\u03B9\u03B5\u03C7\u03BF\u03BC\u03AD\u03BD\u03BF\u03C5 +addPassword.selectText.8=\u0391\u03C0\u03BF\u03C4\u03C1\u03BF\u03C0\u03AE \u03B5\u03BE\u03B1\u03B3\u03C9\u03B3\u03AE\u03C2 \u03B3\u03B9\u03B1 \u03C0\u03C1\u03BF\u03C3\u03B2\u03B1\u03C3\u03B9\u03BC\u03CC\u03C4\u03B7\u03C4\u03B1 +addPassword.selectText.9=\u0391\u03C0\u03BF\u03C4\u03C1\u03BF\u03C0\u03AE \u03C3\u03C5\u03BC\u03C0\u03BB\u03AE\u03C1\u03C9\u03C3\u03B7\u03C2 \u03C6\u03CC\u03C1\u03BC\u03B1\u03C2 +addPassword.selectText.10=\u0391\u03C0\u03BF\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03C1\u03BF\u03C0\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7\u03C2 +addPassword.selectText.11=\u0391\u03C0\u03BF\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03C1\u03BF\u03C0\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7\u03C2 annotation +addPassword.selectText.12=\u0391\u03C0\u03BF\u03C4\u03C1\u03BF\u03C0\u03AE \u03B5\u03BA\u03C4\u03CD\u03C0\u03C9\u03C3\u03B7\u03C2 +addPassword.selectText.13=\u0391\u03C0\u03BF\u03C4\u03C1\u03BF\u03C0\u03AE \u03B5\u03BA\u03C4\u03CD\u03C0\u03C9\u03C3\u03B7\u03C2 \u03C3\u03B5 \u03B4\u03B9\u03B1\u03C6\u03BF\u03C1\u03B5\u03C4\u03B9\u03BA\u03BF\u03CD\u03C2 \u03C4\u03CD\u03C0\u03BF\u03C5\u03C2 \u03B1\u03C1\u03C7\u03B5\u03AF\u03C9\u03BD +addPassword.selectText.14=\u039A\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2 \u03BA\u03B1\u03C4\u03CC\u03C7\u03BF\u03C5 +addPassword.selectText.15=\u03A0\u03B5\u03C1\u03B9\u03BF\u03C1\u03AF\u03B6\u03B5\u03B9 \u03CC,\u03C4\u03B9 \u03BC\u03C0\u03BF\u03C1\u03B5\u03AF \u03BD\u03B1 \u03B3\u03AF\u03BD\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03AD\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF \u03BC\u03B5\u03C4\u03AC \u03C4\u03BF \u03AC\u03BD\u03BF\u03B9\u03B3\u03BC\u03B1 (\u0394\u03B5\u03BD \u03C5\u03C0\u03BF\u03C3\u03C4\u03B7\u03C1\u03AF\u03B6\u03B5\u03C4\u03B1\u03B9 \u03B1\u03C0\u03CC \u03CC\u03BB\u03BF\u03C5\u03C2 \u03C4\u03BF\u03C5\u03C2 \u03B1\u03BD\u03B1\u03B3\u03BD\u03CE\u03C3\u03C4\u03B5\u03C2 PDF) +addPassword.selectText.16=\u03A0\u03B5\u03C1\u03B9\u03BF\u03C1\u03AF\u03B6\u03B5\u03B9 \u03C4\u03BF \u03AC\u03BD\u03BF\u03B9\u03B3\u03BC\u03B1 \u03C4\u03BF\u03C5 \u03AF\u03B4\u03B9\u03BF\u03C5 \u03C4\u03BF\u03C5 \u03B5\u03B3\u03B3\u03C1\u03AC\u03C6\u03BF\u03C5 +addPassword.submit=\u039A\u03C1\u03C5\u03C0\u03C4\u03BF\u03B3\u03C1\u03AC\u03C6\u03B7\u03C3\u03B7 #watermark -watermark.title=Add Watermark -watermark.header=Add Watermark -watermark.selectText.1=Select PDF to add watermark to: -watermark.selectText.2=Watermark Text: -watermark.selectText.3=Font Size: +watermark.title=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03A5\u03B4\u03B1\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2 +watermark.header=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03A5\u03B4\u03B1\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2 +watermark.selectText.1=\u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 PDF \u03B3\u03B9\u03B1 \u03C4\u03B7\u03BD \u03C0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C4\u03BF\u03C5 \u03C5\u03B4\u03B1\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2: +watermark.selectText.2=\u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF \u03A5\u03B4\u03B1\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2: +watermark.selectText.3=\u039C\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u039A\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5: watermark.selectText.4=Rotation (0-360): watermark.selectText.5=widthSpacer (Space between each watermark horizontally): watermark.selectText.6=heightSpacer (Space between each watermark vertically): From 64f4f54b9d3060c06a76ced72487f6629b16fa57 Mon Sep 17 00:00:00 2001 From: Dimitrios Kaitantzidis Date: Sat, 7 Oct 2023 20:39:30 +0300 Subject: [PATCH 45/57] Adds greek language support --- src/main/resources/messages_el_GR.properties | 138 +++++++++---------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/src/main/resources/messages_el_GR.properties b/src/main/resources/messages_el_GR.properties index 31b18cd9..f3b301b6 100644 --- a/src/main/resources/messages_el_GR.properties +++ b/src/main/resources/messages_el_GR.properties @@ -718,100 +718,100 @@ watermark.header=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03A5\u03B4\u watermark.selectText.1=\u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 PDF \u03B3\u03B9\u03B1 \u03C4\u03B7\u03BD \u03C0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C4\u03BF\u03C5 \u03C5\u03B4\u03B1\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2: watermark.selectText.2=\u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF \u03A5\u03B4\u03B1\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2: watermark.selectText.3=\u039C\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 \u039A\u03B5\u03B9\u03BC\u03AD\u03BD\u03BF\u03C5: -watermark.selectText.4=Rotation (0-360): -watermark.selectText.5=widthSpacer (Space between each watermark horizontally): -watermark.selectText.6=heightSpacer (Space between each watermark vertically): -watermark.selectText.7=Opacity (0% - 100%): -watermark.selectText.8=Watermark Type: -watermark.selectText.9=Watermark Image: -watermark.submit=Add Watermark +watermark.selectText.4=\u03A0\u03B5\u03C1\u03B9\u03C3\u03C4\u03C1\u03BF\u03C6\u03AE (0-360): +watermark.selectText.5=widthSpacer (\u039A\u03B5\u03BD\u03CC \u03BC\u03B5\u03C4\u03B1\u03BE\u03CD \u03BA\u03AC\u03B8\u03B5 \u03C5\u03B4\u03B1\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2 \u03BF\u03C1\u03B9\u03B6\u03CC\u03BD\u03C4\u03B9\u03B1): +watermark.selectText.6=heightSpacer (\u039A\u03B5\u03BD\u03CC \u03BC\u03B5\u03C4\u03B1\u03BE\u03CD \u03BA\u03AC\u03B8\u03B5 \u03C5\u03B4\u03B1\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2 \u03BA\u03AC\u03B8\u03B5\u03C4\u03B1): +watermark.selectText.7=\u0391\u03B4\u03B9\u03B1\u03C6\u03AC\u03BD\u03B5\u03B9\u03B1 (Opacity) (0% - 100%): +watermark.selectText.8=\u03A4\u03CD\u03C0\u03BF\u03C2 \u03A5\u03B4\u03B1\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2: +watermark.selectText.9=\u0395\u03B9\u03BA\u03CC\u03BD\u03B1 \u03A5\u03B4\u03B1\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2: +watermark.submit=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03A5\u03B4\u03B1\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2 #Change permissions -permissions.title=Change Permissions -permissions.header=Change Permissions -permissions.warning=Warning to have these permissions be unchangeable it is recommended to set them with a password via the add-password page -permissions.selectText.1=Select PDF to change permissions -permissions.selectText.2=Permissions to set -permissions.selectText.3=Prevent assembly of document -permissions.selectText.4=Prevent content extraction -permissions.selectText.5=Prevent extraction for accessibility -permissions.selectText.6=Prevent filling in form -permissions.selectText.7=Prevent modification -permissions.selectText.8=Prevent annotation modification -permissions.selectText.9=Prevent printing -permissions.selectText.10=Prevent printing different formats -permissions.submit=Change +permissions.title=\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u0394\u03B9\u03BA\u03B1\u03B9\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD +permissions.header=\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u0394\u03B9\u03BA\u03B1\u03B9\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD +permissions.warning=\u03A0\u03C1\u03BF\u03B5\u03B9\u03B4\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7 \u03CC\u03C4\u03B9 \u03B1\u03C5\u03C4\u03AC \u03C4\u03B1 \u03B4\u03B9\u03BA\u03B1\u03B9\u03CE\u03BC\u03B1\u03C4\u03B1 \u03B4\u03B5\u03BD \u03B1\u03BB\u03BB\u03AC\u03B6\u03BF\u03C5\u03BD, \u03C3\u03C5\u03BD\u03B9\u03C3\u03C4\u03AC\u03C4\u03B1\u03B9 \u03BD\u03B1 \u03C4\u03B1 \u03BF\u03C1\u03AF\u03C3\u03B5\u03C4\u03B5 \u03BC\u03B5 \u03BA\u03C9\u03B4\u03B9\u03BA\u03CC \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2 \u03BC\u03AD\u03C3\u03C9 \u03C4\u03B7\u03C2 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1\u03C2 \u03C0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7\u03C2 \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2 +permissions.selectText.1=\u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 PDF \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03B1\u03BB\u03BB\u03AC\u03BE\u03B5\u03C4\u03B5 \u03C4\u03B1 \u03B4\u03B9\u03BA\u03B1\u03B9\u03CE\u03BC\u03B1\u03C4\u03B1 +permissions.selectText.2=\u0394\u03B9\u03BA\u03B1\u03B9\u03CE\u03BC\u03B1\u03C4\u03B1 \u03B3\u03B9\u03B1 \u03C1\u03CD\u03B8\u03BC\u03B9\u03C3\u03B7 +permissions.selectText.3=\u0391\u03C0\u03BF\u03C4\u03C1\u03BF\u03C0\u03AE \u03C3\u03C5\u03BD\u03B1\u03C1\u03BC\u03BF\u03BB\u03CC\u03B3\u03B7\u03C3\u03B7\u03C2 \u03B5\u03B3\u03B3\u03C1\u03AC\u03C6\u03BF\u03C5 +permissions.selectText.4=\u0391\u03C0\u03BF\u03C4\u03C1\u03BF\u03C0\u03AE \u03B5\u03BE\u03B1\u03B3\u03C9\u03B3\u03AE\u03C2 \u03C0\u03B5\u03C1\u03B9\u03B5\u03C7\u03BF\u03BC\u03AD\u03BD\u03BF\u03C5 +permissions.selectText.5=\u0391\u03C0\u03BF\u03C4\u03C1\u03BF\u03C0\u03AE \u03B5\u03BE\u03B1\u03B3\u03C9\u03B3\u03AE\u03C2 \u03B3\u03B9\u03B1 \u03C0\u03C1\u03BF\u03C3\u03B2\u03B1\u03C3\u03B9\u03BC\u03CC\u03C4\u03B7\u03C4\u03B1 +permissions.selectText.6=\u0391\u03C0\u03BF\u03C4\u03C1\u03BF\u03C0\u03AE \u03C3\u03C5\u03BC\u03C0\u03BB\u03AE\u03C1\u03C9\u03C3\u03B7\u03C2 \u03C6\u03CC\u03C1\u03BC\u03B1\u03C2 +permissions.selectText.7=\u0391\u03C0\u03BF\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03C1\u03BF\u03C0\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7\u03C2 +permissions.selectText.8=\u0391\u03C0\u03BF\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03C1\u03BF\u03C0\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7\u03C2 annotation +permissions.selectText.9=\u0391\u03C0\u03BF\u03C4\u03C1\u03BF\u03C0\u03AE \u03B5\u03BA\u03C4\u03CD\u03C0\u03C9\u03C3\u03B7\u03C2 +permissions.selectText.10=\u0391\u03C0\u03BF\u03C4\u03C1\u03BF\u03C0\u03AE \u03B5\u03BA\u03C4\u03CD\u03C0\u03C9\u03C3\u03B7\u03C2 \u03C3\u03B5 \u03B4\u03B9\u03B1\u03C6\u03BF\u03C1\u03B5\u03C4\u03B9\u03BA\u03BF\u03CD\u03C2 \u03C4\u03CD\u03C0\u03BF\u03C5\u03C2 \u03B1\u03C1\u03C7\u03B5\u03AF\u03C9\u03BD +permissions.submit=\u0391\u03BB\u03BB\u03B1\u03B3\u03AE #remove password -removePassword.title=Remove password -removePassword.header=Remove password (Decrypt) -removePassword.selectText.1=Select PDF to Decrypt -removePassword.selectText.2=Password -removePassword.submit=Remove +removePassword.title=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u039A\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD +removePassword.header=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u039A\u03C9\u03B4\u03B9\u03BA\u03BF\u03CD (\u0391\u03C0\u03BF\u03BA\u03C1\u03C5\u03C0\u03C4\u03BF\u03B3\u03C1\u03AC\u03C6\u03B7\u03C3\u03B7) +removePassword.selectText.1=\u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 PDF \u03B3\u03B9\u03B1 \u03B1\u03C0\u03BF\u03BA\u03C1\u03C5\u03C0\u03C4\u03BF\u03B3\u03C1\u03AC\u03C6\u03B7\u03C3\u03B7 +removePassword.selectText.2=\u039A\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 +removePassword.submit=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 #changeMetadata -changeMetadata.title=Change Metadata -changeMetadata.header=Change Metadata -changeMetadata.selectText.1=Please edit the variables you wish to change -changeMetadata.selectText.2=Delete all metadata -changeMetadata.selectText.3=Show Custom Metadata: -changeMetadata.author=Author: -changeMetadata.creationDate=Creation Date (yyyy/MM/dd HH:mm:ss): -changeMetadata.creator=Creator: -changeMetadata.keywords=Keywords: -changeMetadata.modDate=Modification Date (yyyy/MM/dd HH:mm:ss): -changeMetadata.producer=Producer: -changeMetadata.subject=Subject: -changeMetadata.title=Title: +changeMetadata.title=\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u039C\u03B5\u03C4\u03B1\u03B4\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03C9\u03BD +changeMetadata.header=\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u039C\u03B5\u03C4\u03B1\u03B4\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03C9\u03BD +changeMetadata.selectText.1=\u03A0\u03B1\u03C1\u03B1\u03BA\u03B1\u03BB\u03BF\u03CD\u03BC\u03B5 \u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03C4\u03B5\u03AF\u03C4\u03B5 \u03C4\u03B9\u03C2 \u03BC\u03B5\u03C4\u03B1\u03B2\u03BB\u03B7\u03C4\u03AD\u03C2 \u03C0\u03BF\u03C5 \u03B8\u03AD\u03BB\u03B5\u03C4\u03B5 \u03BD\u03B1 \u03B1\u03BB\u03BB\u03AC\u03BE\u03B5\u03C4\u03B5 +changeMetadata.selectText.2=\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03CC\u03BB\u03C9\u03BD \u03C4\u03C9\u03BD \u03BC\u03B5\u03C4\u03B1\u03B4\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03C9\u03BD +changeMetadata.selectText.3=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03C9\u03BD \u03BC\u03B5\u03C4\u03B1\u03B4\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03C9\u03BD: +changeMetadata.author=\u03A3\u03C5\u03BD\u03C4\u03AC\u03BA\u03C4\u03B7\u03C2: +changeMetadata.creationDate=\u0397\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u0394\u03B7\u03BC\u03B9\u03BF\u03C5\u03C1\u03B3\u03AF\u03B1\u03C2 (yyyy/MM/dd HH:mm:ss): +changeMetadata.creator=\u0394\u03B7\u03BC\u03B9\u03BF\u03C5\u03C1\u03B3\u03CC\u03C2: +changeMetadata.keywords=\u039B\u03AD\u03BE\u03B5\u03B9\u03C2-\u03BA\u03BB\u03B5\u03B9\u03B4\u03B9\u03AC: +changeMetadata.modDate=\u0397\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03A4\u03C1\u03BF\u03C0\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7\u03C2 (yyyy/MM/dd HH:mm:ss): +changeMetadata.producer=\u03A0\u03B1\u03C1\u03B1\u03B3\u03C9\u03B3\u03CC\u03C2: +changeMetadata.subject=\u0398\u03AD\u03BC\u03B1: +changeMetadata.title=\u03A4\u03AF\u03C4\u03BB\u03BF\u03C2: changeMetadata.trapped=Trapped: -changeMetadata.selectText.4=Other Metadata: -changeMetadata.selectText.5=Add Custom Metadata Entry -changeMetadata.submit=Change +changeMetadata.selectText.4=\u0386\u03BB\u03BB\u03B1 \u03BC\u03B5\u03C4\u03B1\u03B4\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03B1: +changeMetadata.selectText.5=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03B5\u03B3\u03B3\u03C1\u03B1\u03C6\u03AE\u03C2 \u03C0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03C9\u03BD \u03BC\u03B5\u03C4\u03B1\u03B4\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03C9\u03BD +changeMetadata.submit=\u0391\u03BB\u03BB\u03B1\u03B3\u03AE #pdfToPDFA -pdfToPDFA.title=PDF To PDF/A -pdfToPDFA.header=PDF To PDF/A -pdfToPDFA.credit=This service uses OCRmyPDF for PDF/A conversion -pdfToPDFA.submit=Convert +pdfToPDFA.title=PDF \u03C3\u03B5 PDF/A +pdfToPDFA.header=PDF \u03C3\u03B5 PDF/A +pdfToPDFA.credit=\u0391\u03C5\u03C4\u03AE \u03B7 \u03C5\u03C0\u03B7\u03C1\u03B5\u03C3\u03AF\u03B1 \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF OCRmyPDF \u03B3\u03B9\u03B1 PDF/A \u03BC\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE +pdfToPDFA.submit=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE #PDFToWord -PDFToWord.title=PDF to Word -PDFToWord.header=PDF to Word -PDFToWord.selectText.1=Output file format -PDFToWord.credit=This service uses LibreOffice for file conversion. -PDFToWord.submit=Convert +PDFToWord.title=PDF \u03C3\u03B5 Word +PDFToWord.header=PDF \u03C3\u03B5 Word +PDFToWord.selectText.1=\u03A4\u03CD\u03C0\u03BF\u03C2 \u0391\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 \u0395\u03BE\u03B1\u03B3\u03CC\u03BC\u03B5\u03BD\u03BF\u03C5 +PDFToWord.credit=\u0391\u03C5\u03C4\u03AE \u03B7 \u03C5\u03C0\u03B7\u03C1\u03B5\u03C3\u03AF\u03B1 \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF LibreOffice \u03B3\u03B9\u03B1 \u03C4\u03B7 \u03BC\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03C9\u03BD \u03B1\u03C1\u03C7\u03B5\u03AF\u03C9\u03BD. +PDFToWord.submit=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE #PDFToPresentation -PDFToPresentation.title=PDF to Presentation -PDFToPresentation.header=PDF to Presentation -PDFToPresentation.selectText.1=Output file format -PDFToPresentation.credit=This service uses LibreOffice for file conversion. -PDFToPresentation.submit=Convert +PDFToPresentation.title=PDF \u03C3\u03B5 Powerpoint +PDFToPresentation.header=PDF \u03C3\u03B5 Powerpoint +PDFToPresentation.selectText.1=\u03A4\u03CD\u03C0\u03BF\u03C2 \u0391\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 \u0395\u03BE\u03B1\u03B3\u03CC\u03BC\u03B5\u03BD\u03BF\u03C5 +PDFToPresentation.credit=\u0391\u03C5\u03C4\u03AE \u03B7 \u03C5\u03C0\u03B7\u03C1\u03B5\u03C3\u03AF\u03B1 \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF LibreOffice \u03B3\u03B9\u03B1 \u03C4\u03B7 \u03BC\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03C9\u03BD \u03B1\u03C1\u03C7\u03B5\u03AF\u03C9\u03BD. +PDFToPresentation.submit=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE #PDFToText -PDFToText.title=PDF to RTF (Text) -PDFToText.header=PDF to RTF (Text) -PDFToText.selectText.1=Output file format -PDFToText.credit=This service uses LibreOffice for file conversion. -PDFToText.submit=Convert +PDFToText.title=PDF \u03C3\u03B5 RTF (\u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF) +PDFToText.header=PDF \u03C3\u03B5 RTF (\u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF) +PDFToText.selectText.1=\u03A4\u03CD\u03C0\u03BF\u03C2 \u0391\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5 \u0395\u03BE\u03B1\u03B3\u03CC\u03BC\u03B5\u03BD\u03BF\u03C5 +PDFToText.credit=\u0391\u03C5\u03C4\u03AE \u03B7 \u03C5\u03C0\u03B7\u03C1\u03B5\u03C3\u03AF\u03B1 \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF LibreOffice \u03B3\u03B9\u03B1 \u03C4\u03B7 \u03BC\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03C9\u03BD \u03B1\u03C1\u03C7\u03B5\u03AF\u03C9\u03BD. +PDFToText.submit=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE #PDFToHTML -PDFToHTML.title=PDF to HTML -PDFToHTML.header=PDF to HTML -PDFToHTML.credit=This service uses LibreOffice for file conversion. -PDFToHTML.submit=Convert +PDFToHTML.title=PDF \u03C3\u03B5 HTML +PDFToHTML.header=PDF \u03C3\u03B5 HTML +PDFToHTML.credit=\u0391\u03C5\u03C4\u03AE \u03B7 \u03C5\u03C0\u03B7\u03C1\u03B5\u03C3\u03AF\u03B1 \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF LibreOffice \u03B3\u03B9\u03B1 \u03C4\u03B7 \u03BC\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03C9\u03BD \u03B1\u03C1\u03C7\u03B5\u03AF\u03C9\u03BD. +PDFToHTML.submit=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE #PDFToXML -PDFToXML.title=PDF to XML -PDFToXML.header=PDF to XML -PDFToXML.credit=This service uses LibreOffice for file conversion. -PDFToXML.submit=Convert \ No newline at end of file +PDFToXML.title=PDF \u03C3\u03B5 XML +PDFToXML.header=PDF \u03C3\u03B5 XML +PDFToXML.credit=\u0391\u03C5\u03C4\u03AE \u03B7 \u03C5\u03C0\u03B7\u03C1\u03B5\u03C3\u03AF\u03B1 \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03B5\u03AF LibreOffice \u03B3\u03B9\u03B1 \u03C4\u03B7 \u03BC\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03C9\u03BD \u03B1\u03C1\u03C7\u03B5\u03AF\u03C9\u03BD. +PDFToXML.submit=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \ No newline at end of file From 7205801e76b67a801c945faa31a3ce01b4757dab Mon Sep 17 00:00:00 2001 From: Dimitrios Kaitantzidis Date: Sat, 7 Oct 2023 20:46:58 +0300 Subject: [PATCH 46/57] Fixes some typos --- src/main/resources/messages_el_GR.properties | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/resources/messages_el_GR.properties b/src/main/resources/messages_el_GR.properties index f3b301b6..715d63a1 100644 --- a/src/main/resources/messages_el_GR.properties +++ b/src/main/resources/messages_el_GR.properties @@ -133,15 +133,15 @@ home.multiTool.desc=\u03A3\u03C5\u03B3\u03C7\u03CE\u03BD\u03B5\u03C5\u03C3\u03B7 multiTool.tags=Multi Tool,Multi operation,UI,click drag,front end,client side,interactive,intractable,move home.merge.title=\u03A3\u03C5\u03B3\u03C7\u03CE\u03BD\u03B5\u03C5\u03C3\u03B7 -home.merge.desc=\u03A3\u03C5\u03B3\u03C7\u03C9\u03BD\u03B5\u03CD\u03C3\u03C4\u03B5 \u03B5\u03CD\u03BA\u03BF\u03BB\u03B1 \u03C0\u03BF\u03BB\u03BB\u03AC PDF \u03C3\u03B5 \u03AD\u03BD\u03B1. +home.merge.desc=\u03A3\u03C5\u03B3\u03C7\u03CE\u03BD\u03B5\u03C5\u03C3\u03B7 \u03C0\u03BF\u03BB\u03BB\u03CE\u03BD PDF \u03C3\u03B5 \u03AD\u03BD\u03B1 \u03BC\u03B5 \u03B5\u03CD\u03BA\u03BF\u03BB\u03BF \u03C4\u03C1\u03CC\u03C0\u03BF. merge.tags=merge,Page operations,Back end,server side home.split.title=\u0394\u03B9\u03B1\u03C7\u03C9\u03C1\u03B9\u03C3\u03BC\u03CC\u03C2 -home.split.desc=\u0394\u03B9\u03B1\u03C7\u03C9\u03C1\u03AF\u03C3\u03C4\u03B5 \u03C4\u03B1 PDF \u03C3\u03B5 \u03C0\u03BF\u03BB\u03BB\u03AC \u03AD\u03B3\u03B3\u03C1\u03B1\u03C6\u03B1. +home.split.desc=\u0394\u03B9\u03B1\u03C7\u03C9\u03C1\u03B9\u03C3\u03BC\u03CC\u03C2 \u03C4\u03C9\u03BD PDF \u03C3\u03B5 \u03C0\u03BF\u03BB\u03BB\u03AC \u03AD\u03B3\u03B3\u03C1\u03B1\u03C6\u03B1. split.tags=Page operations,divide,Multi Page,cut,server side home.rotate.title=\u03A0\u03B5\u03C1\u03B9\u03C3\u03C4\u03C1\u03BF\u03C6\u03AE -home.rotate.desc=\u03A0\u03B5\u03C1\u03B9\u03C3\u03C4\u03C1\u03AD\u03C8\u03C4\u03B5 \u03B5\u03CD\u03BA\u03BF\u03BB\u03B1 \u03C4\u03B1 PDF \u03C3\u03B1\u03C2. +home.rotate.desc=\u03A0\u03B5\u03C1\u03B9\u03C3\u03C4\u03C1\u03BF\u03C6\u03AE \u03C4\u03C9\u03BD PDF \u03C3\u03B1\u03C2 \u03BC\u03B5 \u03B5\u03CD\u03BA\u03BF\u03BB\u03BF \u03C4\u03C1\u03CC\u03C0\u03BF. rotate.tags=server side @@ -154,12 +154,12 @@ home.pdfToImage.desc=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03 pdfToImage.tags=conversion,img,jpg,picture,photo home.pdfOrganiser.title=\u039F\u03C1\u03B3\u03AC\u03BD\u03C9\u03C3\u03B7 -home.pdfOrganiser.desc=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7.\u0391\u03BD\u03B1\u03B4\u03B9\u03AC\u03C4\u03B1\u03BE\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD \u03BC\u03B5 \u03BF\u03C0\u03BF\u03B9\u03B1\u03B4\u03AE\u03C0\u03BF\u03C4\u03B5 \u03C3\u03B5\u03B9\u03C1\u03AC +home.pdfOrganiser.desc=\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7/\u0391\u03BD\u03B1\u03B4\u03B9\u03AC\u03C4\u03B1\u03BE\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD \u03BC\u03B5 \u03BF\u03C0\u03BF\u03B9\u03B1\u03B4\u03AE\u03C0\u03BF\u03C4\u03B5 \u03C3\u03B5\u03B9\u03C1\u03AC pdfOrganiser.tags=duplex,even,odd,sort,move home.addImage.title=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u0395\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 -home.addImage.desc=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03BC\u03B9\u03B1\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1 \u03C3\u03B5 \u03BC\u03B9\u03B1 \u03BA\u03B1\u03B8\u03BF\u03C1\u03B9\u03C3\u03BC\u03AD\u03BD\u03B7 \u03B8\u03AD\u03C3\u03B7 \u03C3\u03C4\u03BF PDF +home.addImage.desc=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03BC\u03B9\u03B1\u03C2 \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2 \u03C3\u03B5 \u03BC\u03B9\u03B1 \u03BA\u03B1\u03B8\u03BF\u03C1\u03B9\u03C3\u03BC\u03AD\u03BD\u03B7 \u03B8\u03AD\u03C3\u03B7 \u03C3\u03C4\u03BF PDF addImage.tags=img,jpg,picture,photo home.watermark.title=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03A5\u03B4\u03B1\u03C4\u03BF\u03B3\u03C1\u03B1\u03C6\u03AE\u03BC\u03B1\u03C4\u03BF\u03C2 @@ -214,7 +214,7 @@ home.PDFToWord.desc=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C PDFToWord.tags=doc,docx,odt,word,transformation,format,conversion,office,microsoft,docfile home.PDFToPresentation.title=PDF \u03C3\u03B5 Powerpoint -home.PDFToPresentation.desc==\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03BF\u03C5 PDF \u03C3\u03B5 Powerpoint \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF (PPT, PPTX and ODP) +home.PDFToPresentation.desc=\u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03C4\u03BF\u03C5 PDF \u03C3\u03B5 Powerpoint \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF (PPT, PPTX and ODP) PDFToPresentation.tags=slides,show,office,microsoft home.PDFToText.title=PDF \u03C3\u03B5 RTF (\u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF) @@ -270,7 +270,7 @@ home.pipeline.title=Pipeline (\u0393\u03B9\u03B1 \u03C0\u03C1\u03BF\u03C7\u03C9\ home.pipeline.desc= \u0395\u03BA\u03C4\u03AD\u03BB\u03B5\u03C3\u03B7 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03CE\u03BD \u03B5\u03BD\u03B5\u03C1\u03B3\u03B5\u03B9\u03CE\u03BD \u03C3\u03B5 \u03B1\u03C1\u03C7\u03B5\u03AF\u03B1 PDF \u03BF\u03C1\u03AF\u03B6\u03BF\u03BD\u03C4\u03B1\u03C2 pipeline scripts pipeline.tags=automate,sequence,scripted,batch-process -home.add-page-numbers.title=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CE\u03BD \u03C3\u03B5 \u03A3\u03B5\u03BB\u03AF\u03B4\u03B5\u03C2 Add Page Numbers +home.add-page-numbers.title=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CE\u03BD \u03C3\u03B5 \u03A3\u03B5\u03BB\u03AF\u03B4\u03B5\u03C2 home.add-page-numbers.desc=\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CE\u03BD \u03C3\u03B5\u03BB\u03AF\u03B4\u03C9\u03BD \u03C3\u03B5 \u03AD\u03BD\u03B1 \u03AD\u03B3\u03B3\u03C1\u03B1\u03C6\u03BF \u03C3\u03B5 \u03BC\u03B9\u03B1 \u03BA\u03B1\u03B8\u03BF\u03C1\u03B9\u03C3\u03BC\u03AD\u03BD\u03B7 \u03B8\u03AD\u03C3\u03B7 add-page-numbers.tags=paginate,label,organize,index From 88a90f22a32d0dadb1f18a40752990dac246e954 Mon Sep 17 00:00:00 2001 From: Dimitrios Kaitantzidis Date: Sat, 7 Oct 2023 22:54:11 +0300 Subject: [PATCH 47/57] WIP: Adds textarea and multi line support for pdf sign. --- src/main/resources/templates/sign.html | 51 +++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/src/main/resources/templates/sign.html b/src/main/resources/templates/sign.html index 683bf162..54aa5a8d 100644 --- a/src/main/resources/templates/sign.html +++ b/src/main/resources/templates/sign.html @@ -179,7 +179,7 @@ select#font-select, select#font-select option {
    - + - + + + + + + +
    @@ -196,18 +202,53 @@ select#font-select, select#font-select option { function addDraggableFromText() { const sigText = document.getElementById('sigText').value; const font = document.querySelector('select[name=font]').value; + // const fontSize = document.querySelector('select[name=size]').value; + // console.log("fontSize: " + fontSize) const fontSize = 100; const canvas = document.createElement('canvas'); const ctx = canvas.getContext('2d'); ctx.font = `${fontSize}px ${font}`; - const textWidth = ctx.measureText(sigText).width; - const textHeight = fontSize; + + let yAxis = fontSize * .4; + + let paragraphs = sigText.split(/\r?\n/); + + let lengthiestParagraph = paragraphs[0]; + + for (let i = 0; i < paragraphs.length; i++) { + let previousParagraph; + let currentParagraph = paragraphs[i]; + + if (i === 0) { + previousParagraph = ''; + } else { + previousParagraph = paragraphs[i-1]; + } + + if (currentParagraph.length > previousParagraph.length) + lengthiestParagraph = currentParagraph; + + + ctx.fillText(currentParagraph, 0, yAxis, fontSize); + yAxis += fontSize * .8; + } + + console.log("lengthiest pagragraph: " + lengthiestParagraph); + + const textWidth = ctx.measureText(lengthiestParagraph).width; + // const textHeight = fontSize; + const textHeight = fontSize * 1.6; canvas.width = textWidth; canvas.height = textHeight*1.35; //for tails ctx.font = `${fontSize}px ${font}`; - ctx.fillText(sigText, 0, fontSize); + // console.log(sigText); + console.log(sigText.split(/\r?\n/)); + + + + // ctx.fillText(sigText, 0, fontSize); const dataURL = canvas.toDataURL(); DraggableUtils.createDraggableCanvasFromUrl(dataURL); From 30c115a7dec3eace8604669c57c3fb0468c32fc4 Mon Sep 17 00:00:00 2001 From: Jonas Meyer Date: Sat, 7 Oct 2023 22:10:35 +0200 Subject: [PATCH 48/57] Update messages_de_DE.properties --- src/main/resources/messages_de_DE.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/messages_de_DE.properties b/src/main/resources/messages_de_DE.properties index 34b71c66..02f87df6 100644 --- a/src/main/resources/messages_de_DE.properties +++ b/src/main/resources/messages_de_DE.properties @@ -19,7 +19,7 @@ save=Speichern close=Schließen filesSelected=Dateien ausgewählt noFavourites=Keine Favoriten hinzugefügt -bored=Gelangweiltes Warten? +bored=Langeweile beim Warten? alphabet=Alphabet downloadPdf=PDF herunterladen text=Text @@ -196,7 +196,7 @@ home.fileToPDF.title=Datei in PDF konvertieren home.fileToPDF.desc=Konvertieren Sie nahezu jede Datei in PDF (DOCX, PNG, XLS, PPT, TXT und mehr) fileToPDF.tags=transformation,format,document,picture,slide,text,conversion,office,docs,word,excel,powerpoint -home.ocr.title=Führe OCR auf PDF- und/oder Cleanup-Scans aus +home.ocr.title=Führe OCR/Cleanup-Scans aus home.ocr.desc=Cleanup scannt und erkennt Text aus Bildern in einer PDF-Datei und fügt ihn erneut als Text hinzu. ocr.tags=recognition,text,image,scan,read,identify,detection,editable From f4a01884bda3559288630a84ac97253d84d557ee Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sat, 7 Oct 2023 23:23:56 +0100 Subject: [PATCH 49/57] test empty = null for settings --- .../software/SPDF/config/AppConfig.java | 13 ++++++ .../SPDF/config/CustomEditorConfigurer.java | 42 +++++++++++++++++++ .../SPDF/config/EmptyStringAsNullEditor.java | 13 ++++++ 3 files changed, 68 insertions(+) create mode 100644 src/main/java/stirling/software/SPDF/config/CustomEditorConfigurer.java create mode 100644 src/main/java/stirling/software/SPDF/config/EmptyStringAsNullEditor.java diff --git a/src/main/java/stirling/software/SPDF/config/AppConfig.java b/src/main/java/stirling/software/SPDF/config/AppConfig.java index 309437b6..602102d0 100644 --- a/src/main/java/stirling/software/SPDF/config/AppConfig.java +++ b/src/main/java/stirling/software/SPDF/config/AppConfig.java @@ -1,5 +1,6 @@ package stirling.software.SPDF.config; +import org.springframework.beans.PropertyEditorRegistrar; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -8,6 +9,18 @@ import stirling.software.SPDF.model.ApplicationProperties; @Configuration public class AppConfig { + @Bean + public CustomEditorConfigurer customEditorConfigurer() { + return new CustomEditorConfigurer(); + } + + @Bean + public PropertyEditorRegistrar propertyEditorRegistrar() { + return registry -> { + registry.registerCustomEditor(String.class, new EmptyStringAsNullEditor()); + }; + } + @Autowired ApplicationProperties applicationProperties; diff --git a/src/main/java/stirling/software/SPDF/config/CustomEditorConfigurer.java b/src/main/java/stirling/software/SPDF/config/CustomEditorConfigurer.java new file mode 100644 index 00000000..6a0ac986 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/config/CustomEditorConfigurer.java @@ -0,0 +1,42 @@ +package stirling.software.SPDF.config; +import java.beans.PropertyEditor; + +import org.springframework.beans.BeansException; +import org.springframework.beans.PropertyEditorRegistrar; +import org.springframework.beans.PropertyEditorRegistry; +import org.springframework.beans.factory.config.BeanPostProcessor; +import org.springframework.validation.DataBinder; + +public class CustomEditorConfigurer implements BeanPostProcessor { + + @Override + public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { + if (bean instanceof PropertyEditorRegistrar) { + ((PropertyEditorRegistrar) bean).registerCustomEditors(new PropertyEditorRegistry() { + @Override + public void registerCustomEditor(Class requiredType, String propertyPath, java.beans.PropertyEditor propertyEditor) { + DataBinder dataBinder = new DataBinder(bean); + dataBinder.registerCustomEditor(requiredType, propertyPath, propertyEditor); + } + + @Override + public void registerCustomEditor(Class requiredType, java.beans.PropertyEditor propertyEditor) { + DataBinder dataBinder = new DataBinder(bean); + dataBinder.registerCustomEditor(requiredType, propertyEditor); + } + + @Override + public PropertyEditor findCustomEditor(Class requiredType, String propertyPath) { + return null; + } + }); + } + + return bean; + } + + @Override + public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { + return bean; + } +} diff --git a/src/main/java/stirling/software/SPDF/config/EmptyStringAsNullEditor.java b/src/main/java/stirling/software/SPDF/config/EmptyStringAsNullEditor.java new file mode 100644 index 00000000..fd8de476 --- /dev/null +++ b/src/main/java/stirling/software/SPDF/config/EmptyStringAsNullEditor.java @@ -0,0 +1,13 @@ +package stirling.software.SPDF.config; +import java.beans.PropertyEditorSupport; + +public class EmptyStringAsNullEditor extends PropertyEditorSupport { + @Override + public void setAsText(String text) { + if (text != null && text.trim().isEmpty()) { + setValue(null); + } else { + setValue(text); + } + } +} From d94eca4ee7fec0c404b4393be587cc2c071381b6 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sat, 7 Oct 2023 23:35:28 +0100 Subject: [PATCH 50/57] blank == null --- .../software/SPDF/config/AppConfig.java | 11 ----- .../SPDF/config/CustomEditorConfigurer.java | 42 ------------------- .../SPDF/config/EmptyStringAsNullEditor.java | 13 ------ .../SPDF/model/ApplicationProperties.java | 6 +++ 4 files changed, 6 insertions(+), 66 deletions(-) delete mode 100644 src/main/java/stirling/software/SPDF/config/CustomEditorConfigurer.java delete mode 100644 src/main/java/stirling/software/SPDF/config/EmptyStringAsNullEditor.java diff --git a/src/main/java/stirling/software/SPDF/config/AppConfig.java b/src/main/java/stirling/software/SPDF/config/AppConfig.java index 602102d0..5d4bad43 100644 --- a/src/main/java/stirling/software/SPDF/config/AppConfig.java +++ b/src/main/java/stirling/software/SPDF/config/AppConfig.java @@ -9,17 +9,6 @@ import stirling.software.SPDF.model.ApplicationProperties; @Configuration public class AppConfig { - @Bean - public CustomEditorConfigurer customEditorConfigurer() { - return new CustomEditorConfigurer(); - } - - @Bean - public PropertyEditorRegistrar propertyEditorRegistrar() { - return registry -> { - registry.registerCustomEditor(String.class, new EmptyStringAsNullEditor()); - }; - } @Autowired ApplicationProperties applicationProperties; diff --git a/src/main/java/stirling/software/SPDF/config/CustomEditorConfigurer.java b/src/main/java/stirling/software/SPDF/config/CustomEditorConfigurer.java deleted file mode 100644 index 6a0ac986..00000000 --- a/src/main/java/stirling/software/SPDF/config/CustomEditorConfigurer.java +++ /dev/null @@ -1,42 +0,0 @@ -package stirling.software.SPDF.config; -import java.beans.PropertyEditor; - -import org.springframework.beans.BeansException; -import org.springframework.beans.PropertyEditorRegistrar; -import org.springframework.beans.PropertyEditorRegistry; -import org.springframework.beans.factory.config.BeanPostProcessor; -import org.springframework.validation.DataBinder; - -public class CustomEditorConfigurer implements BeanPostProcessor { - - @Override - public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { - if (bean instanceof PropertyEditorRegistrar) { - ((PropertyEditorRegistrar) bean).registerCustomEditors(new PropertyEditorRegistry() { - @Override - public void registerCustomEditor(Class requiredType, String propertyPath, java.beans.PropertyEditor propertyEditor) { - DataBinder dataBinder = new DataBinder(bean); - dataBinder.registerCustomEditor(requiredType, propertyPath, propertyEditor); - } - - @Override - public void registerCustomEditor(Class requiredType, java.beans.PropertyEditor propertyEditor) { - DataBinder dataBinder = new DataBinder(bean); - dataBinder.registerCustomEditor(requiredType, propertyEditor); - } - - @Override - public PropertyEditor findCustomEditor(Class requiredType, String propertyPath) { - return null; - } - }); - } - - return bean; - } - - @Override - public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { - return bean; - } -} diff --git a/src/main/java/stirling/software/SPDF/config/EmptyStringAsNullEditor.java b/src/main/java/stirling/software/SPDF/config/EmptyStringAsNullEditor.java deleted file mode 100644 index fd8de476..00000000 --- a/src/main/java/stirling/software/SPDF/config/EmptyStringAsNullEditor.java +++ /dev/null @@ -1,13 +0,0 @@ -package stirling.software.SPDF.config; -import java.beans.PropertyEditorSupport; - -public class EmptyStringAsNullEditor extends PropertyEditorSupport { - @Override - public void setAsText(String text) { - if (text != null && text.trim().isEmpty()) { - setValue(null); - } else { - setValue(text); - } - } -} diff --git a/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java b/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java index a72479ad..dc068779 100644 --- a/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java +++ b/src/main/java/stirling/software/SPDF/model/ApplicationProperties.java @@ -232,6 +232,8 @@ public class ApplicationProperties { private String appNameNavbar; public String getAppName() { + if(appName != null && appName.trim().length() == 0) + return null; return appName; } @@ -240,6 +242,8 @@ public class ApplicationProperties { } public String getHomeDescription() { + if(homeDescription != null && homeDescription.trim().length() == 0) + return null; return homeDescription; } @@ -248,6 +252,8 @@ public class ApplicationProperties { } public String getAppNameNavbar() { + if(appNameNavbar != null && appNameNavbar.trim().length() == 0) + return null; return appNameNavbar; } From a71e813e82eb1135a239a2216b916d58e8a9eb3e Mon Sep 17 00:00:00 2001 From: Dimitrios Kaitantzidis Date: Sun, 8 Oct 2023 15:51:40 +0300 Subject: [PATCH 51/57] WIP: Makes font smaller but test is shown as whole and in multiline --- src/main/resources/templates/sign.html | 53 +++++++++----------------- 1 file changed, 18 insertions(+), 35 deletions(-) diff --git a/src/main/resources/templates/sign.html b/src/main/resources/templates/sign.html index 54aa5a8d..5b72dc30 100644 --- a/src/main/resources/templates/sign.html +++ b/src/main/resources/templates/sign.html @@ -202,50 +202,33 @@ select#font-select, select#font-select option { function addDraggableFromText() { const sigText = document.getElementById('sigText').value; const font = document.querySelector('select[name=font]').value; - // const fontSize = document.querySelector('select[name=size]').value; - // console.log("fontSize: " + fontSize) const fontSize = 100; const canvas = document.createElement('canvas'); const ctx = canvas.getContext('2d'); ctx.font = `${fontSize}px ${font}`; - - let yAxis = fontSize * .4; - - let paragraphs = sigText.split(/\r?\n/); - - let lengthiestParagraph = paragraphs[0]; - - for (let i = 0; i < paragraphs.length; i++) { - let previousParagraph; - let currentParagraph = paragraphs[i]; - - if (i === 0) { - previousParagraph = ''; - } else { - previousParagraph = paragraphs[i-1]; - } - - if (currentParagraph.length > previousParagraph.length) - lengthiestParagraph = currentParagraph; - - - ctx.fillText(currentParagraph, 0, yAxis, fontSize); - yAxis += fontSize * .8; - } - - console.log("lengthiest pagragraph: " + lengthiestParagraph); - - const textWidth = ctx.measureText(lengthiestParagraph).width; - // const textHeight = fontSize; - const textHeight = fontSize * 1.6; + const textWidth = ctx.measureText(sigText).width; + const textHeight = fontSize; canvas.width = textWidth; canvas.height = textHeight*1.35; //for tails - ctx.font = `${fontSize}px ${font}`; - // console.log(sigText); - console.log(sigText.split(/\r?\n/)); + // ctx.font = `${fontSize / 2}px ${font}`; + ctx.font = `${fontSize / 2}px ${font}`; + let paragraphs = sigText.split(/\r?\n/); + ctx.textBaseline = 'top'; + + // let y = fontSize; + let y = 0; + + console.log(paragraphs); + console.log(canvas.height); + + paragraphs.forEach(paragraph => { + // ctx.letterSpacing = "50px"; + ctx.fillText(paragraph, 0, y); + y += 24; + }); // ctx.fillText(sigText, 0, fontSize); From b0f8f56650d56878a7b24c7ea420a6f2d48181a5 Mon Sep 17 00:00:00 2001 From: Dimitrios Kaitantzidis Date: Sun, 8 Oct 2023 15:58:23 +0300 Subject: [PATCH 52/57] WIP: Letters are now inside canvas, and multiline support is functional. There is a small bug where when there are a lot of multiple lines, the font gets smaller. --- src/main/resources/templates/sign.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/resources/templates/sign.html b/src/main/resources/templates/sign.html index 5b72dc30..7584a72b 100644 --- a/src/main/resources/templates/sign.html +++ b/src/main/resources/templates/sign.html @@ -210,12 +210,14 @@ select#font-select, select#font-select option { const textWidth = ctx.measureText(sigText).width; const textHeight = fontSize; - canvas.width = textWidth; - canvas.height = textHeight*1.35; //for tails - // ctx.font = `${fontSize / 2}px ${font}`; - ctx.font = `${fontSize / 2}px ${font}`; let paragraphs = sigText.split(/\r?\n/); + canvas.width = textWidth; + canvas.height = paragraphs.length * textHeight*1.35; //for tails + // ctx.font = `${fontSize / 2}px ${font}`; + ctx.font = `${fontSize}px ${font}`; + + ctx.textBaseline = 'top'; // let y = fontSize; @@ -227,10 +229,9 @@ select#font-select, select#font-select option { paragraphs.forEach(paragraph => { // ctx.letterSpacing = "50px"; ctx.fillText(paragraph, 0, y); - y += 24; + y += fontSize; }); - // ctx.fillText(sigText, 0, fontSize); const dataURL = canvas.toDataURL(); From bd9b2675621ed6991fe9321c9d09d97edc43e54c Mon Sep 17 00:00:00 2001 From: Dimitrios Kaitantzidis Date: Sun, 8 Oct 2023 16:04:35 +0300 Subject: [PATCH 53/57] Fixes minor typos --- src/main/resources/templates/sign.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/resources/templates/sign.html b/src/main/resources/templates/sign.html index 7584a72b..238c647d 100644 --- a/src/main/resources/templates/sign.html +++ b/src/main/resources/templates/sign.html @@ -214,7 +214,6 @@ select#font-select, select#font-select option { canvas.width = textWidth; canvas.height = paragraphs.length * textHeight*1.35; //for tails - // ctx.font = `${fontSize / 2}px ${font}`; ctx.font = `${fontSize}px ${font}`; @@ -227,7 +226,6 @@ select#font-select, select#font-select option { console.log(canvas.height); paragraphs.forEach(paragraph => { - // ctx.letterSpacing = "50px"; ctx.fillText(paragraph, 0, y); y += fontSize; }); From a019b8b5ca9fca22cb2345199b3b6e067b5b988b Mon Sep 17 00:00:00 2001 From: Dimitrios Kaitantzidis Date: Sun, 8 Oct 2023 17:02:03 +0300 Subject: [PATCH 54/57] Deletes console.log statements and commented out code. --- src/main/resources/templates/sign.html | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/main/resources/templates/sign.html b/src/main/resources/templates/sign.html index 238c647d..a58298d1 100644 --- a/src/main/resources/templates/sign.html +++ b/src/main/resources/templates/sign.html @@ -188,13 +188,6 @@ select#font-select, select#font-select option { th:class="${font.name.toLowerCase()+'-font'}"> - - - - - - -
    @@ -216,22 +209,15 @@ select#font-select, select#font-select option { canvas.height = paragraphs.length * textHeight*1.35; //for tails ctx.font = `${fontSize}px ${font}`; - ctx.textBaseline = 'top'; - // let y = fontSize; let y = 0; - console.log(paragraphs); - console.log(canvas.height); - paragraphs.forEach(paragraph => { ctx.fillText(paragraph, 0, y); y += fontSize; }); - // ctx.fillText(sigText, 0, fontSize); - const dataURL = canvas.toDataURL(); DraggableUtils.createDraggableCanvasFromUrl(dataURL); } From 6b99decb568597876529c9c823a4d2cd70297cb4 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 8 Oct 2023 19:04:32 +0100 Subject: [PATCH 55/57] Create pull_request_template.md --- .github/workflows/pull_request_template.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/workflows/pull_request_template.md diff --git a/.github/workflows/pull_request_template.md b/.github/workflows/pull_request_template.md new file mode 100644 index 00000000..bc8f5d04 --- /dev/null +++ b/.github/workflows/pull_request_template.md @@ -0,0 +1,3 @@ +# License Agreement for Contributions +By submitting this pull request, I acknowledge and agree that my contributions will be included in Stirling-PDF and that they can be relicensed in the future under MPL 2.0 (Mozilla Public License Version 2.0) license. +(This does not change the open-source nature of Stirling-PDF, simply moving from one license to another license) From 78fe6d6ea8075cce05615f304171f1e45b7eb1d7 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 8 Oct 2023 19:06:08 +0100 Subject: [PATCH 56/57] Create pull_request_template.md --- .github/pull_request_template.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..bc8f5d04 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,3 @@ +# License Agreement for Contributions +By submitting this pull request, I acknowledge and agree that my contributions will be included in Stirling-PDF and that they can be relicensed in the future under MPL 2.0 (Mozilla Public License Version 2.0) license. +(This does not change the open-source nature of Stirling-PDF, simply moving from one license to another license) From 766cb4410baa94daf22c3322fbb162475dacf59e Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 8 Oct 2023 19:07:08 +0100 Subject: [PATCH 57/57] Update pull_request_template.md --- .github/pull_request_template.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index bc8f5d04..e73caa3f 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,3 +1,4 @@ # License Agreement for Contributions By submitting this pull request, I acknowledge and agree that my contributions will be included in Stirling-PDF and that they can be relicensed in the future under MPL 2.0 (Mozilla Public License Version 2.0) license. -(This does not change the open-source nature of Stirling-PDF, simply moving from one license to another license) + +(This does not change the general open-source nature of Stirling-PDF, simply moving from one license to another license)