Skip to content

Commit

Permalink
Merge branch 'main' into feature/1856/decrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
Frooodle authored Dec 11, 2024
2 parents bb3f076 + 0f6f3f3 commit 82bebf5
Show file tree
Hide file tree
Showing 44 changed files with 2,087 additions and 473 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ All files and PDFs exist either exclusively on the client side, reside in server

## Features

- Enterprise features like SSO Check [here](https://docs.stirlingpdf.com/Enterprise%20Edition)
- Enterprise features like SSO Check [here](https://docs.stirlingpdf.com/Enterprise%20Edition)
- Dark mode support
- Custom download options
- Parallel file processing and downloads
Expand Down Expand Up @@ -187,7 +187,7 @@ Certain functionality like `Sign` supports pre-saved files stored at `/customFil

## Supported Languages

Stirling-PDF currently supports 37 languages!
Stirling-PDF currently supports 38 languages!

| Language | Progress |
| -------------------------------------------- | -------------------------------------- |
Expand All @@ -213,6 +213,7 @@ Stirling-PDF currently supports 37 languages!
| Japanese (日本語) (ja_JP) | ![81%](https://geps.dev/progress/81) |
| Korean (한국어) (ko_KR) | ![90%](https://geps.dev/progress/90) |
| Norwegian (Norsk) (no_NB) | ![83%](https://geps.dev/progress/83) |
| Persian (فارسی) (fa_IR) | ![100%](https://geps.dev/progress/100) |
| Polish (Polski) (pl_PL) | ![91%](https://geps.dev/progress/91) |
| Portuguese (Português) (pt_PT) | ![91%](https://geps.dev/progress/91) |
| Portuguese Brazilian (Português) (pt_BR) | ![92%](https://geps.dev/progress/92) |
Expand Down Expand Up @@ -240,7 +241,7 @@ Stirling PDF offers a Enterprise edition of its software, This is the same great
### Whats included

- Prioritised Support tickets via [email protected] to reach directly to Stirling-PDF team for support and 1:1 meetings where applicable (Provided they come from same email domain registered with us)
- Prioritised Enhancements to Stirling-PDF where applicable
- Prioritised Enhancements to Stirling-PDF where applicable
- Base SSO support
- Advanced SSO such as automated login handling (Coming very soon)
- SAML SSO (Coming very soon)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public ResponseEntity<byte[]> addWatermark(@ModelAttribute AddWatermarkRequest r
float opacity = request.getOpacity();
int widthSpacer = request.getWidthSpacer();
int heightSpacer = request.getHeightSpacer();
String customColor = request.getCustomColor();
boolean convertPdfToImage = request.isConvertPDFToImage();

// Load the input PDF
Expand Down Expand Up @@ -97,7 +98,8 @@ public ResponseEntity<byte[]> addWatermark(@ModelAttribute AddWatermarkRequest r
widthSpacer,
heightSpacer,
fontSize,
alphabet);
alphabet,
customColor);
} else if ("image".equalsIgnoreCase(watermarkType)) {
addImageWatermark(
contentStream,
Expand Down Expand Up @@ -136,7 +138,8 @@ private void addTextWatermark(
int widthSpacer,
int heightSpacer,
float fontSize,
String alphabet)
String alphabet,
String colorString)
throws IOException {
String resourceDir = "";
PDFont font = new PDType1Font(Standard14Fonts.FontName.HELVETICA);
Expand Down Expand Up @@ -173,7 +176,18 @@ private void addTextWatermark(
}

contentStream.setFont(font, fontSize);
contentStream.setNonStrokingColor(Color.LIGHT_GRAY);

Color redactColor;
try {
if (!colorString.startsWith("#")) {
colorString = "#" + colorString;
}
redactColor = Color.decode(colorString);
} catch (NumberFormatException e) {

redactColor = Color.LIGHT_GRAY;
}
contentStream.setNonStrokingColor(redactColor);

String[] textLines = watermarkText.split("\\\\n");
float maxLineWidth = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ public class AddWatermarkRequest extends PDFFile {
@Schema(description = "The height spacer between watermark elements", example = "50")
private int heightSpacer;

@Schema(description = "The color for watermark", defaultValue = "#d3d3d3")
private String customColor = "#d3d3d3";

@Schema(description = "Convert the redacted PDF to an image", defaultValue = "false")
private boolean convertPDFToImage;
}
1 change: 1 addition & 0 deletions src/main/resources/messages_ar_AR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ addPassword.submit=تشفير
#watermark
watermark.title=إضافة علامة مائية
watermark.header=إضافة علامة مائية
watermark.customColor=لون نص مخصص
watermark.selectText.1=حدد PDF لإضافة العلامة المائية إليه:
watermark.selectText.2=نص العلامة المائية:
watermark.selectText.3=حجم الخط:
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/messages_az_AZ.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ addPassword.submit=Şifrlə
#watermark
watermark.title=Watermark Əlavə Et
watermark.header=Watermark Əlavə Et
watermark.customColor=Fərdi Mətn Rəngi
watermark.selectText.1=Watermark əlavə olunacaq PDF-i seç
watermark.selectText.2=Watermark Mətni:
watermark.selectText.3=Şrift Ölçüsü:
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/messages_bg_BG.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ addPassword.submit=Шифроване
#watermark
watermark.title=Добавяне на воден знак
watermark.header=Добавяне на воден знак
watermark.customColor=Персонализиран цвят на текста
watermark.selectText.1=Изберете PDF, към който да добавите воден знак:
watermark.selectText.2=Текст на воден знак:
watermark.selectText.3=Размер на шрифта:
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/messages_ca_CA.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ addPassword.submit=Encripta
#watermark
watermark.title=Afegir Marca d'Aigua
watermark.header=Afegir Marca d'Aigua
watermark.customColor=Color de Text Personalitzat
watermark.selectText.1=Selecciona el PDF per afegir la Marca d'Aigua:
watermark.selectText.2=Text de la Marca d'Aigua
watermark.selectText.3=Mida de la Font:
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/messages_cs_CZ.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ addPassword.submit=Šifrovat
#watermark
watermark.title=Přidat vodoznak
watermark.header=Přidat vodoznak
watermark.customColor=Vlastní barva textu
watermark.selectText.1=Vyberte PDF, ke kterému chcete přidat vodoznak:
watermark.selectText.2=Text vodoznaku:
watermark.selectText.3=Velikost písma:
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/messages_da_DK.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ addPassword.submit=Kryptér
#watermark
watermark.title=Tilføj Vandmærke
watermark.header=Tilføj Vandmærke
watermark.customColor=Brugerdefineret Tekstfarve
watermark.selectText.1=Vælg PDF til at tilføje vandmærke:
watermark.selectText.2=Vandmærketekst:
watermark.selectText.3=Skriftstørrelse:
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/messages_de_DE.properties
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ navbar.search=Suche
navbar.sections.organize=Organisieren
navbar.sections.convertTo=In PDF konvertieren
navbar.sections.convertFrom=Konvertieren von PDF
navbar.sections.security=Zeichen und Sicherheit
navbar.sections.advance=Fortschrittlich
navbar.sections.security=Signieren und Sicherheit
navbar.sections.advance=Erweiterte Funktionen
navbar.sections.edit=Anzeigen und Bearbeiten
navbar.sections.popular=Beliebt

Expand Down Expand Up @@ -1056,6 +1056,7 @@ addPassword.submit=Verschlüsseln
#watermark
watermark.title=Wasserzeichen hinzufügen
watermark.header=Wasserzeichen hinzufügen
watermark.customColor=Benutzerdefinierte Textfarbe
watermark.selectText.1=PDF auswählen, dem ein Wasserzeichen hinzugefügt werden soll:
watermark.selectText.2=Wasserzeichen Text:
watermark.selectText.3=Schriftgröße:
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/messages_el_GR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ addPassword.submit=Κρυπτογράφηση
#watermark
watermark.title=Προσθήκη Υδατογραφήματος
watermark.header=Προσθήκη Υδατογραφήματος
watermark.customColor=Προσαρμοσμένο χρώμα κειμένου
watermark.selectText.1=Επιλέξτε PDF για την προσθήκη του υδατογραφήματος:
watermark.selectText.2=Κείμενο Υδατογραφήματος:
watermark.selectText.3=Μέγεθος Κειμένου:
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/messages_en_GB.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,7 @@ addPassword.submit=Encrypt
#watermark
watermark.title=Add Watermark
watermark.header=Add Watermark
watermark.customColor=Custom Text Colour
watermark.selectText.1=Select PDF to add watermark to:
watermark.selectText.2=Watermark Text:
watermark.selectText.3=Font Size:
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/messages_en_US.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ addPassword.submit=Encrypt
#watermark
watermark.title=Add Watermark
watermark.header=Add Watermark
watermark.customColor=Custom Text Color
watermark.selectText.1=Select PDF to add watermark to:
watermark.selectText.2=Watermark Text:
watermark.selectText.3=Font Size:
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/messages_es_ES.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ addPassword.submit=Encriptar
#watermark
watermark.title=Añadir marca de agua
watermark.header=Añadir marca de agua
watermark.customColor=Personalizar color de texto
watermark.selectText.1=Seleccionar PDF para añadir marca de agua:
watermark.selectText.2=Texto de la marca de agua:
watermark.selectText.3=Tamaño de la Fuente:
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/messages_eu_ES.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ addPassword.submit=Enkriptatu
#watermark
watermark.title=Gehitu ur-marka
watermark.header=Gehitu ur-marka
watermark.customColor=Custom Text Color
watermark.selectText.1=Hautatu PDFa ur-marka gehitzeko:
watermark.selectText.2=Ur-markaren testua:
watermark.selectText.3=Letra-tipoaren tamaina:
Expand Down
Loading

0 comments on commit 82bebf5

Please sign in to comment.