Compare commits

...

1240 Commits

Author SHA1 Message Date
Anthony Stirling
3868b4eca2 updates 2024-04-05 13:05:16 +01:00
Han
64f8765115 Update messages_tr_TR.properties (#1032)
update TR
2024-04-05 12:58:54 +01:00
github-actions[bot]
3804656218 💾 Update Version (#1033)
💾 Sync Versions
> Made via sync_versions.yml

Co-authored-by: GitHub Action action@github.com <GitHub Action action@github.com>
2024-04-05 12:58:05 +01:00
Anthony Stirling
a5d824213c OCR fix for #1019 2024-04-05 12:51:22 +01:00
albanobattistella
160a4e9f8d Update messages_it_IT.properties (#1031) 2024-04-04 21:52:24 +01:00
Ludy
74a0574462 Update progress of language (#1029) 2024-04-04 10:16:10 +01:00
Muhammad Sani Ibrahim
1cf23b3542 Update README.md (#606)
Make the English more standard

Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
2024-04-03 22:51:59 +01:00
github-actions[bot]
2ef1242cd8 💾 Update Version (#1015)
💾 Sync Versions
> Made via sync_versions.yml

Co-authored-by: GitHub Action action@github.com <GitHub Action action@github.com>
2024-04-03 22:41:33 +01:00
pixeebot[bot]
54c3bee205 Replaced Stream.collect(Collectors.toList()) with Stream.toList() (Sonar) (#1018)
Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
2024-04-03 22:41:24 +01:00
NicolasFR
a63c0a3625 lang: update fr_FR (#1020)
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
2024-04-03 22:41:07 +01:00
Dimitris Doukas
3103a0bffc Enhance description for "Split PDF" functionality (#1025)
* Update screen of homepage

* Fix description for "Split PDF" except AR

* Fix description for "Split PDF" in AR

* Fix one mistake on AR

* Keep clear this branch from other branches
2024-04-03 22:40:35 +01:00
Dimitris Doukas
5d71ffbfaa Update homepage screen in README (#1021)
Update screen of homepage
2024-04-03 22:40:09 +01:00
CocoMaster-AI
c0c137d1b0 Sponsor information supports translate now (#1023)
Sponsored information supports translate now
2024-04-03 10:02:01 +01:00
Anthony Stirling
8625db2885 Update build.gradle 2024-04-01 22:10:33 +01:00
Anthony Stirling
a2a969a0a0 Chinese font and word conv fix (#1014)
* remove lite package

* alphine update for word conversion issue #995
2024-04-01 22:04:27 +01:00
Anthony Stirling
8a6386ca73 remove lite package (#1012) 2024-04-01 18:33:58 +01:00
NicolasFR
255c018415 Update messages_fr_FR.properties (#1011)
fix(lang): fix a translation error
2024-04-01 17:55:22 +01:00
albanobattistella
df27ed6907 Update messages_it_IT.properties (#1010) 2024-04-01 15:04:05 +01:00
CocoMaster-AI
989491b903 Extract text from error pages and sync text variable to all lang (#1008)
* feat: extract text from error pages

* feat: sync text variables to langs.properties

---------

Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
2024-04-01 11:04:56 +01:00
NicolasFR
664dd62d8b doc: add --break-system-packages (#1001)
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
2024-04-01 10:56:33 +01:00
albanobattistella
3d6b145db5 Update messages_it_IT.properties (#1002) 2024-03-30 19:51:44 +00:00
CocoMaster-AI
37a63242a6 Update messages_ru_RU.properties (#999) 2024-03-30 10:26:51 +00:00
Eric
dfb8c64f5a fix: switch to pdftohtml for pdf to html conversions (#998)
* fix: switch to pdftohtml for pdf to html conversions

* build: include poppler-utils in dockerfile for pdftohtml
2024-03-29 17:02:33 -04:00
github-actions[bot]
27bbf7a513 💾 Update Version (#997)
💾 Sync Versions
> Made via sync_versions.yml

Co-authored-by: GitHub Action action@github.com <GitHub Action action@github.com>
2024-03-29 11:04:05 +00:00
Anthony Stirling
ca890e4b32 Pipeline fix quick 2024-03-29 11:03:13 +00:00
CocoMaster-AI
4834d01223 feat: translate messages_ko_KR.properties, messages_ru_RU.properties completed (#996)
* feat: translate ko_KR.properties completed

* feat: feat: translate ru_RU.properties completed
2024-03-29 10:17:10 +00:00
albanobattistella
84b3bb1aed Update messages_it_IT.properties (#993) 2024-03-28 20:50:29 +00:00
Anthony Stirling
a9679da719 Revert weasy 2024-03-28 19:38:56 +00:00
Anthony Stirling
f10b3ffe3c multiTool.uploadPrompts 2024-03-28 17:45:58 +00:00
SuperFan
ea982d6412 fix: Add MultiTool UploadPrompts zh_CN And en_US (#977)
Co-authored-by: superfan <admin@henniubi.com>
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
2024-03-28 17:44:21 +00:00
pixeebot[bot]
1035a3be31 Define a constant for a literal string that is duplicated n times (Sonar) (#978)
Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
2024-03-28 17:44:10 +00:00
github-actions[bot]
c16db14cd9 Update 3rd Party Licenses (#992)
Signed-off-by: GitHub Action <action@github.com>
Co-authored-by: GitHub Action <action@github.com>
2024-03-28 17:43:30 +00:00
github-actions[bot]
1698f9d5df 💾 Update Version (#991)
💾 Sync Versions
> Made via sync_versions.yml

Co-authored-by: GitHub Action action@github.com <GitHub Action action@github.com>
2024-03-28 17:43:20 +00:00
Anthony Stirling
08e43cc89c fix #986 and #989 2024-03-28 17:09:21 +00:00
NicolasFR
fb1baaa275 fix: Fix package name of openjdk for debian (#990) 2024-03-28 16:53:54 +00:00
CocoMaster-AI
eda838d6f8 feat: Extract translation text from html and finished the mainly translation of zh_CN, zh_TW, ja_JP file (#987)
* feat: translate zh_cn properties

* feat: adjust some description messages_zh_CN.properties

* feat: translate zh_TW file done

* feat: zh_CN semantic optimization

* feat: Supplementary ja_JP translation

* feat: extract rest text

* feat: Sync to all lang.properties

* feat: translate zh_CN, zh_TW, ja_JP file

* fix: small bug

---------

Co-authored-by: yanyu_lin <yanyu_lin@bestsign.cn>
2024-03-28 16:53:39 +00:00
Anthony Stirling
2fff3083ae Update TextFinder.java (#980) 2024-03-26 19:25:16 +00:00
tkymmm
7e2d58b3e8 Update messages_ja_JP.properties (#975) 2024-03-26 06:55:51 +00:00
NeilJared
31ec385282 Update messages_es_ES.properties (#969)
Updated es_ES translation (100% done)
2024-03-25 19:07:53 +00:00
Anthony Stirling
14ef7c0a72 dummy commit (#968)
Update README.md
2024-03-24 10:16:14 +00:00
Anthony Stirling
c9331afeac github bug 2024-03-22 20:15:53 +00:00
Anthony Stirling
09cb92e235 github bug 2024-03-22 20:15:42 +00:00
Anthony Stirling
6bd6e6563b Update Chart.yaml 2024-03-22 20:01:37 +00:00
Anthony Stirling
3c08c20426 Update build.gradle 2024-03-22 19:57:43 +00:00
Anthony Stirling
3800e3e465 Update view-pdf.html 2024-03-22 18:15:10 +00:00
github-actions[bot]
e2bd73dbf3 Update 3rd Party Licenses (#966)
Signed-off-by: GitHub Action <action@github.com>
Co-authored-by: GitHub Action <action@github.com>
2024-03-21 21:42:34 +00:00
github-actions[bot]
a20c3018ae Update 3rd Party Licenses (#965)
Signed-off-by: GitHub Action <action@github.com>
Co-authored-by: GitHub Action <action@github.com>
2024-03-21 21:41:09 +00:00
dependabot[bot]
7f17b33859 Bump org.apache.pdfbox:pdfbox from 3.0.1 to 3.0.2 (#963)
Bumps org.apache.pdfbox:pdfbox from 3.0.1 to 3.0.2.

---
updated-dependencies:
- dependency-name: org.apache.pdfbox:pdfbox
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 21:40:59 +00:00
dependabot[bot]
029937a1c5 Bump org.springframework.boot:spring-boot-starter-test from 3.2.3 to 3.2.4 (#961)
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.2.3 to 3.2.4.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.3...v3.2.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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 21:24:20 +00:00
dependabot[bot]
cfcf02708c Bump org.springframework.boot from 3.2.3 to 3.2.4 (#962)
Bumps [org.springframework.boot](https://github.com/spring-projects/spring-boot) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.3...v3.2.4)

---
updated-dependencies:
- dependency-name: org.springframework.boot
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 21:24:15 +00:00
dependabot[bot]
c1724ef74c Bump org.springdoc:springdoc-openapi-starter-webmvc-ui from 2.2.0 to 2.4.0 (#964)
Bump org.springdoc:springdoc-openapi-starter-webmvc-ui

Bumps [org.springdoc:springdoc-openapi-starter-webmvc-ui](https://github.com/springdoc/springdoc-openapi) from 2.2.0 to 2.4.0.
- [Release notes](https://github.com/springdoc/springdoc-openapi/releases)
- [Changelog](https://github.com/springdoc/springdoc-openapi/blob/main/CHANGELOG.md)
- [Commits](https://github.com/springdoc/springdoc-openapi/compare/v2.2.0...v2.4.0)

---
updated-dependencies:
- dependency-name: org.springdoc:springdoc-openapi-starter-webmvc-ui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 21:24:06 +00:00
github-actions[bot]
3c53f97c36 Update 3rd Party Licenses (#960)
Signed-off-by: GitHub Action <action@github.com>
Co-authored-by: GitHub Action <action@github.com>
2024-03-21 21:17:53 +00:00
dependabot[bot]
aa895d10ac Bump org.springframework.boot:spring-boot-starter-thymeleaf from 3.2.3 to 3.2.4 (#954)
Bump org.springframework.boot:spring-boot-starter-thymeleaf

Bumps [org.springframework.boot:spring-boot-starter-thymeleaf](https://github.com/spring-projects/spring-boot) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.3...v3.2.4)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-thymeleaf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 21:13:55 +00:00
dependabot[bot]
6c603618ce Bump org.springframework.boot:spring-boot-starter-security from 3.2.3 to 3.2.4 (#956)
Bump org.springframework.boot:spring-boot-starter-security

Bumps [org.springframework.boot:spring-boot-starter-security](https://github.com/spring-projects/spring-boot) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.3...v3.2.4)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-security
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 21:12:33 +00:00
dependabot[bot]
78aa0d4c61 Bump org.springframework.boot:spring-boot-starter-data-jpa from 3.2.3 to 3.2.4 (#953)
Bump org.springframework.boot:spring-boot-starter-data-jpa

Bumps [org.springframework.boot:spring-boot-starter-data-jpa](https://github.com/spring-projects/spring-boot) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.3...v3.2.4)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-data-jpa
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 21:10:56 +00:00
dependabot[bot]
da3fc72e5c Bump org.projectlombok:lombok from 1.18.28 to 1.18.32 (#955)
Bumps [org.projectlombok:lombok](https://github.com/projectlombok/lombok) from 1.18.28 to 1.18.32.
- [Changelog](https://github.com/projectlombok/lombok/blob/master/doc/changelog.markdown)
- [Commits](https://github.com/projectlombok/lombok/compare/v1.18.28...v1.18.32)

---
updated-dependencies:
- dependency-name: org.projectlombok:lombok
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 21:09:30 +00:00
dependabot[bot]
a800766cb8 Bump org.commonmark:commonmark from 0.21.0 to 0.22.0 (#957)
Bumps [org.commonmark:commonmark](https://github.com/commonmark/commonmark-java) from 0.21.0 to 0.22.0.
- [Release notes](https://github.com/commonmark/commonmark-java/releases)
- [Changelog](https://github.com/commonmark/commonmark-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/commonmark/commonmark-java/compare/commonmark-parent-0.21.0...commonmark-parent-0.22.0)

---
updated-dependencies:
- dependency-name: org.commonmark:commonmark
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 21:08:00 +00:00
Ludy
67a1529dc7 Change to html5 (#958)
* Change to html5

with Nu Html Checker

* Update scale-pages.html

* Update sign.html

* Update common.html

* Update common.html

* Update login.html
2024-03-21 20:58:01 +00:00
github-actions[bot]
77354f47bf Update 3rd Party Licenses (#952)
Signed-off-by: GitHub Action <action@github.com>
Co-authored-by: GitHub Action <action@github.com>
2024-03-21 20:12:47 +00:00
dependabot[bot]
49ea07fd13 Bump io.github.pixee:java-security-toolkit from 1.1.2 to 1.1.3 (#946)
Bumps [io.github.pixee:java-security-toolkit](https://github.com/pixee/java-security-toolkit) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/pixee/java-security-toolkit/releases)
- [Commits](https://github.com/pixee/java-security-toolkit/compare/v1.1.2...v1.1.3)

---
updated-dependencies:
- dependency-name: io.github.pixee:java-security-toolkit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 20:09:55 +00:00
dependabot[bot]
bb69c67b52 Bump org.springframework.boot:spring-boot-starter-actuator from 3.2.3 to 3.2.4 (#950)
Bump org.springframework.boot:spring-boot-starter-actuator

Bumps [org.springframework.boot:spring-boot-starter-actuator](https://github.com/spring-projects/spring-boot) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.3...v3.2.4)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-actuator
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 20:09:37 +00:00
dependabot[bot]
6b29c28e2e Bump org.springframework.boot:spring-boot-devtools from 3.2.3 to 3.2.4 (#949)
Bumps [org.springframework.boot:spring-boot-devtools](https://github.com/spring-projects/spring-boot) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.3...v3.2.4)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-devtools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 20:09:32 +00:00
dependabot[bot]
ba0fe43f31 Bump org.springframework.boot:spring-boot-starter-web from 3.2.3 to 3.2.4 (#948)
Bump org.springframework.boot:spring-boot-starter-web

Bumps [org.springframework.boot:spring-boot-starter-web](https://github.com/spring-projects/spring-boot) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.3...v3.2.4)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-web
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 20:09:23 +00:00
dependabot[bot]
e54597f108 Bump com.github.jk1.dependency-license-report from 2.5 to 2.6 (#932)
Bumps com.github.jk1.dependency-license-report from 2.5 to 2.6.

---
updated-dependencies:
- dependency-name: com.github.jk1.dependency-license-report
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 20:09:10 +00:00
dependabot[bot]
9809ad9d7b Bump io.micrometer:micrometer-core from 1.12.3 to 1.12.4 (#930)
Bumps [io.micrometer:micrometer-core](https://github.com/micrometer-metrics/micrometer) from 1.12.3 to 1.12.4.
- [Release notes](https://github.com/micrometer-metrics/micrometer/releases)
- [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.12.3...v1.12.4)

---
updated-dependencies:
- dependency-name: io.micrometer:micrometer-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 19:36:45 +00:00
dependabot[bot]
1d4ad19acd Bump org.springframework:spring-webmvc from 6.1.4 to 6.1.5 (#934)
Bumps [org.springframework:spring-webmvc](https://github.com/spring-projects/spring-framework) from 6.1.4 to 6.1.5.
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.4...v6.1.5)

---
updated-dependencies:
- dependency-name: org.springframework:spring-webmvc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 19:36:12 +00:00
dependabot[bot]
2c24e754be Bump org.apache.pdfbox:xmpbox from 3.0.1 to 3.0.2 (#933)
Bumps org.apache.pdfbox:xmpbox from 3.0.1 to 3.0.2.

---
updated-dependencies:
- dependency-name: org.apache.pdfbox:xmpbox
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 19:35:55 +00:00
albanobattistella
4a3326a560 Update messages_it_IT.properties (#927) 2024-03-17 14:24:07 +00:00
Ludy
24862e2d4a changes characters in multiple languages - Unicode ascii (#925)
* unicode to readable font

* Update messages_de_DE.properties
2024-03-17 11:09:55 +00:00
Ludy
51bb26ae34 Fix: Error after logging out and selecting another language (#924)
Fix exception url after logout
2024-03-17 09:57:17 +00:00
Anthony Stirling
f474651f36 lang, save to browser (#923) 2024-03-17 09:33:05 +00:00
tongkl1
11193b1b6d Fix typo in example yaml file (#922) 2024-03-16 09:49:28 +00:00
github-actions[bot]
3066b3e500 Update 3rd Party Licenses (#919)
Signed-off-by: GitHub Action <action@github.com>
Co-authored-by: GitHub Action <action@github.com>
2024-03-14 23:00:38 +00:00
dependabot[bot]
217f112bc4 Bump com.google.zxing:core from 3.5.2 to 3.5.3 (#779)
Bumps [com.google.zxing:core](https://github.com/zxing/zxing) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/zxing/zxing/releases)
- [Changelog](https://github.com/zxing/zxing/blob/master/CHANGES)
- [Commits](https://github.com/zxing/zxing/compare/zxing-3.5.2...zxing-3.5.3)

---
updated-dependencies:
- dependency-name: com.google.zxing:core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
2024-03-14 22:59:27 +00:00
github-actions[bot]
e1bb0cf5ec Update 3rd Party Licenses (#914)
Signed-off-by: GitHub Action <action@github.com>
Co-authored-by: GitHub Action <action@github.com>
2024-03-13 22:45:32 +00:00
Anthony Stirling
3930c25a75 Frooodle patch 2 (#913)
* Update licenses-update.yml

* Update build.gradle
2024-03-13 22:34:24 +00:00
Anthony Stirling
b27e79cb52 Update build.gradle (#912) 2024-03-13 22:29:55 +00:00
Anthony Stirling
daf6486b86 Update licenses-update.yml (#911) 2024-03-13 22:26:39 +00:00
Ludy
1af41f8ea5 🔨 add Developer tools/scripts (#828)
* 🔨 add Developer tools

* Update downloader.js

* Update game.js

* Update .pre-commit-config.yaml

* Update sync_versions.yml

* removed: mixed line ending tool

* Update swagger.yml

* Update push-docker.yml

* Update build.yml

---------

Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
2024-03-13 22:18:15 +00:00
Listiges Känguru
70e4ac21df Update messages_de_DE.properties (#903)
Added missing translations, improved some existing translations.
2024-03-13 22:11:43 +00:00
Anthony Stirling
95d9d85ca2 dep bumps and nonroot bypass (#910)
* dep bumps and nonroot bypass

* log changing
2024-03-13 22:09:56 +00:00
Ludy
9cc7a49d12 Enforcing Username Uniqueness (#906)
* Enforcing Username Uniqueness

Changes in UserService.java:

Added a new method findByUsername to allow searching for usernames regardless of case sensitivity.
Added a new method isUsernameValid to validate the username.
Changes in UserController.java:

Updated the changeUsername method to ensure the new username is valid before changing it.
Updated the editUser method to ensure the new username is unique and valid.
Changes in UserRepository.java:

Added a custom JPQL query to search for usernames regardless of case sensitivity.
Changes in HTML templates (account.html and addUsers.html):

Error messages are displayed if a username is invalid or already exists.

* JPAs auto
2024-03-13 22:09:16 +00:00
Anthony Stirling
ae73595335 Number of fixes and making pipline LIVE ! (#907)
Closes #889 and #332
#710
#901
#885
2024-03-13 19:15:10 +00:00
pavedroad
ac620082ec chore: fix some typos (#900)
Signed-off-by: pavedroad <qcqs@outlook.com>
2024-03-12 19:42:15 -04:00
Anthony Stirling
1e4134c7d1 Number fxes (#898)
* init

* user and pass to just pass lang update

* session management fixes and avoid demo user locking

* fix for UMASK and extract cleanups

* fixes for user #889 and #332

* increase session count for demo site

* fix

* gcc

* formatting

* number fixes init

* || true test

* version bump

* Hardening suggestions for Stirling-PDF / numberFxes (#899)

Switch order of literals to prevent NullPointerException

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>

---------

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
2024-03-10 14:00:00 +00:00
albanobattistella
a7bcdd0003 Update messages_it_IT.properties (#891) 2024-03-09 14:03:58 +00:00
Anthony Stirling
121af0501a fixes for user permissions (#892) 2024-03-09 14:03:46 +00:00
Ludy
82c4e9cf41 Fix TypeError by rotation (#890)
Fixes the error in the PDF multitool when rotating all pages at the same time.
2024-03-09 12:18:00 +00:00
Ludy
142e11a59a added missing translation strings (#888) 2024-03-09 08:08:33 +00:00
Anthony Stirling
08205ed32d Custom uid (#883)
* init

* user and pass to just pass lang update

* session management fixes and avoid demo user locking

* fix for UMASK and extract cleanups
2024-03-08 20:49:19 +00:00
Anthony Stirling
9246b42057 Login fixes (#881)
* init

* user and pass to just pass lang update

* session management fixes and avoid demo user locking

* Hardening suggestions for Stirling-PDF / loginFixes (#882)

Switch order of literals to prevent NullPointerException

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>

---------

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
2024-03-08 18:06:40 +00:00
albanobattistella
67e4d6e3a2 Update messages_it_IT.properties (#878) 2024-03-07 21:47:21 +00:00
Anthony Stirling
cf4613d043 Password fix and others (#875)
* init

* user and pass to just pass lang update
2024-03-07 20:12:07 +00:00
Eric
2f703796e9 fix(SplitPDF): create immutable list for dynamic additions (#877) 2024-03-07 12:05:26 -05:00
albanobattistella
731dc3f3dc Update messages_it_IT.properties (#870) 2024-03-06 22:24:30 +00:00
Ludy
97472310f2 Show the user roles as real names (#867)
* Show the user roles as real names

* Add error message

* Update Role.java

* default Language without translation

* Update messages_el_GR.properties
2024-03-06 22:14:02 +00:00
Anthony Stirling
ece1d071c0 non root user and fix book/html calibre (#856)
* non root user and fix book/html calibre

* version bump

* Update docker-compose-latest.yml

* remove customApp

---------

Co-authored-by: systo <systo@host.docker.internal>
2024-03-04 20:51:49 +00:00
albanobattistella
20f532c872 Update messages_it_IT.properties (#858)
Co-authored-by: Eric <71648843+sbplat@users.noreply.github.com>
2024-03-04 20:36:18 +00:00
Ludy
bdcccfd937 🐛 Fix: index out of bounds #861 #842 (#863)
* 🐛 Fix: `index out of bounds` #861 #842

* Update RearrangePagesPDFController.java

* Update RearrangePagesPDFController.java
2024-03-04 20:14:45 +00:00
Ludy
146b8f0103 Corrected the reading of the port. See: #834 (#855)
* Corrected the reading of the port. See: #834

* Removed outdated import

---------

Co-authored-by: Eric <71648843+sbplat@users.noreply.github.com>
2024-02-25 19:15:03 -05:00
懒猫
c8a37245fa Added option to split PDF into multiple parts and merge into one PDF (#841)
* Added option to split PDF into multiple parts and merge into one PDF

* Use the mergeDocuments method in MergeController to implement merging

---------

Co-authored-by: Eric <71648843+sbplat@users.noreply.github.com>
2024-02-24 15:26:35 -05:00
Parth P Shah
af68c70239 Update SPdfApplication.java (#853)
* Update SPdfApplication.java

* Update SPdfApplication.java

* Update SPdfApplication.java

---------

Co-authored-by: Eric <71648843+sbplat@users.noreply.github.com>
2024-02-24 15:22:47 -05:00
Ludy
5bd544dcd7 Removed: Duplicate Properties Keys pt_PT (#854) 2024-02-24 19:45:07 +00:00
Anthony Stirling
642b85069d Merge pull request #852 from parth-p-shah/application-file-fixes
Application file fixes, added loggers instead of sysout
2024-02-23 19:03:04 +00:00
Parth P Shah
6fef4ea82c Update SPdfApplication.java 2024-02-24 00:01:20 +05:30
Parth P Shah
8670afb96f Revert "Update SPdfApplication.java"
This reverts commit 33f8d60900.
2024-02-23 23:46:42 +05:30
Parth P Shah
33f8d60900 Update SPdfApplication.java 2024-02-23 23:46:36 +05:30
albanobattistella
4e2156ad79 Update messages_it_IT.properties (#839) 2024-02-21 17:30:55 -05:00
Anthony Stirling
a07245224e Merge pull request #833 from seku80/main
Add messages_pt_PT.properties
2024-02-19 22:34:00 +00:00
seku80
f96a4cdb59 Update pt_PT
Fixed missing line #14 and removing duplicate entry line #870
2024-02-19 16:46:35 +00:00
seku80
efea22aa6e Update languages.html 2024-02-19 16:19:29 +00:00
seku80
ae9a7dc580 Add files via upload 2024-02-19 16:13:16 +00:00
seku80
7135ace1aa Add files via upload 2024-02-19 15:03:28 +00:00
Anthony Stirling
625275124a fix for #818 2024-02-18 15:47:19 +00:00
Anthony Stirling
c96ebccae4 Download message for game 2024-02-18 13:30:56 +00:00
Anthony Stirling
20cb460a7e controls and sizing bounds 2024-02-18 09:45:50 +00:00
Anthony Stirling
3a62d19979 game const 2024-02-18 09:21:30 +00:00
Ludy
51ad741744 Fix 746 (#825)
* Fix: #746

* formatting
2024-02-18 07:40:30 +00:00
Anthony Stirling
673f005fe6 Game fixes and ocr docs (#824) 2024-02-17 23:23:07 +00:00
Ludy
8d9f0361d0 Fix Serbia Language (#822)
* Fix Serbia Language

* Rename messages_sr_Latn_RS.properties to messages_sr_LATN_RS.properties

* Update languages.html

* Update README.md
2024-02-17 19:56:56 +00:00
Anthony Stirling
56e3ec1219 Update HowToUseOCR.md 2024-02-17 19:28:32 +00:00
dependabot[bot]
a0acafcefc Bump org.springframework:spring-webmvc from 6.1.2 to 6.1.3 (#713)
Bumps [org.springframework:spring-webmvc](https://github.com/spring-projects/spring-framework) from 6.1.2 to 6.1.3.
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.2...v6.1.3)

---
updated-dependencies:
- dependency-name: org.springframework:spring-webmvc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-17 13:24:38 +00:00
dependabot[bot]
918f5954b7 Bump io.micrometer:micrometer-core from 1.12.2 to 1.12.3 (#806)
Bumps [io.micrometer:micrometer-core](https://github.com/micrometer-metrics/micrometer) from 1.12.2 to 1.12.3.
- [Release notes](https://github.com/micrometer-metrics/micrometer/releases)
- [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.12.2...v1.12.3)

---
updated-dependencies:
- dependency-name: io.micrometer:micrometer-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-17 13:23:10 +00:00
albanobattistella
148dcdaee7 Update messages_it_IT.properties (#816) 2024-02-17 13:22:15 +00:00
Anthony Stirling
a5f0777892 Update ConfigInitializer.java for auto settings removal 2024-02-17 13:10:00 +00:00
Ludy
010426d488 Document (#803)
* Update HowToAddNewLanguage.md

* Update HowToUseOCR.md

* Update LocalRunGuide.md

* Update README.md

* Update LocalRunGuide.md

* Update README.md

---------

Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
2024-02-16 22:42:56 +00:00
Aliarev
6fc9c7be90 Update french translation (#814) 2024-02-16 22:24:26 +00:00
Sherif Metwally
094fde9801 Update-helm-chart (#815)
* upgrade app in helm chart to 0.20.2

* update and correct UI env variable names in chart values.yaml
2024-02-16 22:23:11 +00:00
Ludy
e4a76e96af HTML, CSS, JS and JAVA corrections (#810)
* CSS corrections

* HTML corrections

* JS corrections

* JAVA corrections

* remove tab

* CSS corrections 2

* JS corrections 2

* back to the roots

* max-linie 127

* add slash hr|br

* return bootstrap-icons.css

* return bootstrap-icons.min.css

* return bootstrap.min.css

* Update bootstrap-icons.css

* Update bootstrap-icons.min.css

* Update bootstrap-icons.min.css

* Update bootstrap.min.css

* CSS corrections

* HTML corrections

* JS corrections

* JAVA corrections

* remove tab

* CSS corrections 2

* JS corrections 2

* back to the roots

* max-linie 127

* add slash hr|br

* return bootstrap-icons.css

* Update bootstrap-icons.css

* Bootstrap CSS

* Update prism.css
2024-02-16 21:49:06 +00:00
Anthony Stirling
68f582bcb9 Merge pull request #811 from NeilJared/main
Update messages_es_ES.properties
2024-02-14 21:27:59 +00:00
NeilJared
639aed7120 Update messages_es_ES.properties
Updated es_ES translation
2024-02-14 12:22:47 +01:00
NeilJared
994bb4d1d2 Update messages_es_ES.properties
Minor bug fixes: es_ES translation
2024-02-14 11:57:34 +01:00
Anthony Stirling
80b11a55fa Merge pull request #804 from Ludy87/missing_pageSelectionPrompt
add missing propertie pageSelectionPrompt
2024-02-11 22:43:08 +00:00
Ludy87
3cfb554623 missing propertie pageSelectionPrompt 2024-02-11 21:10:04 +01:00
Eric
e84f9c5946 Merge pull request #796 from Ludy87/languages
Languages
2024-02-11 14:41:15 -05:00
Ludy87
17cc31d6e7 add placeholder translation 2024-02-11 14:32:34 -05:00
Ludy87
0c6e10a6dd add separator 2024-02-11 14:32:34 -05:00
Ludy87
297c57631f remove dublicate -> change showJS.tags to autoRedact.tags 2024-02-11 14:32:34 -05:00
Ludy87
bd4e252bb6 added missing strings 2024-02-11 14:32:33 -05:00
Ludy87
0ce34c70bc Update messages_de_DE.properties 2024-02-11 14:32:33 -05:00
Ludy87
4df75cfba1 Update messages_de_DE.properties 2024-02-11 14:32:33 -05:00
Ludy87
2aa435bcfb double spaces removed 2024-02-11 14:32:33 -05:00
Ludy87
0a4a9e6947 Removed unnecessary characters and added DE missing strings 2024-02-11 14:32:32 -05:00
Anthony Stirling
d5860d0b55 Update PdfToTextOrRTFRequest.java 2024-02-11 18:47:43 +00:00
Eric
6a487ce514 Merge pull request #802 from Stirling-Tools/normalize_files
refactor: normalize all files (strip trailing whitespace + convert CRLF to LF)
2024-02-11 13:11:37 -05:00
sbplat
4f3b85e66b refactor: normalize files that contained both CRLF and LF 2024-02-11 12:14:21 -05:00
sbplat
370cd97e05 misc: update .git-blame-ignore-revs to ignore normalize files commit in blame 2024-02-11 11:54:03 -05:00
sbplat
55d4fda01b refactor: normalize files 2024-02-11 11:47:00 -05:00
Anthony Stirling
3dd0471e22 Merge pull request #799 from Stirling-Tools/icon
Icon changes!
2024-02-10 16:40:00 +00:00
Anthony Stirling
5a4efa81a7 more icon changes 2024-02-10 16:22:59 +00:00
Anthony Stirling
ea59c12b27 icon changes 2024-02-10 16:17:47 +00:00
Anthony Stirling
9600f91dda bigger icons 2024-02-10 16:11:45 +00:00
Anthony Stirling
a9f93b014a icon change 2024-02-10 15:56:41 +00:00
Anthony Stirling
bf62e389f7 Merge branch 'main' of git@github.com:Frooodle/Stirling-PDF.git into
main
2024-02-10 14:55:53 +00:00
Anthony Stirling
26af6b5636 cleanups formatting 2024-02-10 14:52:59 +00:00
Anthony Stirling
0fabfea56d page adjusts for stamp 2024-02-10 14:52:27 +00:00
Anthony Stirling
7a9417a62f Merge pull request #794 from mannam11/fixed-stamptool-wrong-filename-generaion-#757
fixed wrong filename generation through stamp tool #757
2024-02-10 11:21:19 +00:00
Anthony Stirling
eb45005baa Merge branch 'main' into fixed-stamptool-wrong-filename-generaion-#757 2024-02-10 11:20:21 +00:00
Anthony Stirling
a4f923eb3a Update StampController.java 2024-02-10 11:19:22 +00:00
Anthony Stirling
e1c3561997 version bump and expose ports 2024-02-10 10:29:17 +00:00
mannam11
bf8b902100 Merge branch 'main' into fixed-stamptool-wrong-filename-generaion-#757 2024-02-10 15:57:38 +05:30
Anthony Stirling
8a5883501a Merge pull request #797 from Stirling-Tools/fixes
Fixes for docker changes plus others
2024-02-10 00:33:49 +00:00
Anthony Stirling
fd8f3ce019 Merge pull request #798 from Stirling-Tools/pixeebot/fixes
Hardening suggestions for Stirling-PDF / fixes
2024-02-10 00:33:33 +00:00
Anthony Stirling
6f72096953 more fixes 2024-02-10 00:21:00 +00:00
Anthony Stirling
5a52e3d6dd other changes 2024-02-10 00:08:54 +00:00
pixeebot[bot]
23672cd18d Modernize and secure temp file creation 2024-02-10 00:08:18 +00:00
pixeebot[bot]
68c0941666 Sanitized user-provided file names in HTTP multipart uploads 2024-02-10 00:08:18 +00:00
Anthony Stirling
96e399a617 changing html and book labels 2024-02-10 00:00:07 +00:00
Anthony Stirling
22343e507d fixes 2024-02-09 23:45:18 +00:00
Anthony Stirling
8a143d139c Merge remote-tracking branch 'origin/main' into fixes 2024-02-09 23:30:25 +00:00
Anthony Stirling
15ad46fe1c book htmk 2024-02-09 23:24:25 +00:00
Anthony Stirling
2473f0d034 Update build.gradle 2024-02-09 23:22:16 +00:00
Anthony Stirling
f211eefc85 Merge pull request #624 from Zoey2936/main
switch images to alpine
2024-02-09 23:22:07 +00:00
mannam
9da88b7652 fixed wrong filename generation through stamp tool #757 2024-02-09 19:35:34 +05:30
Anthony Stirling
729c8006d2 Merge pull request #789 from mannam11/fixed_remove_pages_exception#761
Fixed remove pages un-handled exception with space in input #761
2024-02-08 17:25:17 +00:00
Anthony Stirling
0d5b790443 Merge branch 'main' into fixed_remove_pages_exception#761 2024-02-08 17:19:30 +00:00
Anthony Stirling
aa16035137 Merge pull request #787 from Stirling-Tools/fix_stamp_margins
fix: use the same margins for x and y in the stamp feature
2024-02-08 17:18:31 +00:00
mannam
41686883ee Fixed remove pages un-handled exception with space in input #761 2024-02-08 21:03:57 +05:30
Eric
2e0790c893 Merge pull request #788 from Stirling-Tools/pixeebot/fix_stamp_margins
Hardening suggestions for Stirling-PDF / fix_stamp_margins
2024-02-07 21:52:21 -05:00
pixeebot[bot]
4e937a6024 Sanitized user-provided file names in HTTP multipart uploads 2024-02-08 02:46:39 +00:00
sbplat
4af58118c9 fix: use the same margins for x and y in the stamp feature 2024-02-07 21:40:33 -05:00
Zoey
aa2ad33c1d fix libreoffice install 2024-02-07 06:15:32 +01:00
Anthony Stirling
c7005bc07f Merge pull request #780 from NeilJared/main
Updated es_ES translation (100% completed)
2024-02-06 09:40:30 +00:00
NeilJared
3f932ebec9 Update messages_es_ES.properties
Updated es_ES translation (100%)
2024-02-06 10:03:55 +01:00
Stirling-PDF-Bot
296f265391 Update 3rd Party Licenses 2024-02-06 08:39:13 +00:00
Anthony Stirling
ca8519cb10 Merge remote-tracking branch 'origin/main' into fixes 2024-02-06 00:01:15 +00:00
Anthony Stirling
734d76a3b5 test 2024-02-06 00:00:49 +00:00
Anthony Stirling
f5a39ed514 Merge pull request #776 from michelheusschen/fix/dutch-small-corrections
fix: small corrections for Dutch language
2024-02-04 18:53:04 +00:00
Michel Heusschen
96f4e5eac7 fix: small corrections for Dutch language 2024-02-04 18:08:55 +01:00
Anthony Stirling
48be772703 Update build.gradle 2024-02-03 22:54:33 +00:00
Anthony Stirling
a9edb49723 Merge pull request #772 from Stirling-Tools/pixeebot/drip-2024-02-02-pixee-java/switch-literal-first
Switch order of literals to prevent NullPointerException
2024-02-02 00:31:13 +00:00
pixeebot[bot]
95471a2fba Switch order of literals to prevent NullPointerException 2024-02-02 00:29:18 +00:00
Anthony Stirling
36c277961f Merge pull request #771 from Stirling-Tools/pixeebot/drip-2024-02-02-pixee-java/upgrade-tempfile-to-nio
Modernize and secure temp file creation
2024-02-02 00:20:39 +00:00
pixeebot[bot]
734fff5618 Modernize and secure temp file creation 2024-02-02 00:15:46 +00:00
Anthony Stirling
16136b2f6f Merge pull request #769 from Stirling-Tools/pixeebot/drip-2024-02-01-pixee-java/sanitize-spring-multipart-filename
Sanitized user-provided file names in HTTP multipart uploads
2024-02-01 23:51:48 +00:00
pixeebot[bot]
c8dfe10a7c Sanitized user-provided file names in HTTP multipart uploads 2024-02-01 23:48:27 +00:00
Anthony Stirling
c8481fdbef Merge pull request #768 from Stirling-Tools/pixeebot/drip-2024-02-01-pixee-java/sandbox-url-creation
Sandboxed URL creation to prevent SSRF attacks
2024-02-01 23:37:41 +00:00
pixeebot[bot]
8e0c02a151 Sandboxed URL creation to prevent SSRF attacks 2024-02-01 23:35:05 +00:00
Anthony Stirling
271906097d Merge pull request #767 from Stirling-Tools/pixeebot/drip-2024-02-01-pixee-java/harden-process-creation
Introduced protections against system command injection
2024-02-01 23:22:59 +00:00
pixeebot[bot]
91caa2a097 Introduced protections against system command injection 2024-02-01 23:18:24 +00:00
Anthony Stirling
6105451e08 Merge pull request #766 from Stirling-Tools/pixeebot/drip-2024-02-01-pixee-java/limit-readline
Protect `readLine()` against DoS
2024-02-01 23:05:22 +00:00
pixeebot[bot]
450e090252 Protect readLine() against DoS 2024-02-01 23:01:04 +00:00
Anthony Stirling
86635f85b4 Merge pull request #764 from Stirling-Tools/pixeebot/drip-2024-02-01-pixee-java/harden-zip-entry-paths
Introduced protections against "zip slip"  attacks
2024-02-01 22:50:55 +00:00
Anthony Stirling
a7214a2171 Merge branch 'main' into pixeebot/drip-2024-02-01-pixee-java/harden-zip-entry-paths 2024-02-01 22:46:16 +00:00
Anthony Stirling
61cd473e6c Merge pull request #763 from Stirling-Tools/Frooodle-patch-1
Frooodle patch 1
2024-02-01 22:45:59 +00:00
Anthony Stirling
d67690d995 Update build.gradle 2024-02-01 22:43:25 +00:00
pixeebot[bot]
e20f4fe31a Introduced protections against "zip slip" attacks 2024-02-01 22:41:49 +00:00
Anthony Stirling
2deb40bb6d Update build.gradle 2024-02-01 22:41:13 +00:00
Anthony Stirling
bfee745cca Update build.gradle 2024-02-01 22:40:36 +00:00
Anthony Stirling
68d390e633 Merge pull request #707 from tkymmm/main
Update messages_ja_JP.properties
2024-02-01 09:23:28 +00:00
Eric
a884f1b3d4 Merge branch 'main' into main 2024-02-01 00:13:14 -05:00
Zoey
d190ae0cf3 add @testing (3/3) 2024-01-31 21:02:22 +01:00
Zoey
bb08a63296 add @testing (2/3) 2024-01-31 21:02:22 +01:00
Zoey
3debc1b0df add @testing (1/3) 2024-01-31 21:02:22 +01:00
Zoey
e560028097 Update Dockerfile-lite 2024-01-31 21:02:22 +01:00
Zoey
5afcbdbc8b use patched libreoffice version 2024-01-31 21:02:22 +01:00
Zoey
aaaf3ffe34 fix some things 2024-01-31 21:02:22 +01:00
Zoey
b043e666ae switch images to alpine
Signed-off-by: Zoey <zoey@z0ey.de>
2024-01-31 21:02:22 +01:00
Eric
cda8f7b27d Merge pull request #758 from Stirling-Tools/watermark_newline
feat: support '\n' literal in add watermark
2024-01-31 12:56:16 -05:00
Eric
d524fcc157 Merge branch 'main' into watermark_newline 2024-01-31 12:55:29 -05:00
Eric
e05e34f217 Merge pull request #754 from Stirling-Tools/fix_extract_image
fix: infinite recursion in `ImageFinder`
2024-01-31 12:55:07 -05:00
Eric
73bbb516d2 Merge branch 'main' into fix_extract_image 2024-01-31 12:51:47 -05:00
Anthony Stirling
c2aaa65228 Merge pull request #755 from ProvaTeams/Add-required-attribute-to-input-file
Add required attribute to input file
2024-01-31 17:37:45 +00:00
Anthony Stirling
91722af8b0 Merge branch 'main' into Add-required-attribute-to-input-file 2024-01-31 17:20:35 +00:00
Eric
71d33f6047 Merge pull request #760 from Stirling-Tools/pr_template
misc: update pull request template
2024-01-31 11:39:03 -05:00
sbplat
903faadff3 misc: update pull request template 2024-01-31 11:04:40 -05:00
ProvaTeams
55020d45f8 Using the flag logic 2024-01-31 14:09:16 +00:00
sbplat
2d37c707e2 feat: support '\n' literal in add watermark 2024-01-31 00:54:51 -05:00
ProvaTeams
b00f8c80ec Add required attribute to input file 2024-01-29 19:13:57 +01:00
sbplat
53afb865c5 refactor: replace ImageFinder with getAllImages using strategy behind ExtractImagesController 2024-01-29 11:23:58 -05:00
Anthony Stirling
6f3e317484 Merge pull request #736 from michelheusschen/update-dutch-translation
Update dutch translation
2024-01-29 08:18:43 +00:00
Michel Heusschen
e77d2847ea add new translations 2024-01-29 07:49:02 +01:00
Michel Heusschen
46abae9acc Merge branch 'main' of https://github.com/michelheusschen/Stirling-PDF into update-dutch-translation 2024-01-29 07:27:28 +01:00
Anthony Stirling
571320b9ba Merge pull request #703 from cloud-erik/main
Formating of language string in example
2024-01-28 20:23:21 +00:00
Anthony Stirling
07e9fcb6cc Merge pull request #737 from michelheusschen/fix/merge-tool-file-selection
fix: show only selected files for merge tool
2024-01-28 20:22:45 +00:00
Anthony Stirling
7a8719743d Merge pull request #751 from albanobattistella/patch-8
Update messages_it_IT.properties
2024-01-28 20:21:54 +00:00
albanobattistella
746f2d0949 Update messages_it_IT.properties 2024-01-28 21:18:57 +01:00
Anthony Stirling
3986858adb Update build.gradle 2024-01-28 20:11:41 +00:00
Anthony Stirling
589cb8d91f Add files via upload 2024-01-28 20:11:15 +00:00
Anthony Stirling
705c75e51d Merge pull request #749 from Stirling-Tools/Frooodle-patch-1
Auto split fix
2024-01-28 18:18:50 +00:00
Anthony Stirling
6acb593411 Update AutoSplitPdfController.java 2024-01-28 18:17:32 +00:00
Anthony Stirling
8060451713 Update AutoSplitPdfController.java 2024-01-28 18:16:59 +00:00
Anthony Stirling
6130f14d5a Merge pull request #748 from Stirling-Tools/pipelineFixes
Pipeline fixes
2024-01-28 17:48:48 +00:00
Anthony Stirling
0fbc461877 Merge branch 'main' into pipelineFixes 2024-01-28 17:41:17 +00:00
Anthony Stirling
89e461e4f6 formats 2024-01-28 17:39:07 +00:00
Anthony Stirling
ba4ad1aff9 langs 2024-01-28 17:37:02 +00:00
Anthony Stirling
be1904749b Add stamp, fix html, change accepts 2024-01-28 17:36:17 +00:00
Michel Heusschen
166fa0eb87 fix: show only selected files for merge tool 2024-01-23 16:06:57 +01:00
Michel Heusschen
9a06e7a3ca typo 2024-01-23 14:14:54 +01:00
Michel Heusschen
cb12af2d95 update Dutch (nl_NL) translation 2024-01-23 14:11:53 +01:00
Eric
46032b8ebb Merge pull request #719 from dhenry437/fix/multi-tool-filename
Multi-tool bug with dropping files
2024-01-22 14:28:07 -05:00
Anthony Stirling
4a6bd60466 Merge branch 'main' into fix/multi-tool-filename 2024-01-22 18:38:25 +00:00
Eric
f85c8ea5ec Merge pull request #730 from Stirling-Tools/fix-remove-blank-pages
fix: remove blank pages not handling EXIT_FAILURE code properly
2024-01-22 10:58:59 -05:00
sbplat
06ef09035d fix: remove blank pages not handling EXIT_FAILURE code properly 2024-01-22 10:39:29 -05:00
Anthony Stirling
13301e4606 Merge branch 'main' into fix/multi-tool-filename 2024-01-20 22:29:59 +00:00
Anthony Stirling
b59651a0fb Merge pull request #722 from phfuh/push
Update messages_de_DE.properties
2024-01-20 19:20:53 +00:00
Anthony Stirling
86b8d7f804 Merge pull request #723 from andrewdolphin/patch-1
Remove bootstrap css from view-pdf.html
2024-01-20 19:13:54 +00:00
andrewdolphin
e4dded3faa Remove bootstrap css from view-pdf.html that is causing issues when adding images 2024-01-19 10:31:05 +00:00
Anthony Stirling
75cf3ed0c1 Resolve wkhtml and formatting 2024-01-18 23:28:39 +00:00
Anthony Stirling
2fa68be36b pipeline fixes 2024-01-18 21:57:41 +00:00
phfuh
d09b252a4a Update messages_de_DE.properties
Translated the new entries, some corrections
2024-01-18 19:48:21 +01:00
sbplat
a5165b04cd fix(multi-tool): refactor fileInput.js into a class, fix filename variable typos, and update updateFilename logic for dropping files 2024-01-18 01:08:31 -05:00
Dan Henry
1bd17eded6 call updateFilenameInput on file drop 2024-01-18 12:08:32 +11:00
Dan Henry
18d289d3b7 Move filename input logic to its own function 2024-01-18 12:07:02 +11:00
Stirling-PDF-Bot
e43e6d18b9 Update 3rd Party Licenses 2024-01-17 23:52:12 +00:00
tkymmm
ec5a3c5948 Update messages_ja_JP.properties
Updated Japanese translation.
2024-01-15 10:16:46 +09:00
Stirling-PDF-Bot
89c0e721b8 Update 3rd Party Licenses 2024-01-15 00:13:30 +00:00
cloud-erik
c807d20590 Update docker-compose-latest-lite-security.yml
Exemple DEFAULTLOCALE formating
2024-01-14 10:32:34 +01:00
cloud-erik
686af16cf5 Update docker-compose-latest-lite.yml
Exemple DEFAULTLOCALE formating
2024-01-14 10:32:23 +01:00
cloud-erik
219dd7834f Update docker-compose-latest-security.yml
Exemple DEFAULTLOCALE formating
2024-01-14 10:32:12 +01:00
cloud-erik
1b83fda349 Update docker-compose-latest-ultra-lite-security.yml
Exemple DEFAULTLOCALE formating
2024-01-14 10:32:00 +01:00
cloud-erik
490acddc65 Update docker-compose-latest-ultra-lite.yml
Exemple DEFAULTLOCALE formating
2024-01-14 10:31:45 +01:00
cloud-erik
e69ed06b4f Update docker-compose-latest.yml
Exemple DEFAULTLOCALE formating
2024-01-14 10:29:21 +01:00
Anthony Stirling
2fe9b5a24b Merge pull request #699 from Stirling-Tools/pdfbox3
PDFBox v3 upgrade plus resolution to reversed text
2024-01-13 10:13:00 +00:00
Anthony Stirling
3912f42128 changeCreds message 2024-01-13 10:08:42 +00:00
Anthony Stirling
801e307005 0.20 bump 2024-01-13 01:09:41 +00:00
Anthony Stirling
c8acddb251 Resolve split sections 2024-01-13 01:05:43 +00:00
Anthony Stirling
d8cf7e81b9 fixes 2024-01-13 00:55:43 +00:00
Anthony Stirling
c4ad442ec3 remove logs 2024-01-13 00:46:17 +00:00
Anthony Stirling
c8e5023ec1 fix 2024-01-13 00:37:19 +00:00
Anthony Stirling
5281d7a49a pdfbox3 upgrade and fix 2024-01-12 23:15:27 +00:00
Anthony Stirling
77dcf04cfe Merge pull request #697 from Stirling-Tools/contributing
docs: add contributing guide
2024-01-11 23:07:37 +00:00
sbplat
b6523e9989 Merge branch 'contributing' of https://github.com/Stirling-Tools/Stirling-PDF into contributing 2024-01-11 17:39:22 -05:00
sbplat
d52a00185b Merge branch 'main' into contributing 2024-01-11 17:39:03 -05:00
sbplat
00487275a7 docs: list supported languages in readme 2024-01-11 17:38:05 -05:00
Anthony Stirling
823c8eb53e Merge pull request #686 from PeterDaveHelloKitchen/Markdown
Specify code block language in Markdown for syntax highlighting
2024-01-11 22:38:02 +00:00
Anthony Stirling
e9b8981a35 Merge pull request #698 from Stirling-Tools/Sf298-patch-1
Updated demo site
2024-01-11 22:30:10 +00:00
Saud Fatayerji
575e0b3e54 Updated demo site 2024-01-11 22:07:56 +03:00
sbplat
db931717a1 Merge branch 'main' into contributing 2024-01-11 10:47:55 -05:00
sbplat
787c59efd3 Merge pull request #694 from iLern/bugfix-md2pdf
Enable support for tables in the conversion from Markdown to HTML
2024-01-11 10:47:40 -05:00
sbplat
45aead89e3 docs: add contributing guide 2024-01-11 10:35:34 -05:00
TieStone
81d49b722b add table support in md2pdf transport 2024-01-11 14:54:01 +08:00
TieStone
ab9e7bbb8c add table support in md2pdf transport 2024-01-11 14:54:01 +08:00
TieStone
ee223d0405 add table support 2024-01-11 14:54:01 +08:00
Stirling-PDF-Bot
99050ad73e Update 3rd Party Licenses 2024-01-11 14:40:26 +08:00
sbplat
9fc873e973 Merge pull request #683 from Stirling-Tools/version_fix
fix: version showing as 0.0.0
2024-01-10 09:28:43 -05:00
Peter Dave Hello
52fe4c6aa6 Specify code block language in Markdown for syntax highlighting 2024-01-10 19:17:09 +08:00
sbplat
66df7053bb Merge branch 'main' into version_fix 2024-01-09 21:17:57 -05:00
sbplat
edde1a6436 fix: version showing as 0.0.0 2024-01-09 21:13:35 -05:00
Anthony Stirling
50ee829e5f Merge pull request #682 from Stirling-Tools/ebook
Ebook
2024-01-10 00:41:54 +00:00
Anthony Stirling
1924dfb4f1 Merge branch 'main' into ebook 2024-01-10 00:40:17 +00:00
Anthony Stirling
873a4ecb7e revert 2024-01-10 00:39:26 +00:00
Anthony Stirling
32da14acbf log removal 2024-01-10 00:37:55 +00:00
Anthony Stirling
139c793b5e 0.19.1 2024-01-10 00:33:22 +00:00
Anthony Stirling
e717d83f75 fixes and timeouts 2024-01-10 00:33:07 +00:00
Anthony Stirling
ef12c2f892 Add ebook support 2024-01-09 22:39:21 +00:00
Anthony Stirling
362a7ff434 Update releaseArtifacts.yml 2024-01-06 23:06:58 +00:00
Anthony Stirling
624e015315 Update PipelineFeature.md 2024-01-06 22:56:56 +00:00
Anthony Stirling
d76752d7f6 Create PipelineFeature.md 2024-01-06 22:53:07 +00:00
Anthony Stirling
7260e578e3 Merge pull request #666 from Stirling-Tools/stamp
docs
2024-01-06 22:22:34 +00:00
Anthony Stirling
2544b762ba Merge branch 'main' into stamp 2024-01-06 22:18:29 +00:00
Anthony Stirling
164d1abdbb Delete PipelineUsage.md 2024-01-06 22:17:03 +00:00
Anthony Stirling
863b48b5a9 Delete CNAME 2024-01-06 21:09:37 +00:00
Anthony Stirling
b5e0e147ac Merge pull request #651 from PeterDaveHelloKitchen/OptimizeDockerfile
Optimize DockerfileBase for Improved Efficiency and Reduced Size
2024-01-05 20:28:54 +00:00
Anthony Stirling
2fe454ea47 Merge pull request #665 from albanobattistella/patch-7
Update messages_it_IT.properties
2024-01-05 20:23:05 +00:00
albanobattistella
c8458ffe50 Update messages_it_IT.properties 2024-01-05 20:39:01 +01:00
Anthony Stirling
572f9f728f lang 2024-01-05 18:00:30 +00:00
Anthony Stirling
6c963e1b6c format 2024-01-04 23:04:15 +00:00
Anthony Stirling
770b61bb7a Update build.gradle 2024-01-04 21:09:22 +00:00
Anthony Stirling
db64b3f71d lang and footer updates 2024-01-04 20:59:52 +00:00
Anthony Stirling
5fad085db5 Merge pull request #656 from Stirling-Tools/licenses
Licenses
2024-01-04 19:22:22 +00:00
Anthony Stirling
7ed8a69326 test 2024-01-04 19:17:38 +00:00
Anthony Stirling
5d1786cda0 version bump 2024-01-04 19:01:53 +00:00
Anthony Stirling
550f8b0eea licenses remove about 2024-01-04 19:01:37 +00:00
Anthony Stirling
b5d5b6e3e2 remove comment 2024-01-04 18:59:54 +00:00
Anthony Stirling
97b6f0eeb4 Merge remote-tracking branch 'origin/main' into licenses 2024-01-04 18:56:54 +00:00
Anthony Stirling
bd7e2fea0b Merge pull request #650 from Stirling-Tools/cert-sign
fix: pdf certificate signing
2024-01-04 18:54:40 +00:00
Anthony Stirling
eee7e4d707 Merge branch 'main' into cert-sign 2024-01-04 18:50:02 +00:00
Anthony Stirling
43410de851 Merge remote-tracking branch 'origin/main' into licenses 2024-01-04 18:48:05 +00:00
Anthony Stirling
37c92ee9aa Merge remote-tracking branch 'origin/main' into licenses 2024-01-04 18:42:14 +00:00
Anthony Stirling
351cf25f86 license lang 2024-01-04 18:41:33 +00:00
Anthony Stirling
10cb02020c Merge pull request #655 from 92mn/main
Adding Serbian (Latin) Language
2024-01-04 18:30:43 +00:00
92mn
5e40f00bae Update languages.html 2024-01-04 19:16:59 +01:00
92mn
cebc0daf2b Rename message_sr_Latin_RS.propreties to message_sr-Latn-RS.propreties 2024-01-04 19:16:31 +01:00
92mn
04f3f735fc Added Serbian Latin
Added Serbian Latin translation
2024-01-04 17:28:58 +01:00
92mn
f7ef8c32aa Added Serbian flag
Added Serbian flag
2024-01-04 16:33:10 +01:00
92mn
49f2071a93 Update languages.html
Added Serbian ( Latin )
2024-01-04 16:30:00 +01:00
Peter Dave Hello
ecb62e0c94 Apply --no-cache-dir to pip upgrade in DockerfileBase
Aligned pip upgrade command with others by adding the `--no-cache-dir`
flag to reduce image layer size.
2024-01-04 20:56:24 +08:00
Peter Dave Hello
846ebe6dda Refine Tesseract-OCR file backup process in DockerfileBase 2024-01-04 20:55:55 +08:00
Peter Dave Hello
56afd35c82 Refactor DockerfileBase to clean up apt cache after package installation
Changes include:
- Cleaning up the apt cache by adding `rm -rf /var/lib/apt/lists/*`
  after each package installation within the same RUN statement.
- Ensuring the Docker image size is minimized by removing unnecessary
  files immediately after use.

These adjustments will result in a more space-efficient Docker image.
2024-01-04 20:43:46 +08:00
sbplat
eadd513b02 chore(translation): add certsign jks to en-GB 2024-01-03 21:54:15 -05:00
sbplat
97f581ad6d feat: add java keystore certificate option for pdf signing 2024-01-03 21:51:30 -05:00
sbplat
d96a3db60a fix: add pem support for cert sign 2024-01-03 18:21:59 -05:00
Anthony Stirling
0592bac5bf liceneses without translation or GH action 2024-01-03 23:01:33 +00:00
Anthony Stirling
4b0df4ffd5 Update README.md 2024-01-03 21:28:06 +00:00
sbplat
a244d563f2 Merge branch 'main' into cert-sign 2024-01-03 15:50:46 -05:00
sbplat
f433e8032f fix: pkcs12 signing
TODO: add PEM support and use page number
2024-01-03 15:49:08 -05:00
Anthony Stirling
23b85dc47c Merge pull request #647 from albanobattistella/patch-5
Update messages_it_IT.properties
2024-01-03 20:41:16 +00:00
Anthony Stirling
6a9ef7d538 Update releaseArtifacts.yml 2024-01-03 18:51:41 +00:00
Anthony Stirling
c75efede79 Update push-docker.yml 2024-01-03 18:46:29 +00:00
Anthony Stirling
a0212bbfb7 Merge pull request #644 from Antiarchitect/improve-formatting
Make ./gradlew executable; accept .java files improvements
2024-01-03 18:25:56 +00:00
Anthony Stirling
87efa175cb Merge branch 'main' into improve-formatting 2024-01-03 18:13:31 +00:00
Anthony Stirling
ad7150d616 Merge pull request #649 from Stirling-Tools/eol
Eol
2024-01-03 18:11:30 +00:00
Anthony Stirling
6fe268adcb eol 2024-01-03 17:59:04 +00:00
Anthony Stirling
0c2b05eabf Update .gitattributes 2024-01-03 17:58:02 +00:00
albanobattistella
38ebc28108 Update messages_it_IT.properties 2024-01-03 18:29:01 +01:00
Anthony Stirling
0a08831aac Merge pull request #646 from PeterDaveHelloKitchen/zh_TW
Add a basic Traditional Chinese translation
2024-01-03 17:00:45 +00:00
Peter Dave Hello
2a744473f9 Add a basic Traditional Chinese translation
The svg flag file came from:

Flag of the Republic of China - Taiwan - Wikipedia
https://en.wikipedia.org/wiki/Taiwan#/media/File:Flag_of_the_Republic_of_China.svg
2024-01-04 00:01:15 +08:00
Anthony Stirling
56ce53a966 Merge pull request #645 from PeterDaveHelloKitchen/UpdateLanguageInREADME.md
Update supported languages in README to include all 24
2024-01-03 14:38:46 +00:00
Peter Dave Hello
6baf1f94c1 Update supported languages in README to include all 24
Adjusted the README to correctly enumerate all 24 languages supported by
the project. This change includes the addition of Hungarian (Magyar) and
Bulgarian (Български) to the list, based on the properties files located
in 'src/main/resources'.
2024-01-03 21:42:48 +08:00
Andrey Voronkov
8a57165547 Make ./gradlew executable; accept .java files improvements after running ./gradlew build 2024-01-03 03:21:11 +03:00
Anthony Stirling
de9e9a0f84 Merge pull request #642 from mannam11/on_hover-pagenumber-display#527
display page numbers on mouse-hover issue#527
2024-01-02 22:08:44 +00:00
Anthony Stirling
73a55c0666 Merge branch 'main' into on_hover-pagenumber-display#527 2024-01-02 21:53:40 +00:00
Anthony Stirling
4ac5262be2 Update test.yml 2024-01-02 21:52:51 +00:00
Anthony Stirling
dfee149da0 Merge branch 'main' into on_hover-pagenumber-display#527 2024-01-02 21:35:29 +00:00
Anthony Stirling
fbe0a8ddcc Merge pull request #643 from Stirling-Tools/githubActionTest
GitHub action for docker testing
2024-01-02 21:34:58 +00:00
Anthony Stirling
56a1867270 Update test.sh 2024-01-02 21:17:25 +00:00
Anthony Stirling
c23a5ad5fb Merge branch 'main' into githubActionTest 2024-01-02 21:11:31 +00:00
Anthony Stirling
31fbeaae1d Update test.yml 2024-01-02 21:11:05 +00:00
Anthony Stirling
e0d79990c8 Update test.yml 2024-01-02 21:10:11 +00:00
Anthony Stirling
468808167c Update test.yml 2024-01-02 20:54:33 +00:00
mannam
5af5794dfe display page number on mouse-hover issue#527 2024-01-02 16:44:57 +05:30
Anthony Stirling
1d470691a5 Merge pull request #640 from Antiarchitect/add-meta-description
Add meta::description; pass header variable
2024-01-02 00:08:42 +00:00
Andrey Voronkov
f32832f70d Add meta::description; pass header variable 2024-01-02 02:44:49 +03:00
Anthony Stirling
cd0464092a Merge pull request #638 from ThePandaB0i/patch-1
Fixed Turkish languages.html
2024-01-01 21:09:35 +00:00
ThePandaB0i
c67eaf2b4d Fixed Turkish languages.html
Added the missing "data-bs-language-code" to Turkish language dropdown item.
2024-01-01 23:52:03 +03:00
Anthony Stirling
b1f80bc9f6 Update test.yml 2024-01-01 20:07:37 +00:00
Anthony Stirling
f3742ebeb6 Update test.yml 2024-01-01 19:53:21 +00:00
Anthony Stirling
adc7b9606b Update test.yml 2024-01-01 19:53:09 +00:00
Anthony Stirling
aa34257080 Update test.yml 2024-01-01 19:52:26 +00:00
Anthony Stirling
0f126eaf81 Create test.yml 2024-01-01 19:46:33 +00:00
Anthony Stirling
7389543af6 Merge pull request #623 from Stirling-Tools/changes
pipeline Changes and example yml for testing
2024-01-01 19:32:59 +00:00
Anthony Stirling
9795c68220 revert 2024-01-01 19:30:43 +00:00
Anthony Stirling
7ffa447cbc remove logs 2024-01-01 18:57:12 +00:00
Anthony Stirling
d755fd1861 opencsv 2024-01-01 18:31:36 +00:00
Anthony Stirling
e273294360 deps 2024-01-01 18:02:54 +00:00
Anthony Stirling
827ed62761 Merge branch 'main' into changes 2024-01-01 17:06:03 +00:00
Anthony Stirling
ee96d2a0e3 Update dependabot.yml 2024-01-01 16:22:55 +00:00
Anthony Stirling
044a779a7c Test files update 2024-01-01 14:57:52 +00:00
Anthony Stirling
03a8f45128 cleanup 2024-01-01 14:46:19 +00:00
Anthony Stirling
b5423f3434 langs 2024-01-01 14:26:41 +00:00
Anthony Stirling
88c993367f init lang changes 2024-01-01 14:19:22 +00:00
Anthony Stirling
04acdb3b02 Fix for ANY values and settings button enablement 2024-01-01 13:57:22 +00:00
Anthony Stirling
cd3cc15888 minor changes 2024-01-01 13:46:09 +00:00
Anthony Stirling
76e6a23674 split fixes 2024-01-01 12:14:46 +00:00
Anthony Stirling
4fbfd0bae4 print docker logs on fail 2023-12-31 19:13:24 +00:00
Anthony Stirling
b74819cf6c lang 2023-12-31 16:01:27 +00:00
Anthony Stirling
a5ad9e13fe todo 2023-12-31 14:56:08 +00:00
Anthony Stirling
328e873344 remove prints 2023-12-31 13:35:58 +00:00
Anthony Stirling
39045df785 formats 2023-12-31 13:34:35 +00:00
Anthony Stirling
d83bd1ae94 Merge branch 'main' into changes 2023-12-31 13:33:10 +00:00
Anthony Stirling
143b770882 format 2023-12-31 13:28:18 +00:00
Anthony Stirling
d91c600925 pipeline fix 2023-12-31 13:27:06 +00:00
Anthony Stirling
cbac784c57 pipeline 2023-12-31 13:16:04 +00:00
Anthony Stirling
f535387ac4 pipeline enhance for MI 2023-12-31 13:05:38 +00:00
Anthony Stirling
739dcc1327 Merge pull request #621 from Stirling-Tools/sbplat-patch-1
misc: change all repo links from Frooodle to Stirling-Tools
2023-12-31 10:06:37 +00:00
sbplat
3864e130cc misc: change all repo links from Frooodle to Stirling-Tools 2023-12-30 18:36:07 -05:00
sbplat
5b0145fa47 misc: change all repo links from Frooodle to Stirling-Tools 2023-12-30 18:22:46 -05:00
sbplat
7dfeb4bb0f Update footer.html 2023-12-30 18:12:06 -05:00
Anthony Stirling
eda91cc556 tests 2023-12-30 21:32:04 +00:00
sbplat
7572db9bd4 Merge pull request #618 from Frooodle/spotless
refactor: have a newline between annotations
2023-12-30 15:14:01 -05:00
sbplat
9e3b50dff3 Merge branch 'main' into spotless 2023-12-30 14:52:19 -05:00
sbplat
cf640c7e3f refactor: have a newline between annotations 2023-12-30 14:50:59 -05:00
Anthony Stirling
ec770e1008 Merge pull request #611 from Frooodle/spotless
Use spotless in `build.gradle` and apply spotless to java source files
2023-12-30 19:44:48 +00:00
sbplat
15e0048bfc Merge pull request #617 from Frooodle/spotlessFormat
Spotless format
2023-12-30 14:39:36 -05:00
Anthony Stirling
b572a5e4c9 auto run spotlessapply 2023-12-30 19:37:46 +00:00
Anthony Stirling
c55a5657a4 Add .git-blame-ignore-revs to ignore formatting commits in git blame 2023-12-30 19:14:14 +00:00
Anthony Stirling
5f771b7851 formatting 2023-12-30 19:11:27 +00:00
Anthony Stirling
c853465d1d tests 2023-12-30 18:56:07 +00:00
sbplat
b58cbdcb61 Merge branch 'main' into spotless 2023-12-30 13:04:23 -05:00
Anthony Stirling
9e81667ecd Merge pull request #616 from albanobattistella/patch-4
Update messages_it_IT.properties
2023-12-30 17:34:23 +00:00
albanobattistella
a92479b505 Update messages_it_IT.properties 2023-12-30 18:19:51 +01:00
Anthony Stirling
6ca9001fe6 enable status check without apikey 2023-12-30 13:42:24 +00:00
Anthony Stirling
279cfa70f5 Merge pull request #615 from mannam11/added-remove-button-529
added a remove button issue#529
2023-12-30 11:27:18 +00:00
Anthony Stirling
f8ad71aa4e Merge branch 'main' into added-remove-button-529 2023-12-30 11:26:32 +00:00
Anthony Stirling
524d198212 Merge pull request #613 from mannam11/mannam11/file-override-fix-529
overriding previously selected files issue#529
2023-12-30 11:26:23 +00:00
Anthony Stirling
1baf458344 Merge branch 'main' into added-remove-button-529 2023-12-30 11:24:56 +00:00
Anthony Stirling
da50e4d212 Merge branch 'main' into mannam11/file-override-fix-529 2023-12-30 11:24:45 +00:00
mannam
bbd8de0899 added a remove button issue#529 2023-12-30 16:42:41 +05:30
Anthony Stirling
c548aa037e Merge pull request #612 from NeilJared/main
Update messages_es_ES.properties
2023-12-30 09:55:38 +00:00
NeilJared
6a7ed615e3 Merge branch 'Frooodle:main' into main 2023-12-30 09:10:26 +01:00
NeilJared
56cbb4381b Update messages_es_ES.properties 2023-12-30 09:09:27 +01:00
mannam
4612b05199 overriding previously selected files issue#529 2023-12-30 13:32:54 +05:30
sbplat
7b43fca6fc ci: gradle build instead of assemble 2023-12-29 21:59:36 -05:00
sbplat
e3c8af7e54 chore: use spotless googleJavaFormat 2023-12-29 21:34:36 -05:00
Anthony Stirling
63eacf443e Merge pull request #610 from Frooodle/fix
required false
2023-12-30 02:20:34 +00:00
Anthony Stirling
b32c28e9cb Update build.gradle 2023-12-30 02:20:16 +00:00
Anthony Stirling
a5ee10e029 required flase 2023-12-30 02:19:30 +00:00
Anthony Stirling
bb1d41d74a Merge pull request #605 from Frooodle/expose-port
refactor: expose local application server port
2023-12-29 23:27:59 +00:00
Anthony Stirling
0698e2888d Merge pull request #608 from Frooodle/overlay
messages
2023-12-29 22:57:29 +00:00
Anthony Stirling
e1f0a6cb1d messages 2023-12-29 22:56:38 +00:00
Anthony Stirling
7fecae8b0d Merge pull request #607 from Frooodle/overlay
overlay fix for sequential
2023-12-29 22:54:07 +00:00
Anthony Stirling
e6622dfdc4 overlay fix for sequential 2023-12-29 22:53:46 +00:00
sbplat
34b4ae0e03 refactor: reflect changes to pipeline release 2023-12-29 17:13:36 -05:00
sbplat
036fd711f9 Merge branch 'main' into expose-port 2023-12-29 17:01:49 -05:00
Anthony Stirling
80a59205fa Merge pull request #570 from Frooodle/test
Pipeline release
2023-12-29 21:51:06 +00:00
Anthony Stirling
cbe4bca716 add banner and remove unused class 2023-12-29 21:46:17 +00:00
Anthony Stirling
232a556425 Merge branch 'test' of git@github.com:Frooodle/Stirling-PDF.git into test 2023-12-29 21:05:42 +00:00
Anthony Stirling
a497ad8c41 api changes to get metrics working 2023-12-29 21:05:32 +00:00
Anthony Stirling
3041e80c37 Merge branch 'main' into test 2023-12-29 20:48:27 +00:00
Anthony Stirling
1b2df20fdd reviews 2023-12-29 20:48:21 +00:00
Anthony Stirling
0e69f7e0e8 Merge pull request #604 from iLern/feat-zhCN
Enhance Chinese Translations and Correct Errors
2023-12-29 18:26:55 +00:00
sbplat
94aba370e0 refactor: expose local application server port 2023-12-29 13:05:01 -05:00
TieStone
cd49d7ffa2 add more Chinese Translations 2023-12-30 00:45:36 +08:00
TieStone
dc297644d1 add more Chinese Translations 2023-12-30 00:45:36 +08:00
TieStone
a7b4e44e6d remove duplicated property keys 2023-12-30 00:45:36 +08:00
Anthony Stirling
610ff22abe empty dir fix 2023-12-29 13:53:55 +00:00
Anthony Stirling
27e8335f79 Merge pull request #602 from Antiarchitect/set-file-encoding
Set java file.encoding to support non-latin customizations
2023-12-29 13:38:03 +00:00
Anthony Stirling
168a0f001c changes 2023-12-29 13:30:28 +00:00
Anthony Stirling
5c6936b494 Rework and cleanup 2023-12-29 12:55:22 +00:00
Anthony Stirling
a715dbb25d cleanup 2023-12-29 11:43:36 +00:00
Andrey Voronkov
a43e13cf94 Set java file.encoding to support non-latin customizations with UI_APPNAME, UI_HOMEDESCRIPTION, etc 2023-12-29 12:35:02 +03:00
Anthony Stirling
7f805d16a1 Merge pull request #600 from sudotman/main
Added missing Hindi (hi_IN) translations and fixed a few broken ones.
2023-12-29 07:57:43 +00:00
Satyam Kashyap
6f3cbe0cae added missing hindi (hi_IN) translations and fixed some broken translations - also updated readme to reflect the newly added translations 2023-12-29 06:05:48 +00:00
Anthony Stirling
44e3556382 Create CODEOWNERS 2023-12-28 23:13:47 +00:00
Anthony Stirling
c5ba546a02 Merge pull request #598 from vivekmaru36/add-hindi-language
Add hindi Translation
2023-12-28 18:56:27 +00:00
Anthony Stirling
d63519bbf4 Merge branch 'main' into add-hindi-language 2023-12-28 18:54:56 +00:00
Anthony Stirling
aeadc88f92 resolve .exe showing other entries it doesnt support 2023-12-28 18:46:54 +00:00
Anthony Stirling
829e98c29b MaxRAMPercentage 75 for #540 2023-12-28 17:49:45 +00:00
vivekmaru36
3e3f4a0188 Add hindi Translation 2023-12-28 23:09:38 +05:30
Anthony Stirling
e5bdd52b7c Merge pull request #589 from sbplat/main
fix: sequentially convert each pdf page into a BufferedImage to avoid getting out of memory errors for large pdf files
2023-12-28 17:39:02 +00:00
Anthony Stirling
e653ef6522 Merge branch 'main' into main 2023-12-28 17:32:38 +00:00
Anthony Stirling
5fcb4e893b pipeline refactor beginnings 2023-12-28 17:23:19 +00:00
Anthony Stirling
c2b524e459 Merge pull request #596 from eltociear/patch-2
chore: update README.md
2023-12-28 17:09:08 +00:00
sbplat
5a055bae5e Merge branch 'main' into main 2023-12-28 11:47:44 -05:00
Ikko Eltociear Ashimine
c3f501d701 chore: update README.md
a -> an
2023-12-29 00:34:56 +09:00
Anthony Stirling
8acab77ae3 contextPath fixes 2023-12-28 13:50:31 +00:00
Anthony Stirling
8bd2784f37 Merge pull request #594 from albanobattistella/patch-3
Update messages_it_IT.properties
2023-12-28 09:31:29 +00:00
albanobattistella
e2c5027311 Update messages_it_IT.properties 2023-12-28 10:28:21 +01:00
Anthony Stirling
d2b2adcbc1 Merge pull request #593 from aancw/id-translate
Add Indonesia Translation
2023-12-28 09:04:07 +00:00
Anthony Stirling
48158379ee Merge branch 'main' into id-translate 2023-12-28 09:03:02 +00:00
Aan
6ba84a190f translate file word to indonesia 2023-12-28 15:34:50 +07:00
Aan
d349aea1be Translate file word 2023-12-28 15:30:36 +07:00
Aan
79e2683cbe Keep watermark translation 2023-12-28 15:12:18 +07:00
Anthony Stirling
e4fb64ce16 Merge pull request #588 from Emad-Eldin-G/patch-1
Optimized the code in detect-blank-pages.py
2023-12-28 07:55:25 +00:00
sbplat
d405b7a810 perf: avoid re-rendering the first pdf page 2023-12-27 22:46:55 -05:00
sbplat
1d243a0ca5 fix: clean up redundant variable 2023-12-27 22:43:30 -05:00
sbplat
1f10693eaf fix: sequentially convert each pdf page into a BufferedImage to avoid getting MLE for large pdf files 2023-12-28 03:23:55 +00:00
EmadEldin Osman
b7f62a635d Optimized the code in detect-blank-pages.py
Made use of Numpy arrays
2023-12-28 04:51:50 +03:00
Anthony Stirling
4e991e7ec2 Merge pull request #582 from manuelkamp/patch-5
Update LocalRunGuide.md
2023-12-28 00:49:02 +00:00
Anthony Stirling
8fe7e57a6a Merge branch 'main' into patch-5 2023-12-28 00:47:06 +00:00
Anthony Stirling
5c79a5da29 Merge pull request #585 from Saneeitas/Saneeitas-patch-1
Update README.md
2023-12-28 00:37:24 +00:00
Muhammad Sani Ibrahim
d01473aceb Update README.md
made the english more standard
2023-12-28 01:27:25 +01:00
Anthony Stirling
3911be0177 Add Demo user 2023-12-27 22:56:51 +00:00
Anthony Stirling
78da44ad83 fix for #583 2023-12-27 19:28:49 +00:00
manuelkamp
54859ac3ba Update LocalRunGuide.md
Improved optional service section regarding environment variables in a separate .env file
2023-12-27 19:52:51 +01:00
Anthony Stirling
9cb8c9f655 Merge pull request #581 from manuelkamp/patch-4
Update LocalRunGuide.md
2023-12-27 18:48:30 +00:00
manuelkamp
dfda474ba5 Update LocalRunGuide.md
Added option to set up Stirling-PDF as a service
2023-12-27 19:30:28 +01:00
Anthony Stirling
43f15b3e55 Merge pull request #579 from manuelkamp/patch-3
Update LocalRunGuide.md
2023-12-27 18:10:13 +00:00
Anthony Stirling
86c45f6f8f Merge pull request #578 from manuelkamp/patch-2
Update LocalRunGuide.md
2023-12-27 18:10:03 +00:00
Anthony Stirling
de83321c62 Merge pull request #577 from manuelkamp/patch-1
Update LocalRunGuide.md #575
2023-12-27 18:09:43 +00:00
manuelkamp
7b44cf77d6 Update LocalRunGuide.md
Added "WeasyPrint" to pip3 install section
2023-12-27 18:54:55 +01:00
manuelkamp
c769a02982 Update LocalRunGuide.md
Edited run via java, since on previous step we moved the jar-file to /opt/Stirling-PDF
2023-12-27 18:51:51 +01:00
manuelkamp
aa671b8bd6 Update LocalRunGuide.md 2023-12-27 18:46:37 +01:00
Anthony Stirling
6e7c066e57 Merge pull request #574 from eltociear/patch-1
Update README.md
2023-12-27 15:39:54 +00:00
Ikko Eltociear Ashimine
78ac9231c5 Update README.md
temporay -> temporary
2023-12-28 00:34:30 +09:00
Anthony Stirling
e9947da5b4 changes 2023-12-27 15:18:26 +00:00
Anthony Stirling
8df7dfc3be Merge pull request #569 from albanobattistella/patch-2
Update messages_it_IT.properties
2023-12-27 15:03:44 +00:00
albanobattistella
d79db6f3da Update messages_it_IT.properties 2023-12-27 16:01:00 +01:00
Anthony Stirling
84aebe3851 validate button color 2023-12-27 13:22:28 +00:00
Anthony Stirling
f5c285a70f mild cleanup 2023-12-27 12:51:17 +00:00
Perdana Hadi
2d6bf43bdb update tags translations 2023-12-27 15:52:11 +07:00
Aan
964f22e3e0 Add Bahasa Indonesia 2023-12-27 14:43:32 +07:00
Aan
d325020e22 home page section done, todo tags extractImages.tags 2023-12-27 14:37:25 +07:00
Aan
aec85ddd66 missing quote 2023-12-27 14:09:57 +07:00
Perdana Hadi
32b009b11f remove extra line, add white space 2023-12-27 12:38:17 +07:00
Perdana Hadi
2e5b72e4fb add web-pages translation 2023-12-27 12:28:31 +07:00
Aan
1d3cf2bdc3 Remove DS_Store 2023-12-27 10:27:39 +07:00
Aan
2a5fe2bd74 27/12/2023 2023-12-27 10:06:09 +07:00
Anthony Stirling
61ff0248da close 2023-12-27 01:00:42 +00:00
Anthony Stirling
659af2089c setup 2023-12-27 00:53:31 +00:00
Anthony Stirling
8960313a2b Merge pull request #566 from sbplat/main
fix: add default value for the position in Add Page Numbers
2023-12-26 20:55:48 +00:00
Anthony Stirling
6ee8e1e37f auto disable in UI 2023-12-26 20:33:17 +00:00
Anthony Stirling
05977aa3a6 enableAlphaFunctionality 2023-12-26 20:10:37 +00:00
sbplat
f7dbb8d0a6 Merge branch 'main' of https://github.com/sbplat/Stirling-PDF 2023-12-26 13:32:13 -05:00
sbplat
eaf65d7981 fix: add selectedPosition style to the Add Page Number position selector default value 2023-12-26 13:31:33 -05:00
sbplat
a10e3a025b Merge branch 'Frooodle:main' into main 2023-12-26 13:27:21 -05:00
sbplat
4d3e442ecc fix: add default value for the position in Add Page Numbers 2023-12-26 13:26:37 -05:00
Anthony Stirling
49576c0aa4 Merge pull request #564 from farwill/farwill-patch-1
Fix README.md typo
2023-12-26 09:08:16 +00:00
farwill
960af83f11 Fix README.md typo 2023-12-26 14:30:18 +08:00
Aan
cf42ef7faa Intial Draft #1 2023-12-26 12:38:27 +07:00
Anthony Stirling
d894937c22 Merge pull request #560 from sbplat/main
fix(multitool): hide dragged pdf page at the start so it doesn't teleport
2023-12-25 22:27:30 +00:00
Anthony Stirling
8938e86223 Merge branch 'main' into main 2023-12-25 22:24:30 +00:00
Anthony Stirling
c1a39e53dc Merge pull request #559 from DimK10/main
Fixes #324 issue
2023-12-25 21:47:09 +00:00
dkaitantzidis
cf3693186a Fixes headers issue in merge pdfs. 2023-12-25 23:27:08 +02:00
Anthony Stirling
0fb0cb8bca apply local 2023-12-25 20:51:32 +00:00
dkaitantzidis
fb18d0d04d WIP: Fixes issue - needs refactor 2023-12-25 22:36:08 +02:00
sbplat
779d9028fe fix(multitool): hide dragged pdf page at the start so it doesn't teleport 2023-12-25 15:34:16 -05:00
Anthony Stirling
f2b701e3e3 todos 2023-12-25 18:52:11 +00:00
Anthony Stirling
a138d5f5a9 imports 2023-12-25 16:16:50 +00:00
Anthony Stirling
6276f028ac validate operations 2023-12-25 16:15:42 +00:00
Anthony Stirling
b962e867d8 log remove 2023-12-25 15:17:06 +00:00
Anthony Stirling
a286a92ede cleanups 2023-12-25 15:15:46 +00:00
Anthony Stirling
7fb8f5ed28 create logs dir 2023-12-25 15:03:45 +00:00
Anthony Stirling
03d3235e1d Merge remote-tracking branch 'origin/main' into test 2023-12-25 13:26:13 +00:00
Anthony Stirling
d23551857c deps 2023-12-25 13:00:44 +00:00
Anthony Stirling
dd9dd72f35 Role stuff 2023-12-25 12:58:49 +00:00
Anthony Stirling
9652f59ae9 Merge pull request #555 from sbplat/main
feat: merge pdf into multiple frames if the format is TIFF
2023-12-25 10:14:23 +00:00
sbplat
3469beb5b3 feat: merge pdf into multiple frames if the format is TIFF instead of a single big image 2023-12-24 22:52:39 -05:00
Anthony Stirling
690720f4e3 test interface 2023-12-25 01:25:17 +00:00
Anthony Stirling
491be75e1f Merge pull request #554 from sbplat/main
feat: make multiple images the default setting for PDF to Image
2023-12-24 22:29:07 +00:00
sbplat
a868b2c649 feat: make multiple images the default setting for PDF to Image 2023-12-24 16:55:11 -05:00
Anthony Stirling
0b49993d80 Merge pull request #553 from sbplat/main
fix!: map BMP and TIFF extensions to the proper MIME types
2023-12-24 21:50:17 +00:00
sbplat
995a926e35 fix!: map BMP and TIFF extensions to the proper MIME types
Remove the WBMP image format from PDF to Image
2023-12-24 15:27:16 -05:00
Anthony Stirling
914dd0a21a Merge pull request #552 from sbplat/main
fix: use JPEGFactory for jpeg
2023-12-24 18:02:12 +00:00
Anthony Stirling
d9b5d08b06 import clean 2023-12-24 17:56:31 +00:00
sbplat
344d1163ff Merge branch 'Frooodle:main' into main 2023-12-24 12:53:29 -05:00
sbplat
3f50979d3e fix: use JPEGFactory for jpeg 2023-12-24 12:52:55 -05:00
Anthony Stirling
c681f48459 Merge pull request #549 from sbplat/main
feat: add support for svg+webp images to convert to pdf
2023-12-24 17:18:37 +00:00
Anthony Stirling
2f5d7ed712 internal API plus brute force security 2023-12-24 17:12:32 +00:00
sbplat
1efefcfcb8 feat: add support for svg+webp images to convert to pdf 2023-12-23 20:27:04 -05:00
Anthony Stirling
909c9ed4d9 Merge pull request #548 from sbplat/main
Add remove annotations
2023-12-23 19:07:20 +00:00
sbplat
116b3535ee Update messages_en_GB.properties 2023-12-23 13:49:50 -05:00
sbplat
b7d6107a2d feat: add remove annotations 2023-12-23 13:47:21 -05:00
Anthony Stirling
120b017b1a serial 2023-12-23 16:26:09 +00:00
Anthony Stirling
24568f4a42 Merge pull request #547 from simovics/main
Adding Hungarian language support to Stirling-PDF
2023-12-23 16:00:54 +00:00
Anthony Stirling
03450454c5 pipeline 2023-12-23 15:47:18 +00:00
simovics
7e982e125d Create hu.svg
Adding Hungarian flag icon to the set.
2023-12-23 14:46:42 +01:00
simovics
e725451530 Update languages.html
Fixing indentation.
2023-12-23 14:21:51 +01:00
simovics
d7d6bc8108 Update languages.html
Adding Hungarian language reference to the navbar.
2023-12-23 14:19:07 +01:00
simovics
6d66ac0a8b Create messages_hu_HU.properties
Hungarian translation for Stirling-PDF.
2023-12-23 14:15:10 +01:00
Anthony Stirling
93f12d1313 pipeline changes 2023-12-23 12:29:32 +00:00
Anthony Stirling
eab9e3cffc changes pipeline 2023-12-20 19:29:13 +00:00
Anthony Stirling
d74c25e678 Merge pull request #542 from NeilJared/main
Update messages_es_ES.properties
2023-12-19 21:17:13 +00:00
NeilJared
c729b7201f Merge branch 'main' into main 2023-12-19 19:44:22 +01:00
NeilJared
beab9932d7 Update messages_es_ES.properties
Updated es_ES translation
2023-12-19 19:41:11 +01:00
Anthony Stirling
65fcf29fd5 Merge pull request #537 from Frooodle/dependabot/gradle/io.swagger.swaggerhub-1.3.2
Bump io.swagger.swaggerhub from 1.2.0 to 1.3.2
2023-12-19 18:34:24 +00:00
Anthony Stirling
73007239ee Merge branch 'main' into dependabot/gradle/io.swagger.swaggerhub-1.3.2 2023-12-19 18:32:46 +00:00
Anthony Stirling
816d874ac4 Merge pull request #541 from dhenry437/fix/bootstrap-icons
Fix for bootstrap icons
2023-12-19 13:59:05 +00:00
Dan Henry
b66f86f7cc add missing bootstrap icons link in head 2023-12-19 22:51:00 +11:00
Dan Henry
168ef747de add up to date minified bootstrap icons 2023-12-19 22:50:46 +11:00
dependabot[bot]
ad047ab012 Bump io.swagger.swaggerhub from 1.2.0 to 1.3.2
Bumps io.swagger.swaggerhub from 1.2.0 to 1.3.2.

---
updated-dependencies:
- dependency-name: io.swagger.swaggerhub
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 22:45:51 +00:00
Anthony Stirling
1ea3fb209b ARG VERSION_TAG 2023-12-18 16:39:26 +00:00
Anthony Stirling
875d9da36b Update Dockerfile 2023-12-18 15:41:05 +00:00
Anthony Stirling
b21d2ecbd1 Update push-docker.yml 2023-12-18 15:38:37 +00:00
Anthony Stirling
3bffc1da76 gradle changes 2023-12-18 14:58:06 +00:00
Anthony Stirling
631d3948bd fix for #531 plus seperated out some things 2023-12-18 14:52:18 +00:00
Anthony Stirling
5774a22b64 possible fixes for overlay 2023-12-17 12:35:50 +00:00
ant
39345bb6bb Merge branch 'main' of git@github.com:Frooodle/Stirling-PDF.git into main 2023-12-17 12:31:24 +00:00
Anthony Stirling
57b483047e splitPdf sections cleanup 2023-12-17 12:23:11 +00:00
Anthony Stirling
0fb7633da8 Merge pull request #528 from NicolasFR/lang/FR_fr-updates
lang: update fr_FR
2023-12-17 11:34:09 +00:00
Nicolas
dae2f33772 lang: update fr_FR 2023-12-17 10:39:33 +01:00
Anthony Stirling
31ac877612 Update build.gradle 2023-12-16 19:56:56 +00:00
Anthony Stirling
79dcf99cce Clean imports and lang updates 2023-12-16 19:30:47 +00:00
Anthony Stirling
c28a40ffe8 Split by sections #506 2023-12-16 19:29:43 +00:00
Anthony Stirling
12dccab460 auth log #522 2023-12-16 18:18:00 +00:00
Anthony Stirling
0a26e2e6d6 new deps 2023-12-16 10:42:27 +00:00
Anthony Stirling
74f6cd63f4 other JS changes 2023-12-16 10:35:45 +00:00
Anthony Stirling
e8de5739fa Resolve has Update button to stay hidden if error 2023-12-16 10:26:35 +00:00
Anthony Stirling
1b2734d99c login enable and security stuff 2023-12-16 10:22:33 +00:00
Anthony Stirling
206cf40cb5 Update Dockerfile-ultra-lite
login
2023-12-16 10:11:34 +00:00
Anthony Stirling
78473e96fd Update Dockerfile-lite
fix for #526 Support for login in lite
2023-12-16 10:08:09 +00:00
Anthony Stirling
b7d6ac2cc3 extra fonts, ocr display full names, overlay fixes 2023-12-12 23:25:56 +00:00
Anthony Stirling
4068d9530f svg 2023-12-11 23:24:13 +00:00
Anthony Stirling
8a331956c2 Merge branch 'main' of git@github.com:Frooodle/Stirling-PDF.git into main 2023-12-11 23:20:43 +00:00
Anthony Stirling
1d3e018a56 init overlay and auto split 2023-12-11 23:20:31 +00:00
Anthony Stirling
3602034938 Merge pull request #520 from NicolasFR/patch-1
Update messages_fr_FR.properties
2023-12-11 18:39:05 +00:00
NicolasFR
eb4e2d5fca Update messages_fr_FR.properties 2023-12-11 17:56:38 +01:00
Anthony Stirling
b6671939e5 Merge pull request #517 from NeilJared/es_ES
Update messages_es_ES.properties
2023-12-11 12:12:17 +00:00
Anthony Stirling
41d09e40a1 Merge branch 'main' into es_ES 2023-12-11 12:11:10 +00:00
Anthony Stirling
9b0dba7f65 Update account.html
#515 fix
2023-12-11 12:10:10 +00:00
NeilJared
ac0dc8b5c7 Update messages_es_ES.properties
Updated es_ES translation
2023-12-11 13:06:59 +01:00
Anthony Stirling
723216c693 Merge pull request #516 from Frooodle/Frooodle-patch-1
Update build.gradle
2023-12-11 11:02:45 +00:00
Anthony Stirling
46f9a5057f Update build.gradle 2023-12-11 11:01:48 +00:00
Anthony Stirling
8a2633ca93 Update build.gradle 2023-12-11 10:59:05 +00:00
Anthony Stirling
a03470d2de Update Dockerfile 2023-12-11 10:09:28 +00:00
Anthony Stirling
ef7c98e5cb Merge pull request #514 from Frooodle/securityStuff
Security stuff
2023-12-11 10:00:57 +00:00
Anthony Stirling
c9cd1331d2 Merge branch 'main' into securityStuff 2023-12-11 09:58:09 +00:00
Anthony Stirling
ddc14517b8 Merge branch 'securityStuff' of git@github.com:Frooodle/Stirling-PDF.git into securityStuff 2023-12-11 09:57:37 +00:00
Anthony Stirling
578aecf977 WeasyPrint 2023-12-11 09:57:28 +00:00
Anthony Stirling
b1ca938053 Merge pull request #513 from Frooodle/securityStuff
fix
2023-12-11 09:35:23 +00:00
Anthony Stirling
298fe349c1 Merge branch 'main' into securityStuff 2023-12-11 09:33:20 +00:00
Anthony Stirling
f4364a3f33 bump 2023-12-11 09:33:05 +00:00
Anthony Stirling
e0f068bc9d test 2023-12-11 09:32:36 +00:00
Anthony Stirling
d7f8219b80 Update view-pdf.html 2023-12-10 23:22:25 +00:00
Anthony Stirling
87bc0fc975 Merge pull request #509 from Frooodle/securityStuff
Docker file security updates and minor fixes to things
2023-12-10 23:10:04 +00:00
Anthony Stirling
9f21ce96de Merge branch 'main' into securityStuff 2023-12-10 23:08:34 +00:00
Anthony Stirling
1f29033f17 docker changes 2023-12-10 23:06:35 +00:00
Anthony Stirling
59c7978330 docker and ocr updates 2023-12-10 22:02:30 +00:00
Anthony Stirling
8b55ffff96 changes 2023-12-10 16:33:44 +00:00
Anthony Stirling
a94808fd19 dark mode fixes 2023-12-10 15:29:12 +00:00
Anthony Stirling
7b2ffcff01 Merge pull request #504 from albanobattistella/patch-1
Update messages_it_IT.properties
2023-12-10 14:11:17 +00:00
Anthony Stirling
28a9daff62 init 2023-12-10 14:09:28 +00:00
albanobattistella
435753f50b Update messages_it_IT.properties 2023-12-08 16:01:14 +01:00
Anthony Stirling
1e6f288d72 Merge pull request #501 from alexdraconian/lang-ko
Add/improve Korean translation
2023-12-07 17:39:28 +00:00
Anthony Stirling
6d3fece5a6 Merge branch 'main' into lang-ko 2023-12-07 16:21:01 +00:00
alexdraconian
db926c50d8 Add/improve Korean translation 2023-12-07 21:47:20 +09:00
Anthony Stirling
dd9333f42e Merge pull request #491 from digitalindependent/patch-1
Typo fixed in HowToUseOCR.md
2023-12-02 23:39:42 +00:00
digitalindependent
3fa5acc51c Typo fixed in HowToUseOCR.md
ITS => IT'S
2023-12-02 22:34:43 +01:00
Anthony Stirling
15fa3df424 Merge pull request #475 from danielr1996/main
ci: add helm package/push to Jenkinsfile
2023-11-30 20:08:31 +00:00
Anthony Stirling
06c4ec95d5 Merge branch 'main' into main 2023-11-24 14:36:19 +00:00
Anthony Stirling
1a6afc1582 Merge pull request #470 from trytomakeyouprivate/main
added Podman and Distrobox notes
2023-11-24 13:35:10 +00:00
trytomakeyouprivate
ad2e1e4a18 Merge branch 'Frooodle:main' into main 2023-11-24 12:56:02 +00:00
Anthony Stirling
a1d0dcff41 Merge pull request #479 from Ludy87/german-translation
update language german
2023-11-17 15:16:57 +00:00
Ludy87
08da0f5c56 update language german 2023-11-17 16:07:02 +01:00
Daniel Richter
0b666674f7 fix(helm): move ci build to github actions
Signed-off-by: Daniel Richter <danielrichter@posteo.de>
2023-11-16 23:04:32 +01:00
Daniel Richter
d3fe467f6f ci: add helm package/push to Jenkinsfile
Signed-off-by: Daniel Richter <danielrichter@posteo.de>
2023-11-12 22:31:35 +01:00
trytomakeyouprivate
732fa0ec40 added Podman and Distrobox note 2023-11-07 11:49:11 +00:00
trytomakeyouprivate
7a7c978df2 added Podman
Podman is supposedly more Secure and used and distributed by Redhat and Fedora. It is CLI compatible with Docker
2023-11-07 11:45:42 +00:00
Anthony Stirling
9d052b310f Merge pull request #459 from Artem-ka-create/issue-372-pdfbox
Issue 372 pdfbox
2023-11-05 19:49:14 +00:00
Atrem Petrenko
8ff1a63276 Merge branch 'main' into issue-372-pdfbox 2023-11-05 14:49:04 +01:00
Anthony Stirling
ffd413ce7f Merge pull request #464 from NeilJared/main
Update messages_es_ES.properties
2023-11-05 11:23:18 +00:00
NeilJared
f2607bd161 Update messages_es_ES.properties
Modified!
2023-11-05 11:59:15 +01:00
NeilJared
ba5f3e12d7 Update messages_es_ES.properties
Updated Spanish translation
2023-11-05 11:39:53 +01:00
Anthony Stirling
ddc48429b1 Merge pull request #403 from Pixee-Bot-Java/pixeebot/drip-2023-10-05-pixee-java/secure-random
Introduced protections against predictable RNG abuse
2023-11-03 00:58:11 +00:00
Anthony Stirling
b8b7adbaf9 Merge pull request #456 from omerbustun/main
Add Turkish language support
2023-11-03 00:52:20 +00:00
Anthony Stirling
4ae945d08a Merge branch 'main' into main 2023-11-03 00:51:12 +00:00
Anthony Stirling
12f5a5e6d0 Merge pull request #460 from sanjeevneo/main
Enhance navbar for dark mode support
2023-11-02 19:16:48 +00:00
sanjeevneo
f85a7cb04d Enhance navbar for dark mode support 2023-11-03 02:15:02 +11:00
Atrem Petrenko
2f6a885bb0 update language properties 2023-11-02 12:13:33 +01:00
Atrem Petrenko
c8ac1f7029 implementing extracting tables from pdf by pdfbox 2023-11-02 11:50:50 +01:00
Atrem Petrenko
d6afb07533 starting issue, implementing pdf-to-csv view 2023-10-31 18:58:40 +01:00
Zach Carroll
a55f9f0ec8 Merge branch 'main' into pixeebot/drip-2023-10-05-pixee-java/secure-random 2023-10-30 15:26:14 -04:00
Ömer Üstün
06401d875b Merge branch 'Frooodle:main' into main 2023-10-30 20:01:26 +03:00
Ömer Üstün
4a29fd4b73 Update README.md 2023-10-30 19:59:15 +03:00
Ömer Üstün
02c53b90b3 Update messages_tr_TR.properties 2023-10-30 19:58:04 +03:00
Ömer Üstün
6ca1d82188 Update messages_tr_TR.properties 2023-10-30 19:19:12 +03:00
Anthony Stirling
18c5f5bb2b Merge pull request #455 from sanjeevneo/main
Optimize Dark Mode Toggle for Additional UI Elements
2023-10-30 10:34:27 +00:00
Anthony Stirling
33d21a7a85 Merge pull request #453 from tkymmm/main
Update messages_ja_JP.properties
2023-10-30 10:34:04 +00:00
Neo
c48c3e8897 Dark Mode Improvements 2023-10-30 18:29:55 +11:00
tkymmm
67f34016ce Update messages_ja_JP.properties 2023-10-30 09:21:02 +09:00
Ömer Üstün
c1434df259 Update messages_tr_TR.properties 2023-10-29 22:55:06 +03:00
Ömer Üstün
dd0eaf9182 Update messages_tr_TR.properties 2023-10-29 22:55:06 +03:00
Ömer Üstün
cfe50bcd81 Update messages_tr_TR.properties 2023-10-29 22:55:06 +03:00
omerbustun
a75bbff7cf Update messages_tr_TR.properties 2023-10-29 22:55:06 +03:00
omerbustun
2e9d88da0e Add Turkish option to navbar language selector
- Updated the navbar to include the Turkish language option.
- Added the Turkish flag SVG to the assets folder.
- Translated a portion of the .properties file to support Turkish.
2023-10-29 22:55:06 +03:00
Anthony Stirling
124c7801c5 Merge pull request #440 from quyleanh/patch-1
Update README.md to correct Endpoint-groups.md link
2023-10-29 15:59:24 +00:00
Anthony Stirling
8490613ada Merge pull request #450 from maxi322/main
Add german translation for View PDF
2023-10-29 15:59:12 +00:00
Anthony Stirling
80553ce95a Merge branch 'main' into patch-1 2023-10-28 15:29:22 +01:00
maxi322
d9206bfd2a Add german translation for View PDF 2023-10-28 15:31:44 +02:00
Anthony Stirling
7aae688db2 add searchbar translation option 2023-10-28 13:30:48 +01:00
Anthony Stirling
347b4cfa85 Update build.gradle 2023-10-28 12:14:11 +01:00
Anthony Stirling
f2eebcc396 extra lang 2023-10-28 12:12:54 +01:00
Anthony Stirling
19c26f0552 lang update 2023-10-28 12:06:23 +01:00
Anthony Stirling
d532db91f9 fixes for #438 and #423 2023-10-28 10:40:26 +01:00
Anthony Stirling
bd0bf404f5 Merge pull request #445 from DimK10/Feature-request-pdf-reader
Adds navbar logo to pdf viewer
2023-10-27 18:28:33 +01:00
Dimitris Kaitantzidis
e51a9c209a Merge branch 'main' into Feature-request-pdf-reader 2023-10-27 20:11:14 +03:00
Dimitrios Kaitantzidis
6bf172fb25 Adds navbar logo to pdf viewer 2023-10-27 20:08:13 +03:00
Anthony Stirling
a1e93e0f5d Update .gitattributes 2023-10-25 22:07:05 +01:00
Anthony Stirling
6392f6ec12 Merge pull request #442 from joleaf/main
Fix help text in addPageNumbers.customNumberDesc
2023-10-25 10:20:33 +01:00
joleaf
fbdff5c97f Update messages_it_IT.properties - fix helptext addPageNumbers.customNumberDesc 2023-10-25 10:55:13 +02:00
joleaf
2ecc4ed080 Update messages_es_ES.properties - Fix helptext addPageNumbers.customNumberDesc 2023-10-25 10:54:21 +02:00
joleaf
3318cb96b2 Update messages_de_DE.properties - fix helptext addPageNumbers.customNumberDesc 2023-10-25 10:53:10 +02:00
Quy Le Anh
6be0a1fb05 Update README.md to correct Endpoint-groups.md link 2023-10-24 17:11:48 +09:00
Anthony Stirling
ab1297aee0 Version bump and readme change 2023-10-22 23:14:18 +01:00
Anthony Stirling
25a0cb7681 Merge pull request #439 from DimK10/Feature-request-pdf-reader
Feature request pdf reader
2023-10-22 23:02:14 +01:00
Dimitrios Kaitantzidis
116b034878 Adds support for greek language. 2023-10-23 00:56:53 +03:00
Dimitrios Kaitantzidis
038de2e264 Adds ignore for .idea folder entirely 2023-10-23 00:43:43 +03:00
Dimitrios Kaitantzidis
7e51cf8c5a Removes .idea files and updates README.md. 2023-10-23 00:40:03 +03:00
Dimitrios Kaitantzidis
a1eadba769 Fixes .idea ignored files. 2023-10-23 00:27:36 +03:00
Dimitrios Kaitantzidis
3145f5fdd0 Feature ready. 2023-10-23 00:12:13 +03:00
Dimitrios Kaitantzidis
8393dd4731 Deletes unnecessary files 2023-10-22 20:54:23 +03:00
Dimitrios Kaitantzidis
768877d969 Reader works correctly 2023-10-22 20:32:19 +03:00
Dimitrios Kaitantzidis
14a90f5e50 WIP: No errors but nothing is working 2023-10-22 20:16:59 +03:00
Dimitrios Kaitantzidis
99b0150e7a WIP: Adds Drap and drop 2023-10-21 11:26:58 +03:00
Anthony Stirling
3be12c8988 Merge pull request #424 from DimK10/Bug-Multitool-Filename
Bug multitool filename
2023-10-15 17:37:46 +01:00
Dimitrios Kaitantzidis
89345c8d60 Removes commas in multiple dots with text. 2023-10-15 19:10:30 +03:00
Dimitrios Kaitantzidis
49f1f4e7c7 Fixes bug with unfinished filename extension (multiple dots problem) 2023-10-15 19:03:10 +03:00
Dimitrios Kaitantzidis
d0ce7db9ee Fixes bug with unfinished filename extension (file.p) 2023-10-15 18:35:39 +03:00
Dimitrios Kaitantzidis
53a0291cc2 Adds requested changes 2023-10-15 16:49:12 +03:00
Dimitrios Kaitantzidis
9a3bc839dd Merge remote-tracking branch 'origin/Bug-Multitool-Filename' into Bug-Multitool-Filename 2023-10-14 00:38:16 +03:00
Dimitrios Kaitantzidis
e519840bd6 Fixes issue with light theme support. 2023-10-14 00:37:52 +03:00
Dimitris Kaitantzidis
ed32a3ca33 Merge branch 'main' into Bug-Multitool-Filename 2023-10-14 00:06:36 +03:00
Dimitrios Kaitantzidis
369ac99a16 Fixes issue. 2023-10-14 00:03:08 +03:00
Anthony Stirling
39ac823b05 Merge pull request #308 from Frooodle/dependabot/gradle/org.springdoc-springdoc-openapi-starter-webmvc-ui-2.2.0
Bump org.springdoc:springdoc-openapi-starter-webmvc-ui from 2.1.0 to 2.2.0
2023-10-11 21:05:58 +01:00
Anthony Stirling
548ae4dba3 Merge branch 'main' into dependabot/gradle/org.springdoc-springdoc-openapi-starter-webmvc-ui-2.2.0 2023-10-11 21:04:36 +01:00
Anthony Stirling
f69d593649 Merge pull request #309 from Frooodle/dependabot/gradle/com.google.zxing-core-3.5.2
Bump com.google.zxing:core from 3.5.1 to 3.5.2
2023-10-11 21:04:27 +01:00
Anthony Stirling
423af5f077 Merge branch 'main' into dependabot/gradle/com.google.zxing-core-3.5.2 2023-10-11 15:40:21 +01:00
Anthony Stirling
76e5e1ad00 Merge pull request #311 from Frooodle/dependabot/gradle/io.spring.dependency-management-1.1.3
Bump io.spring.dependency-management from 1.1.2 to 1.1.3
2023-10-11 14:49:03 +01:00
Anthony Stirling
420caa4d8d Merge branch 'main' into dependabot/gradle/io.spring.dependency-management-1.1.3 2023-10-11 14:45:02 +01:00
Anthony Stirling
fdeeb68a6d Merge pull request #367 from Frooodle/dependabot/gradle/edu.sc.seis.launch4j-3.0.5
Bump edu.sc.seis.launch4j from 3.0.3 to 3.0.5
2023-10-11 14:44:48 +01:00
Anthony Stirling
9fe803a0b1 Merge branch 'main' into dependabot/gradle/edu.sc.seis.launch4j-3.0.5 2023-10-11 14:43:45 +01:00
Anthony Stirling
dd9ba90a03 Merge pull request #379 from Frooodle/dependabot/gradle/org.springframework.boot-spring-boot-starter-test-3.1.4
Bump org.springframework.boot:spring-boot-starter-test from 3.1.2 to 3.1.4
2023-10-11 14:43:41 +01:00
Anthony Stirling
2bc739316a Merge branch 'main' into dependabot/gradle/org.springframework.boot-spring-boot-starter-test-3.1.4 2023-10-11 14:42:04 +01:00
Dimitrios Kaitantzidis
74da8c340d Adds support for disabled filename input if not pdf is loaded. Need to disable the input if all pages are deleted. 2023-10-10 20:24:11 +03:00
Anthony Stirling
766cb4410b Update pull_request_template.md 2023-10-08 19:07:08 +01:00
Anthony Stirling
78fe6d6ea8 Create pull_request_template.md 2023-10-08 19:06:08 +01:00
Anthony Stirling
6b99decb56 Create pull_request_template.md 2023-10-08 19:04:32 +01:00
Dimitrios Kaitantzidis
323745e61f Change in name works. 2023-10-08 19:57:19 +03:00
Anthony Stirling
22c19670e9 Merge pull request #415 from DimK10/Feature_Request-Bigger_text_input
Feature request bigger text input
2023-10-08 17:06:32 +01:00
Dimitrios Kaitantzidis
a1b7aaddb8 Changes filename using js, but the old filename persists in download 2023-10-08 18:59:43 +03:00
Dimitris Kaitantzidis
cfba9681c4 Merge branch 'main' into Feature_Request-Bigger_text_input 2023-10-08 17:13:43 +03:00
Dimitrios Kaitantzidis
a019b8b5ca Deletes console.log statements and commented out code. 2023-10-08 17:02:03 +03:00
Dimitrios Kaitantzidis
bd9b267562 Fixes minor typos 2023-10-08 16:04:35 +03:00
Dimitrios Kaitantzidis
b0f8f56650 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. 2023-10-08 15:58:23 +03:00
Dimitrios Kaitantzidis
a71e813e82 WIP: Makes font smaller but test is shown as whole and in multiline 2023-10-08 15:51:40 +03:00
Anthony Stirling
75e7665d6e Merge pull request #353 from demonisius/ru_translation_update
Update messages_ru_RU.properties
2023-10-08 00:09:33 +01:00
Anthony Stirling
12293f5297 Merge branch 'main' into ru_translation_update 2023-10-08 00:08:27 +01:00
Anthony Stirling
4899ee0bee Merge pull request #409 from woodchen-ink/patch-1
Update messages_zh_CN.properties
2023-10-08 00:06:40 +01:00
Anthony Stirling
563c17c84e Merge branch 'main' into patch-1 2023-10-08 00:05:36 +01:00
Anthony Stirling
d94eca4ee7 blank == null 2023-10-07 23:35:28 +01:00
Anthony Stirling
f4a01884bd test empty = null for settings 2023-10-07 23:23:56 +01:00
Anthony Stirling
105d7f12ac Merge pull request #412 from Craftplorer/patch-1
Update messages_de_DE.properties
2023-10-07 21:39:35 +01:00
Jonas Meyer
30c115a7de Update messages_de_DE.properties 2023-10-07 22:10:35 +02:00
Dimitrios Kaitantzidis
88a90f22a3 WIP: Adds textarea and multi line support for pdf sign. 2023-10-07 22:54:11 +03:00
Anthony Stirling
c72c712c1b Merge pull request #411 from DimK10/greek_language
Adds Greek language support
2023-10-07 19:06:16 +01:00
Dimitrios Kaitantzidis
7205801e76 Fixes some typos 2023-10-07 20:46:58 +03:00
Dimitrios Kaitantzidis
64f4f54b9d Adds greek language support 2023-10-07 20:39:30 +03:00
Dimitrios Kaitantzidis
0287d88895 WIP: Adds greek language support 2023-10-07 20:25:39 +03:00
Dimitrios Kaitantzidis
cdc075b27c WIP: Adds greek language support 2023-10-07 18:56:43 +03:00
Dimitrios Kaitantzidis
604d9827c5 WIP: Adds greek language support 2023-10-07 18:39:37 +03:00
wood chen
bdeb6bf188 Update messages_zh_CN.properties 2023-10-07 22:58:34 +08:00
Dimitrios Kaitantzidis
19e122be99 WIP: Adds greek language support 2023-10-07 17:53:03 +03:00
Anthony Stirling
f3ddf18a23 Update README.md 2023-10-05 23:53:40 +01:00
pixeebot[bot]
db488b39bb Introduced protections against predictable RNG abuse 2023-10-05 20:29:56 +00:00
Anthony Stirling
51f863e1e4 swagger docs fix #401 2023-10-05 21:20:05 +01:00
Anthony Stirling
0a9381d538 Update pdf-to-img.html 2023-10-05 18:45:33 +01:00
dependabot[bot]
a9514b54eb 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] <support@github.com>
2023-10-03 21:58:50 +00:00
dependabot[bot]
d647cb196f 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] <support@github.com>
2023-10-03 21:58:50 +00:00
Anthony Stirling
b69973f614 Split doc size fix #400 2023-10-03 22:58:15 +01:00
Anthony Stirling
fb9c42f4a1 Merge pull request #398 from deraw/update-fr-translations
Update messages_fr_FR.properties
2023-10-03 00:53:08 +01:00
Dylan Broussard
b873e3cdf8 Update messages_fr_FR.properties 2023-10-02 23:54:01 +02:00
Anthony Stirling
e9fc024332 Merge pull request #392 from nimdassdev/main
BG lang support
2023-10-01 15:17:27 +01:00
IT Creativity + Art Team
d4956fad8c bg lang flag
- bg lang flag
2023-10-01 17:05:42 +03:00
IT Creativity + Art Team
9d1dfe742e Update languages.html
Added BG lang support
2023-10-01 15:59:57 +03:00
IT Creativity + Art Team
e32c092af8 BG lang support
Hello Team,

This is the Bulgarian Translation for Stirling-PDF.

Thank you.
2023-10-01 15:56:22 +03:00
Anthony Stirling
18a2664b54 Merge pull request #373 from jr-instantsystem/features/335_helm_chart
Add helm chart
2023-09-30 10:29:23 +01:00
Anthony Stirling
954e46c5ec Merge branch 'main' into features/335_helm_chart 2023-09-30 10:27:38 +01:00
Anthony Stirling
e0f306d3f7 updates 2023-09-29 23:58:37 +01:00
Anthony Stirling
09db6618d6 Merge pull request #390 from JerronAB/main
Removed numpy library from detect-blank-pages.py
2023-09-29 21:24:29 +01:00
JerronAB
c5ea254945 Removed numpy library from blank page py script 2023-09-29 16:00:22 -04:00
Anthony Stirling
1fc1ecbaa6 Update remove-password.html
allow removal of encryption without password #383
2023-09-28 12:35:44 -05:00
Anthony Stirling
bc4640c3f0 Merge branch 'main' into features/335_helm_chart 2023-09-27 10:51:33 -05:00
Anthony Stirling
1e2eb9b07a additional fix to #364 2023-09-24 21:21:01 +01:00
Anthony Stirling
ece00956d9 fix for config #376 2023-09-24 21:09:34 +01:00
Anthony Stirling
af5bbd8838 Merge pull request #375 from slikie/patch-2
Docs Fix - Ensure proper context path format
2023-09-20 09:21:07 -05:00
slikie
3a8f2495ea fix: Docs - Ensure proper context path format 2023-09-20 22:12:47 +08:00
slikie
993f5e5097 Update README.md
spelling
2023-09-20 22:08:31 +08:00
Julien Rouvier
1f99c26e78 Add helm chart 2023-09-20 10:07:11 +02:00
Anthony Stirling
05ebf3a6b4 Merge pull request #366 from Frooodle/image
image to pdf change and cert atempt fix
2023-09-17 21:21:19 +01:00
Anthony Stirling
1be3046d26 version bump 2023-09-17 21:17:47 +01:00
Anthony Stirling
5b3858ba29 image changes and cert fix 2023-09-17 21:17:13 +01:00
Anthony Stirling
a1f388e524 Merge pull request #365 from NeilJared/main
Update messages_es_ES.properties
2023-09-17 08:04:52 +01:00
NeilJared
cf14ff1540 Update messages_es_ES.properties
Updated es_ES translation including changes of the latest version
2023-09-16 23:39:12 +02:00
Anthony Stirling
a0ac2bc02a Update build.gradle 2023-09-14 21:25:18 +01:00
Anthony Stirling
ed82c492ab Update build.gradle 2023-09-14 21:08:26 +01:00
Anthony Stirling
fc2d71d120 Update Dockerfile remove PUID 2023-09-14 21:07:39 +01:00
Anthony Stirling
e5a7a0631b Merge pull request #360 from Frooodle/itextRemoval
Itext removal password enhancement and others
2023-09-14 14:36:10 +01:00
Anthony Stirling
315cba07f0 Merge branch 'main' into itextRemoval 2023-09-14 14:34:14 +01:00
Anthony Stirling
cd5bd92a41 docs 2023-09-14 14:30:39 +01:00
Anthony Stirling
10126ce979 readme 2023-09-14 13:35:33 +01:00
Anthony Stirling
f6c4f08254 docs 2023-09-14 13:32:49 +01:00
Anthony Stirling
fc4feb2096 lang 2023-09-14 11:33:02 +01:00
Anthony Stirling
82b641458f fixes 2023-09-13 00:46:30 +01:00
Anthony Stirling
2c0fb33548 slow rework testing, still on multipage 2023-09-12 00:42:22 +01:00
Anthony Stirling
24e665bfd5 cleanup and defaults 2023-09-11 23:42:18 +01:00
Anthony Stirling
1404e33386 Merge branch 'itextRemoval' of git@github.com:Frooodle/Stirling-PDF.git
into itextRemoval
2023-09-11 23:21:05 +01:00
Anthony Stirling
0b1fd61188 api /api/v1/ 2023-09-11 23:19:50 +01:00
Anthony Stirling
80b4c67e35 super call 2023-09-10 09:24:20 +01:00
Anthony Stirling
1f4aae9249 finishing forms 2023-09-10 01:10:24 +01:00
Anthony Stirling
145e8006f0 metadata 2023-09-09 18:51:43 +01:00
Anthony Stirling
872f562aad misc beginings 2023-09-09 18:21:55 +01:00
Anthony Stirling
db70d67180 Merge branch 'itextRemoval' of git@github.com:Frooodle/Stirling-PDF.git into itextRemoval 2023-09-09 00:25:47 +01:00
Anthony Stirling
b1fd798a5c init 2023-09-09 00:25:27 +01:00
Дмитрий
42907ade21 Update messages_ru_RU.properties
Added translation
2023-09-08 11:34:03 +03:00
dependabot[bot]
b3bc0b4e5a Bump org.springdoc:springdoc-openapi-starter-webmvc-ui
Bumps [org.springdoc:springdoc-openapi-starter-webmvc-ui](https://github.com/springdoc/springdoc-openapi) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/springdoc/springdoc-openapi/releases)
- [Changelog](https://github.com/springdoc/springdoc-openapi/blob/main/CHANGELOG.md)
- [Commits](https://github.com/springdoc/springdoc-openapi/compare/v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: org.springdoc:springdoc-openapi-starter-webmvc-ui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-06 21:24:15 +00:00
dependabot[bot]
12e24f3ec1 Bump com.google.zxing:core from 3.5.1 to 3.5.2
Bumps [com.google.zxing:core](https://github.com/zxing/zxing) from 3.5.1 to 3.5.2.
- [Release notes](https://github.com/zxing/zxing/releases)
- [Changelog](https://github.com/zxing/zxing/blob/master/CHANGES)
- [Commits](https://github.com/zxing/zxing/compare/zxing-3.5.1...zxing-3.5.2)

---
updated-dependencies:
- dependency-name: com.google.zxing:core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-06 21:24:15 +00:00
Anthony Stirling
fefa8347da Merge pull request #342 from Frooodle/itextRemoval
Itext removal
2023-09-06 22:23:29 +01:00
Anthony Stirling
cd7ca09a3f Update settings.yml.template 2023-09-06 22:22:13 +01:00
Anthony Stirling
3960b2d6f9 Merge branch 'main' into itextRemoval 2023-09-06 22:10:41 +01:00
Anthony Stirling
264969e80c Merge branch 'itextRemoval' of git@github.com:Frooodle/Stirling-PDF.git into itextRemoval 2023-09-06 21:58:36 +01:00
Anthony Stirling
4e2911f648 custom font fix 2023-09-06 21:58:28 +01:00
Anthony Stirling
42610b2645 Merge branch 'main' into dependabot/gradle/io.spring.dependency-management-1.1.3 2023-09-06 18:38:53 +01:00
Anthony Stirling
7b07a706e1 Merge pull request #350 from Ale1x/main
Update content in messages_it.properties file
2023-09-06 16:35:49 +01:00
Anthony Stirling
8fef9dc8a8 Merge branch 'main' into itextRemoval 2023-09-06 15:41:39 +01:00
Anthony Stirling
83936bf4c8 security fix 2023-09-06 15:41:15 +01:00
Alessandro Passarelli
65f89e283e Fixed Mistakes 2023-09-06 15:57:43 +02:00
Alessandro Passarelli
1aa65bd3d1 Update content in messages_it.properties file
This commit includes changes to the content of the messages_it.properties file. Modifications were made to enhance the clarity and accuracy of the messages for the Italian localization.
2023-09-06 15:45:20 +02:00
Anthony Stirling
0547ec3c49 Merge pull request #349 from rubenixnagios/rubenixnagios-patch-2
Update messages_ca_CA.properties
2023-09-06 12:32:49 +01:00
Rubens
7e1cbe572d Update messages_ca_CA.properties
updated catalan missing translations
2023-09-06 13:13:20 +02:00
Anthony Stirling
7a98f30d05 Merge pull request #347 from darddan/main
Add side stitch booklet rearrangement
2023-09-05 21:44:11 +01:00
Anthony Stirling
c565bd4400 test 2023-09-05 20:58:18 +01:00
Dardan
d039c8e62e Use tabs instead of spaces 2023-09-05 20:06:18 +02:00
Dardan
da7f0561cb Add side stitch booklet rearrangement 2023-09-05 19:48:16 +02:00
Anthony Stirling
00210b75c7 Merge pull request #344 from c-jaenicke/main
translate text to german
2023-09-05 11:09:44 +01:00
c-jaenicke
3fe8973ae6 Merge branch 'main' into main 2023-09-05 11:36:36 +02:00
Anthony Stirling
87c4b42683 Merge pull request #346 from tkymmm/tkymmm-patch-1
Update messages_ja_JP.properties
2023-09-05 09:42:00 +01:00
tkymmm
0901eaac45 Update messages_ja_JP.properties
Japanese translation of new features.
2023-09-05 14:58:31 +09:00
Anthony Stirling
c7c81a7243 security 2023-09-04 18:42:22 +01:00
Anthony Stirling
ac019ac196 Merge remote-tracking branch 'origin/main' into itextRemoval 2023-09-04 18:30:30 +01:00
Anthony Stirling
b12c1305ea Merge pull request #345 from ikerib/basque_locale
[Locale] [Basque] Add new strings
2023-09-04 18:00:51 +01:00
ikerib
1876c2afae Add new strings 2023-09-04 17:58:03 +02:00
c-jaenicke
4575375ea9 fix line 1 comment 2023-09-04 12:31:56 +02:00
c-jaenicke
aac7836dce spellchecking and last translation 2023-09-04 12:16:42 +02:00
c-jaenicke
df5de2d60d make format consistent 2023-09-04 11:47:18 +02:00
c-jaenicke
b026283ef2 translate text to german 2023-09-04 11:45:00 +02:00
c-jaenicke
548e5d108c translate text to german 2023-09-04 11:32:15 +02:00
c-jaenicke
4d31152a02 translate text to german 2023-09-04 11:08:05 +02:00
Anthony Stirling
fd08513212 dipslay stuf 2023-09-04 00:12:27 +01:00
Anthony Stirling
3175ac16d1 Merge pull request #343 from deraw/update-fr-translations
Update messages_fr_FR.properties
2023-09-04 00:00:30 +01:00
Dylan Broussard
0cb5a6c7ad Update messages_fr_FR.properties 2023-09-04 00:48:08 +02:00
Anthony Stirling
0bb2df135b testing messages 2023-09-03 19:44:16 +01:00
Anthony Stirling
adadf7428c Merge branch 'itextRemoval' of git@github.com:Frooodle/Stirling-PDF.git into itextRemoval 2023-09-03 16:41:00 +01:00
Anthony Stirling
146dd3c00b cred change start 2023-09-03 16:40:40 +01:00
Anthony Stirling
78bfa84afd Update README.md 2023-09-03 01:46:02 +01:00
Anthony Stirling
07512c7e2c Merge branch 'main' into itextRemoval 2023-09-03 01:24:49 +01:00
Anthony Stirling
9fe96bec40 import cleanup 2023-09-03 01:24:02 +01:00
Anthony Stirling
18172aa33a complete itext removal 2023-09-03 01:23:44 +01:00
Anthony Stirling
9ece6dacbd removal 2023-09-02 20:32:44 +01:00
Anthony Stirling
ef07963d79 itext removal 2023-09-02 20:21:55 +01:00
Anthony Stirling
862086eae5 itext removal fixes 2023-09-02 19:12:08 +01:00
Anthony Stirling
277aa0c7e1 Merge pull request #341 from shalak/tune_docs
Update settings docs
2023-09-02 12:13:15 +01:00
Shalak
fc52741435 Update settings docs 2023-09-02 12:30:27 +02:00
Anthony Stirling
a7cd6bfd2e itext changes 2023-09-02 00:05:50 +01:00
Anthony Stirling
648df7b3d3 Update README.md 2023-08-31 21:24:53 +01:00
Anthony Stirling
01f7f1f59c fix max size issue 2023-08-31 13:52:54 +01:00
Anthony Stirling
ff7f089f69 v tag fix 2023-08-30 22:55:33 +01:00
dependabot[bot]
4e06e8c0c0 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] <support@github.com>
2023-08-30 21:53:43 +00:00
Anthony Stirling
ca5ce905c7 version bump 2023-08-30 22:52:53 +01:00
Anthony Stirling
0fc29de02c redact allow colors, bug fixes 2023-08-30 22:52:38 +01:00
Anthony Stirling
8509a16d6e fix init for multi downloads 2023-08-30 21:40:29 +01:00
Anthony Stirling
0ed021357b change metadata fix 2023-08-30 18:52:31 +01:00
Anthony Stirling
58ad7a1e8a info permission fix 2023-08-30 00:12:40 +01:00
Anthony Stirling
622ee29dd8 Update README.md 2023-08-28 13:01:57 +01:00
Anthony Stirling
5cbb4c6223 Update README.md 2023-08-28 13:01:16 +01:00
Anthony Stirling
5299859385 Update README.md 2023-08-28 12:49:23 +01:00
Anthony Stirling
c57b308909 Merge pull request #327 from Frooodle/loginPage
Login page tweaks
2023-08-28 10:19:23 +01:00
Anthony Stirling
6409274f83 language stuff 2023-08-28 10:17:02 +01:00
Anthony Stirling
bc534c12a5 login page lang changes 2023-08-28 00:49:14 +01:00
Anthony Stirling
b58fd2022a docker version stuff 2023-08-27 19:58:20 +01:00
Anthony Stirling
d850d026ed fixes 2023-08-27 17:02:12 +01:00
Anthony Stirling
83627686d4 Update releaseArtifacts.yml 2023-08-27 14:41:02 +01:00
Anthony Stirling
4e7d01c72c Update releaseArtifacts.yml 2023-08-27 13:52:26 +01:00
Anthony Stirling
0f8ab20db7 Merge pull request #325 from Frooodle/testversions
test dynamic security
2023-08-27 13:47:19 +01:00
Anthony Stirling
88cc90786d testing github actions 2023-08-27 13:45:58 +01:00
Anthony Stirling
fb66717b43 docker file testing 2023-08-27 13:45:37 +01:00
Anthony Stirling
1d60433fcf test 2023-08-27 11:59:08 +01:00
Anthony Stirling
0f3df6e92b cleanup imports 2023-08-27 00:39:22 +01:00
Anthony Stirling
ca7c63c7d7 name changes 2023-08-27 00:38:17 +01:00
Anthony Stirling
135f9611df hometext fix 2023-08-26 23:45:43 +01:00
Anthony Stirling
cfaaeebd4a test 2023-08-26 23:33:35 +01:00
Anthony Stirling
09a0779180 Merge pull request #322 from Frooodle/bootstrap5_test
Bootstrap5
2023-08-26 22:35:59 +01:00
Anthony Stirling
7f7d09bc85 Update README.md 2023-08-26 22:35:10 +01:00
Anthony Stirling
0c454a08dc rename to settins.yml 2023-08-26 22:33:23 +01:00
Anthony Stirling
d749b63549 configs and app setup stuff 2023-08-26 17:30:49 +01:00
Anthony Stirling
2053a6950d config template 2023-08-26 12:27:52 +01:00
Anthony Stirling
41bd801e0d redact stuff, login page, lang and remember me 2023-08-25 23:39:18 +01:00
Anthony Stirling
cd0e1a3962 redact 2023-08-24 23:23:25 +01:00
Anthony Stirling
7c2f482b3b minor changes 2023-08-22 23:44:38 +01:00
Anthony Stirling
7741d60afd bootstrap 5 2023-08-22 23:03:21 +01:00
Anthony Stirling
8aac0c0327 bs5 more 2023-08-22 21:19:18 +01:00
Anthony Stirling
7c26c56210 test 2023-08-20 21:57:19 +01:00
Anthony Stirling
e88a780efe lang 2023-08-19 17:00:34 +01:00
Anthony Stirling
363fb5dc02 Merge branch 'main' of git@github.com:Frooodle/Stirling-PDF.git into main 2023-08-19 16:59:52 +01:00
Anthony Stirling
39a187b6da darkmode fix for account and pagenumber support filename 2023-08-19 16:59:34 +01:00
Anthony Stirling
b4cc34a522 Merge pull request #321 from appel/main
Dutch translation
2023-08-19 14:41:06 +01:00
appel
af94ef3d49 Dutch translation 2023-08-19 09:25:28 -04:00
Anthony Stirling
505855a53c Fix password updation 2023-08-19 12:50:49 +01:00
Anthony Stirling
87ac245341 Update sanitize-pdf.html 2023-08-19 12:26:43 +01:00
Anthony Stirling
1670a09d04 Update SanitizeController.java 2023-08-19 11:58:18 +01:00
Anthony Stirling
620b954336 Merge pull request #307 from Frooodle/login
Login
2023-08-17 22:48:47 +01:00
Anthony Stirling
cfd51e9b84 Update build.gradle 2023-08-17 22:47:48 +01:00
Anthony Stirling
6c797f8216 fix readme 2023-08-17 22:45:59 +01:00
Anthony Stirling
40e208152a translations 2023-08-17 22:26:35 +01:00
Anthony Stirling
cf7bfa62ef Merge branch 'main' into login 2023-08-17 22:21:31 +01:00
Anthony Stirling
a1086b9a04 update todo 2023-08-17 22:21:14 +01:00
Anthony Stirling
9bc4bbd2c8 grammer 2023-08-17 22:20:50 +01:00
Anthony Stirling
73156012e9 security 2023-08-17 22:19:11 +01:00
Anthony Stirling
91cc3d77d4 readme stuff 2023-08-17 22:17:42 +01:00
Anthony Stirling
3fc55a9e9f translations 2023-08-17 22:03:43 +01:00
Anthony Stirling
b666aa3f26 merge stuff #318 2023-08-17 22:03:36 +01:00
Anthony Stirling
53e7dbe12f translates 2023-08-17 00:10:14 +01:00
Anthony Stirling
9d8ff6856b Merge pull request #316 from deraw/update-fr-translations
Update messages_fr_FR.properties
2023-08-15 08:26:28 +01:00
Dylan Broussard
3fb38376b0 Update messages_fr_FR.properties 2023-08-15 03:38:42 +02:00
Anthony Stirling
15c73d9dd3 Add files via upload 2023-08-15 00:40:22 +01:00
Anthony Stirling
86f71ffb93 change user and pass 2023-08-15 00:39:13 +01:00
Anthony Stirling
eb928d3369 Merge pull request #313 from deraw/deraw-fix-add-page-numbers
Fix title in add-page-numbers.html
2023-08-15 00:02:28 +01:00
Anthony Stirling
d7307665b3 Fix title #313 2023-08-15 00:01:19 +01:00
Dylan Broussard
2836f0ab5a Fix title in add-page-numbers.html
The key `autoCrop.title` was used instead of `addPageNumbers.title`.
2023-08-15 00:29:36 +02:00
Anthony Stirling
91b7f3980c Change account icons 2023-08-14 22:48:30 +01:00
Anthony Stirling
5053432c2d pdf to image 2023-08-14 21:43:39 +01:00
Anthony Stirling
563c612395 remove pbean 2023-08-14 21:42:31 +01:00
Anthony Stirling
95dced6455 Merge branch 'login' of git@github.com:Frooodle/Stirling-PDF.git into login 2023-08-14 21:42:25 +01:00
Anthony Stirling
989f0bbbfb caching 2023-08-14 21:41:42 +01:00
Anthony Stirling
e5eec28bfd Delete mydatabase.trace.db 2023-08-13 22:49:23 +01:00
Anthony Stirling
bfc402f307 Delete mydatabase.mv.db 2023-08-13 22:49:15 +01:00
Anthony Stirling
35a998b934 Login 2023-08-13 22:46:18 +01:00
Anthony Stirling
cadc8e499d IT WORKS almost 2023-08-13 18:19:15 +01:00
Anthony Stirling
7f7ea6da9f APi key stuff 2023-08-13 10:53:00 +01:00
Anthony Stirling
ab9a22d8e7 Add files via upload 2023-08-13 01:15:26 +01:00
Anthony Stirling
cd2728105e Add files via upload 2023-08-13 01:14:30 +01:00
Anthony Stirling
d75e84bdff Create InitialSetup.java 2023-08-13 01:14:14 +01:00
Anthony Stirling
e791fee38b security 2023-08-13 01:12:29 +01:00
Anthony Stirling
ad5f057733 Fix for #306 2023-08-12 19:53:14 +01:00
Anthony Stirling
6f325b5fdb init 2023-08-12 02:29:10 +01:00
Anthony Stirling
b73aeee18d Merge pull request #304 from adrielCarmoUFMS/adrielCarmoUFMS-patch-1-1
Update messages_pt_BR.properties
2023-08-11 16:25:14 +01:00
adrielCarmoUFMS
8a54035a9f Update messages_pt_BR.properties
Update messages_pt_BR.properties
2023-08-11 10:21:13 -04:00
adrielCarmoUFMS
af28e30e4c Update messages_pt_BR.properties
updating new properties for the pt-BR language
2023-08-11 09:23:04 -04:00
Anthony Stirling
492513306c Merge pull request #303 from adrielCarmoUFMS/main
update language pt-br
2023-08-10 21:45:27 +01:00
Anthony Stirling
bc554ff4a7 Merge branch 'main' into main 2023-08-10 21:42:40 +01:00
Anthony Stirling
b7a0d1ece8 Merge pull request #301 from jb2barrels/en_US_Aug-10-2023
Create en_US translation properties
2023-08-10 21:42:16 +01:00
Jacob Braun
ca384218dc Add US to navbar.html and distinguish English selection GB and US
Add US to navbar.html and distinguish English selection GB and US
2023-08-10 13:33:46 -07:00
Jacob Braun
e9550fd6b2 Add US svg
Add US svg
2023-08-10 13:33:20 -07:00
Jacob Braun
232a305d51 Add additional spelling changes for US translations
Add additional spelling changes for US translations
2023-08-10 13:27:56 -07:00
adrielCarmoUFMS
a6ab448eeb Merge pull request #2 from adrielCarmoUFMS/adrielCarmoUFMS-patch-1
Update messages_pt_BR.properties
2023-08-10 16:14:22 -04:00
adrielCarmoUFMS
f9aa157c6c Update messages_pt_BR.properties
Updating the translation of new features to the Portuguese - BR language
2023-08-10 16:03:24 -04:00
adrielCarmoUFMS
b7df24acaa Merge pull request #1 from adrielCarmoUFMS/adrielCarmoUFMS_pt-BR
Update messages_pt_BR.properties
2023-08-10 15:57:59 -04:00
adrielCarmoUFMS
ad4ca1b2d7 Update messages_pt_BR.properties
Updating the translation of new features to the Portuguese - BR language
2023-08-10 15:56:15 -04:00
Jacob Braun
c562d197e7 Create en_US translation properties
Copied from en_GB. Fixed variables noFavourites and home.pdfOrganiser.title to use its US corrected spelling.
2023-08-10 08:56:27 -07:00
Anthony Stirling
83ba1899b7 metric filters 2023-08-09 20:30:19 +01:00
Anthony Stirling
3420adc7c9 security and apple icons 2023-08-09 20:30:07 +01:00
Anthony Stirling
fd39f28e46 Merge pull request #280 from Frooodle/dependabot/gradle/org.springframework.boot-spring-boot-starter-test-3.1.2
Bump org.springframework.boot:spring-boot-starter-test from 3.1.0 to 3.1.2
2023-08-08 20:29:23 +01:00
Anthony Stirling
710125852a Merge branch 'main' into dependabot/gradle/org.springframework.boot-spring-boot-starter-test-3.1.2 2023-08-08 20:27:51 +01:00
Anthony Stirling
e8ec208390 Merge pull request #281 from Frooodle/dependabot/gradle/org.springframework.boot-spring-boot-starter-web-3.1.2
Bump org.springframework.boot:spring-boot-starter-web from 3.1.0 to 3.1.2
2023-08-08 20:27:23 +01:00
dependabot[bot]
4584562607 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.0 to 3.1.2.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.1.0...v3.1.2)

---
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] <support@github.com>
2023-08-08 19:25:51 +00:00
dependabot[bot]
2c1412a088 Bump org.springframework.boot:spring-boot-starter-web
Bumps [org.springframework.boot:spring-boot-starter-web](https://github.com/spring-projects/spring-boot) from 3.1.0 to 3.1.2.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.1.0...v3.1.2)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-web
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 19:25:50 +00:00
Anthony Stirling
0a65382979 Merge pull request #279 from Frooodle/dependabot/gradle/org.springframework.boot-3.1.2
Bump org.springframework.boot from 3.1.1 to 3.1.2
2023-08-08 20:25:32 +01:00
Anthony Stirling
4f404f66e5 Merge branch 'main' into dependabot/gradle/org.springframework.boot-3.1.2 2023-08-08 20:24:34 +01:00
Anthony Stirling
89505ada00 Merge pull request #273 from Frooodle/dependabot/gradle/io.spring.dependency-management-1.1.2
Bump io.spring.dependency-management from 1.1.0 to 1.1.2
2023-08-08 20:24:01 +01:00
dependabot[bot]
374a30ac5a Bump org.springframework.boot from 3.1.1 to 3.1.2
Bumps [org.springframework.boot](https://github.com/spring-projects/spring-boot) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.1.1...v3.1.2)

---
updated-dependencies:
- dependency-name: org.springframework.boot
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 19:20:25 +00:00
Anthony Stirling
cee4ee4128 Merge branch 'main' into dependabot/gradle/io.spring.dependency-management-1.1.2 2023-08-08 20:19:47 +01:00
Anthony Stirling
58fc5e2ffa Merge pull request #259 from Frooodle/dependabot/gradle/org.apache.pdfbox-pdfbox-2.0.29
Bump org.apache.pdfbox:pdfbox from 2.0.28 to 2.0.29
2023-08-08 20:19:27 +01:00
Anthony Stirling
951ea43f8b Merge branch 'main' into dependabot/gradle/org.apache.pdfbox-pdfbox-2.0.29 2023-08-08 20:09:34 +01:00
Anthony Stirling
ca16ecef24 Create StartupApplicationListener.java 2023-08-08 20:09:05 +01:00
Anthony Stirling
bb025dc2a1 Merge branch 'main' into dependabot/gradle/org.apache.pdfbox-pdfbox-2.0.29 2023-08-08 19:57:32 +01:00
dependabot[bot]
d797169bd0 Bump io.spring.dependency-management from 1.1.0 to 1.1.2
Bumps [io.spring.dependency-management](https://github.com/spring-gradle-plugins/dependency-management-plugin) from 1.1.0 to 1.1.2.
- [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.0...v1.1.2)

---
updated-dependencies:
- dependency-name: io.spring.dependency-management
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 18:56:05 +00:00
Anthony Stirling
891f9e2252 api changes 2023-08-08 19:55:18 +01:00
Anthony Stirling
4a579c00ce docs 2023-08-06 22:14:37 +01:00
Anthony Stirling
9cb4d8e088 remove copy fonts from LITE 2023-08-06 21:58:55 +01:00
Anthony Stirling
5d3ee7755a show js 2023-08-06 21:57:35 +01:00
Anthony Stirling
c047c46587 Merge branch 'main' of git@github.com:Frooodle/Stirling-PDF.git into
main
2023-08-06 21:56:47 +01:00
Anthony Stirling
54f53be5b5 show javascript, bug fixes 2023-08-06 21:56:02 +01:00
Anthony Stirling
8bb9e5b22f Update fileInput.js 2023-08-06 14:16:56 +01:00
Anthony Stirling
379791a326 Merge pull request #297 from Frooodle/allInfo
new features
2023-08-06 13:11:51 +01:00
Anthony Stirling
38ec68b303 version bump 2023-08-06 13:09:42 +01:00
Anthony Stirling
a5095b04ad lang 2023-08-06 13:02:15 +01:00
Anthony Stirling
a27ddb40be navbar, blank page desc and drag drop append 2023-08-06 12:34:26 +01:00
Anthony Stirling
bc36be8a5e Merge remote-tracking branch 'origin/main' into allInfo 2023-08-05 23:04:28 +01:00
Anthony Stirling
1e35556034 update 2023-08-05 23:03:49 +01:00
Anthony Stirling
882cd41d4b Merge pull request #296 from jordyjordy/multitool-filedrag
add fileInput widget to multiSelect
2023-08-05 17:03:46 +01:00
jordy
724fb4bf8f add fileInput widget to multiSelect 2023-08-05 17:36:05 +02:00
Anthony Stirling
b07437dbfa get info DONE! 2023-08-02 23:03:35 +01:00
Anthony Stirling
96f05cd518 get info changes 2023-08-02 22:49:43 +01:00
Anthony Stirling
77411e94a4 new features 2023-08-01 00:03:13 +01:00
Anthony Stirling
0da9c62ef8 all info 2023-07-30 21:56:09 +01:00
Anthony Stirling
52a7885f3c all inf 2023-07-30 14:43:34 +01:00
Anthony Stirling
f98f089d63 More fixes for RequestPart mixing 2023-07-30 11:39:29 +01:00
Anthony Stirling
6b618f3abe Watermark fixes 2023-07-30 11:31:46 +01:00
Anthony Stirling
0732ffa76e Update README.md 2023-07-29 14:31:09 +01:00
Anthony Stirling
b5b4636e56 changes to script executor and init 2023-07-29 13:53:30 +01:00
Anthony Stirling
ca12d040e1 Merge pull request #289 from NeilJared/patch-1
ES translation updated
2023-07-27 21:19:12 +01:00
NeilJared
3388b9fafa Merge branch 'main' into patch-1 2023-07-27 21:47:51 +02:00
NeilJared
954b36e14c Merge pull request #1 from NeilJared/NeilJared-patch-1
Update messages_es_ES.properties
2023-07-27 21:21:37 +02:00
NeilJared
4d43814220 Update messages_es_ES.properties
ES translation completed and updated to v.0.11.2
2023-07-27 21:20:30 +02:00
dependabot[bot]
f6262c82e1 Bump org.apache.pdfbox:pdfbox from 2.0.28 to 2.0.29
Bumps org.apache.pdfbox:pdfbox from 2.0.28 to 2.0.29.

---
updated-dependencies:
- dependency-name: org.apache.pdfbox:pdfbox
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-26 21:09:07 +00:00
Anthony Stirling
7ead12922f new page 2023-07-26 22:08:34 +01:00
Anthony Stirling
33a6a7869c Further Fixes 2023-07-26 22:08:19 +01:00
Anthony Stirling
bf995f989c fixes 2023-07-26 13:00:06 +01:00
NeilJared
21de6c6520 Update messages_es_ES.properties
partial translation update, will continue by line 348
2023-07-26 12:17:20 +02:00
systo
c14aa6851e Merge branch 'main' of git@github.com:Frooodle/Stirling-PDF.git into main 2023-07-25 23:36:32 +01:00
Anthony Stirling
8260eced2d auto split cleanup 2023-07-25 23:36:19 +01:00
Anthony Stirling
d028465dc5 Update README.md 2023-07-25 21:21:43 +01:00
Anthony Stirling
29dab5e47d numbers name 2023-07-25 00:01:20 +01:00
Anthony Stirling
9e655631b4 lang cleanup 2023-07-24 23:53:52 +01:00
Anthony Stirling
179c7b80bb languages 2023-07-24 23:12:33 +01:00
Anthony Stirling
349bf29122 fix navbar not supporting other languages nicely size wise 2023-07-23 23:20:30 +01:00
Anthony Stirling
295357f12b tags and searching 2023-07-23 23:05:02 +01:00
Anthony Stirling
940f8d999e Update messages_en_GB.properties 2023-07-23 15:13:33 +01:00
Anthony Stirling
5605d53a5f Update messages_en_GB.properties 2023-07-23 13:05:47 +01:00
Anthony Stirling
116d103119 html to pdf 2023-07-23 00:03:25 +01:00
Anthony Stirling
2fd8c643af UI for html/url 2023-07-22 17:27:08 +01:00
Anthony Stirling
4367ae7934 html and url to pdf init 2023-07-22 16:57:40 +01:00
Anthony Stirling
749461334d pdfjs worker changes and crop fix 2023-07-22 13:17:24 +01:00
Anthony Stirling
e83a027023 Merge pull request #266 from webysther/patch-1
Update HowToUseOCR.md
2023-07-19 23:35:20 +01:00
Anthony Stirling
1883b477a3 Merge branch 'main' into patch-1 2023-07-19 23:33:46 +01:00
Anthony Stirling
37e2cd40da Merge pull request #276 from Frooodle/pipelineStuff
Start of v0.11
2023-07-19 23:26:57 +01:00
Anthony Stirling
81a9329975 border to contrast 2023-07-19 23:23:08 +01:00
Anthony Stirling
0eb019fc3c searchbar cleanups 2023-07-19 23:15:16 +01:00
Anthony Stirling
4129c75475 crop fix, auto split docs and UI and message 2023-07-19 22:11:59 +01:00
Anthony Stirling
3d66f03f58 hide pipeline 2023-07-18 22:09:48 +01:00
Anthony Stirling
7b83104fd6 fix for #275 2023-07-18 22:04:18 +01:00
Anthony Stirling
794aede27f docs 2023-07-17 21:59:34 +01:00
Anthony Stirling
08eb39b206 divider examples 2023-07-16 23:52:09 +01:00
Anthony Stirling
2566c7f3d7 translations 2023-07-16 19:42:13 +01:00
Anthony Stirling
a8522bb3b5 GB pretty 2023-07-16 19:34:01 +01:00
Anthony Stirling
92b9142902 language cleanups and sanitize 2023-07-16 18:57:21 +01:00
Anthony Stirling
d07e3e6522 change add numbers grid and remove files from pipelines 2023-07-16 16:07:08 +01:00
Anthony Stirling
29aabdfba8 filter 2023-07-16 00:36:58 +01:00
Anthony Stirling
9af1b0cfdc some more changes also broke pipeline a bit 2023-07-15 16:06:33 +01:00
Anthony Stirling
6e32c7fe85 auto split init 2023-07-15 11:39:10 +01:00
Anthony Stirling
ddf5915c6a drag drop niceness 2023-07-13 22:03:23 +01:00
Anthony Stirling
cdbf1fa73a watermark features 2023-07-12 23:27:36 +01:00
Anthony Stirling
5d926b022b gitingore 2023-07-12 00:17:55 +01:00
Anthony Stirling
50bcca10e2 pipeline stuff 2023-07-12 00:17:44 +01:00
Webysther Sperandio
a5528c06ee Update HowToUseOCR.md 2023-07-10 13:49:58 +02:00
Anthony Stirling
94526de04b sign fix 2023-07-09 20:34:07 +01:00
Anthony Stirling
1ddf7abe6f extra fonts plus dynamic fonts 2023-07-09 19:36:41 +01:00
Anthony Stirling
a742c1b034 stuff 2023-07-09 18:10:10 +01:00
Anthony Stirling
6e726ac2a6 lots of stuff and garbage code for automate to cleanup lots 2023-07-09 00:05:33 +01:00
Anthony Stirling
5877b40be5 adjust contrast! 2023-07-06 22:52:22 +01:00
Anthony Stirling
a3c7f5aa46 Search bar and adjust contrast 2023-07-05 22:21:43 +01:00
Anthony Stirling
4e28bf03bd auto rename 2023-07-04 23:25:21 +01:00
Anthony Stirling
f92482d89e page numbers and custom images 2023-07-04 21:45:35 +01:00
Anthony Stirling
3c54429fe0 Update README.md 2023-07-02 19:19:49 +01:00
dependabot[bot]
4c4c22e861 Merge pull request #252 from Frooodle/dependabot/gradle/org.springframework.boot-3.1.1 2023-07-02 17:41:23 +00:00
Anthony Stirling
00e27d9327 Merge branch 'main' into dependabot/gradle/org.springframework.boot-3.1.1 2023-07-02 18:39:22 +01:00
dependabot[bot]
f082278041 Merge pull request #253 from Frooodle/dependabot/gradle/org.springframework.boot-spring-boot-starter-thymeleaf-3.1.1 2023-07-02 17:38:09 +00:00
Anthony Stirling
09dde64c57 Merge branch 'main' into dependabot/gradle/org.springframework.boot-spring-boot-starter-thymeleaf-3.1.1 2023-07-02 18:37:20 +01:00
dependabot[bot]
b52a6357f6 Merge pull request #239 from Frooodle/dependabot/gradle/edu.sc.seis.launch4j-3.0.3 2023-07-02 17:34:15 +00:00
Anthony Stirling
f14a566d06 Merge branch 'main' into dependabot/gradle/edu.sc.seis.launch4j-3.0.3 2023-07-02 18:33:21 +01:00
Anthony Stirling
b352ec6888 Merge pull request #234 from Frooodle/dependabot/gradle/commons-io-commons-io-2.13.0
Bump commons-io:commons-io from 2.11.0 to 2.13.0
2023-07-02 18:33:12 +01:00
Anthony Stirling
4ec1bad03d Merge branch 'main' into dependabot/gradle/commons-io-commons-io-2.13.0 2023-07-02 18:32:22 +01:00
Anthony Stirling
f20bbc119d Merge branch 'main' into dependabot/gradle/org.springframework.boot-spring-boot-starter-thymeleaf-3.1.1 2023-07-02 18:32:14 +01:00
Anthony Stirling
8555c3d422 Merge branch 'main' into dependabot/gradle/org.springframework.boot-3.1.1 2023-07-02 18:32:08 +01:00
Anthony Stirling
71f9d03b19 Merge pull request #251 from albertopasqualetto/main
addImage text was wrong
2023-07-02 18:31:33 +01:00
dependabot[bot]
0b31379078 Bump org.springframework.boot:spring-boot-starter-thymeleaf
Bumps [org.springframework.boot:spring-boot-starter-thymeleaf](https://github.com/spring-projects/spring-boot) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-thymeleaf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-02 17:30:55 +00:00
dependabot[bot]
29c204b2c2 Bump org.springframework.boot from 3.1.0 to 3.1.1
Bumps [org.springframework.boot](https://github.com/spring-projects/spring-boot) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: org.springframework.boot
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-02 17:30:53 +00:00
dependabot[bot]
657e881963 Bump edu.sc.seis.launch4j from 3.0.1 to 3.0.3
Bumps edu.sc.seis.launch4j from 3.0.1 to 3.0.3.

---
updated-dependencies:
- dependency-name: edu.sc.seis.launch4j
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-02 17:30:51 +00:00
Anthony Stirling
ef6bdc70a4 Merge branch 'main' into dependabot/gradle/commons-io-commons-io-2.13.0 2023-07-02 18:30:35 +01:00
Anthony Stirling
e4a36115a2 Merge pull request #230 from Frooodle/dependabot/gradle/io.swagger.swaggerhub-1.2.0
Bump io.swagger.swaggerhub from 1.1.0 to 1.2.0
2023-07-02 18:30:19 +01:00
dependabot[bot]
325f86832c Bump commons-io:commons-io from 2.11.0 to 2.13.0
Bumps commons-io:commons-io from 2.11.0 to 2.13.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-02 17:27:54 +00:00
dependabot[bot]
e3dbdd6b09 Bump io.swagger.swaggerhub from 1.1.0 to 1.2.0
Bumps io.swagger.swaggerhub from 1.1.0 to 1.2.0.

---
updated-dependencies:
- dependency-name: io.swagger.swaggerhub
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-02 17:27:54 +00:00
Anthony Stirling
919041e879 Update version and disable folder scan alpha 2023-07-02 18:27:23 +01:00
Anthony Stirling
182231a183 Merge pull request #256 from Frooodle/pipeline
Pipeline changes, fonts, and watermark fixes
2023-07-02 18:21:17 +01:00
Anthony Stirling
46d4ae8fc5 pipeline change 2023-07-02 18:20:23 +01:00
Anthony Stirling
73ab1936a3 filter update 2023-07-02 00:34:04 +01:00
Anthony Stirling
59c72527b5 remove from menu for now 2023-07-01 23:40:17 +01:00
Anthony Stirling
5ea3bcc1dd watermark stuff 2023-07-01 22:18:49 +01:00
Anthony Stirling
c140052822 watermark fix 2023-07-01 21:08:33 +01:00
Anthony Stirling
f7832774d9 cachec change 2023-06-29 23:59:15 +01:00
systo
279d25c03a Merge branch 'pipeline' of git@github.com:Frooodle/Stirling-PDF.git into pipeline 2023-06-29 23:34:22 +01:00
Anthony Stirling
f1984047a8 Update README.md 2023-06-29 22:03:31 +01:00
Anthony Stirling
eae7c1bd60 Update README.md 2023-06-29 22:02:59 +01:00
systo
d7f592ebda Merge remote-tracking branch 'origin/main' into pipeline 2023-06-29 22:01:49 +01:00
Anthony Stirling
1798ce002a Fix metrics 2023-06-29 21:51:08 +01:00
systo
57a0cca595 Merge remote-tracking branch 'origin/master' into pipeline 2023-06-29 19:13:33 +01:00
Anthony Stirling
b26fbd7693 Update README.md 2023-06-29 17:07:34 +01:00
Anthony Stirling
43b0e25bdb modes 2023-06-26 18:23:06 +01:00
Anthony Stirling
3377af1305 api tag 2023-06-25 09:16:32 +01:00
Anthony Stirling
c81c1006b7 Merge branch 'pipeline' of git@github.com:Frooodle/Stirling-PDF.git into
pipeline
2023-06-24 15:25:39 +01:00
systo
f313857f96 Merge branch 'pipeline' of git@github.com:Frooodle/Stirling-PDF.git into pipeline 2023-06-24 14:59:58 +01:00
Anthony Stirling
d5fbe02149 notosans arabic JP, KR SC 2023-06-24 14:59:49 +01:00
Anthony Stirling
159cee0b39 init many new shit 2023-06-23 23:29:53 +01:00
Alberto Pasqualetto
5da4dd6cca Fix addImages text 2023-06-23 00:11:26 +00:00
Anthony Stirling
e9daf05f16 pipeline cleanup 2023-06-21 21:41:58 +01:00
Anthony Stirling
a12643194a changes 2023-06-21 21:19:52 +01:00
Anthony Stirling
25d8fc08f7 Merge pull request #250 from inazkue/patch-1
Update navbar.html
2023-06-21 11:55:44 +01:00
inazkue
a72378dd4d Update navbar.html
fix navbar.html basque language item description
2023-06-21 11:10:50 +02:00
systo
9aed70408b Merge branch 'pipeline' of git@github.com:Frooodle/Stirling-PDF.git into pipeline 2023-06-20 23:50:05 +01:00
Anthony Stirling
5ae2c71c3a Input:PDF Output:PDF 2023-06-20 23:49:53 +01:00
Anthony Stirling
4edce515b8 Merge pull request #249 from inazkue/main
Basque language
2023-06-20 21:42:57 +01:00
Anthony Stirling
67ff664eb8 Delete messages_eu_EU.properties 2023-06-20 21:41:44 +01:00
inazkue
71c1a4f102 Update navbar.html 2023-06-20 14:44:37 +02:00
inazkue
ba4ba1b9fc Add files via upload 2023-06-20 14:38:11 +02:00
inazkue
59f10f06ca Add files via upload 2023-06-19 11:57:18 +02:00
inazkue
f7953cbc37 Add files via upload 2023-06-19 11:55:54 +02:00
Anthony Stirling
9a74e81754 text 2023-06-14 19:57:01 +01:00
Anthony Stirling
420e4b6766 fixes 2023-06-13 23:50:46 +01:00
Anthony Stirling
aed48ffc93 pipe 2023-06-13 19:18:40 +01:00
Anthony Stirling
0cebe69ff8 Pipeline init 2023-06-13 00:32:15 +01:00
Anthony Stirling
e5990dba81 Update Beans.java 2023-06-12 17:31:42 +01:00
Anthony Stirling
c9b0d01250 Update push-docker.yml 2023-06-12 16:20:14 +01:00
Anthony Stirling
4918ed3f3c Merge pull request #238 from tkymmm/japanese
Japanese
2023-06-12 11:02:28 +01:00
tkymmm
b176ce4251 Update navbar.html 2023-06-12 14:57:51 +09:00
tkymmm
518ff5409e Add files via upload 2023-06-12 14:56:45 +09:00
tkymmm
803bd3c5b2 Add files via upload 2023-06-12 14:56:05 +09:00
Anthony Stirling
03d4e73304 jar name change 2023-06-10 18:24:32 +01:00
Anthony Stirling
55a820b09f Update build.gradle 2023-06-10 18:20:28 +01:00
Anthony Stirling
f2a65dc360 Update build.gradle 2023-06-10 18:15:23 +01:00
Anthony Stirling
7b4a889ea7 Remove debugs 2023-06-10 18:14:34 +01:00
Anthony Stirling
f627d251c3 Update releaseArtifacts.yml 2023-06-10 18:06:59 +01:00
Anthony Stirling
d5b7125415 Rename app to Stirling-PDF not S-pdf 2023-06-10 18:04:06 +01:00
Anthony Stirling
67dd3cf0e3 Update releaseArtifacts.yml 2023-06-10 17:54:50 +01:00
Anthony Stirling
b8b62bb5af Update releaseArtifacts.yml 2023-06-10 17:44:02 +01:00
Anthony Stirling
b4a9d1ac18 Update releaseArtifacts.yml 2023-06-10 17:39:36 +01:00
Anthony Stirling
8aae651c2c Update releaseArtifacts.yml 2023-06-10 15:22:35 +01:00
Anthony Stirling
fc9465b324 Update releaseArtifacts.yml 2023-06-10 15:21:54 +01:00
Anthony Stirling
579a50be2c Update releaseArtifacts.yml 2023-06-10 15:15:51 +01:00
Anthony Stirling
9c5b967e4c fix 2023-06-10 15:10:37 +01:00
Anthony Stirling
d41deb729b fix for action 2023-06-10 15:07:20 +01:00
Anthony Stirling
a93a89f3f0 github action for release upload 2023-06-10 15:06:01 +01:00
Anthony Stirling
11d642a25f Upload jar and .exe to release 2023-06-10 15:05:38 +01:00
Anthony Stirling
67448498ea documentation stuff and downloer fix for image to pdf 2023-06-10 00:46:44 +01:00
Anthony Stirling
489b8da713 fix for actions 2023-06-08 22:28:13 +01:00
Anthony Stirling
728d4d0fa8 latest 2023-06-08 22:02:09 +01:00
Anthony Stirling
e70f4ff3a6 version bump 2023-06-08 20:45:35 +01:00
Anthony Stirling
04032c0dfe sign changes min size, lite docker, merge fix #172 2023-06-08 20:25:55 +01:00
Anthony Stirling
ecba6461df Merge branch 'main' of git@github.com:Frooodle/Stirling-PDF.git into
main
2023-06-07 14:47:06 +01:00
Anthony Stirling
433ba6c250 groups update 2023-06-07 14:13:18 +01:00
Anthony Stirling
ff6c55d1d0 fix naming issues in split and made it allign with others 2023-06-07 14:01:37 +01:00
Anthony Stirling
d9f8facf2e Merge pull request #232 from NeilJared/patch-1
Update messages_es_ES.properties
2023-06-06 00:26:20 +01:00
NeilJared
6bd3e5cc8f Update messages_es_ES.properties
Updated Spanish translation
2023-06-06 01:12:03 +02:00
Anthony Stirling
936fb5ae45 Update README.md 2023-06-05 23:08:55 +01:00
Anthony Stirling
8e661e1260 fix spanish remove blanks 2023-06-05 22:30:18 +01:00
Anthony Stirling
987d9b0502 Merge pull request #227 from jordyjordy/fix-imgtopdf-typo
fix typo in img conversion filename
2023-06-05 19:42:48 +01:00
Anthony Stirling
f6a9169446 Merge branch 'main' into fix-imgtopdf-typo 2023-06-05 19:41:24 +01:00
Anthony Stirling
d5c1c43eb1 Merge pull request #228 from jordyjordy/fix-multitool-filemixing
await pdf creation in each for loop.
2023-06-05 19:41:15 +01:00
Anthony Stirling
20c74dac60 Merge branch 'main' into fix-multitool-filemixing 2023-06-05 19:40:00 +01:00
Anthony Stirling
30161275a3 Merge branch 'main' into fix-imgtopdf-typo 2023-06-05 19:39:14 +01:00
jordy
7e9479806e await pdf creation in each for loop. 2023-06-05 19:38:25 +02:00
jordy
39b9ea9f1d fix typo 2023-06-05 19:25:36 +02:00
Anthony Stirling
5a9165d7c6 missing lang 2023-06-05 18:23:15 +01:00
Anthony Stirling
4f851156b7 dummy lang changes 2023-06-04 22:40:14 +01:00
Anthony Stirling
b8fa278173 finalise auto swagger docs 2023-06-03 23:32:47 +01:00
Anthony Stirling
2cfb344e13 swagger 2023-06-03 23:24:40 +01:00
Anthony Stirling
1d2bf92abe Merge branch 'main' of git@github.com:Frooodle/Stirling-PDF.git into
main
2023-06-03 23:21:47 +01:00
Anthony Stirling
cefcda9f40 test 2023-06-03 23:21:12 +01:00
Anthony Stirling
a4bc67ff8e Update swagger.yml 2023-06-03 23:08:10 +01:00
Anthony Stirling
48b3dea256 remove push 2023-06-03 23:05:20 +01:00
Anthony Stirling
1f5231d905 @./SwaggerDoc.json 2023-06-03 23:01:14 +01:00
Anthony Stirling
c526e18992 Split pages support n function and other stuff 2023-06-03 22:56:15 +01:00
Anthony Stirling
4594765cbd rearrange support n numbers, downloader.js fixes 2023-06-03 17:21:59 +01:00
Anthony Stirling
e2a787e519 Hide banner if mobile 2023-06-02 23:43:22 +01:00
Anthony Stirling
45b3e0aa6a JS and css cleanup 2023-06-02 20:15:10 +01:00
Anthony Stirling
7bdb2615d4 css cleanup 2023-06-01 23:12:55 +01:00
systo
019a502490 Merge branch 'main' of git@github.com:Frooodle/Stirling-PDF.git into main 2023-06-01 21:37:40 +01:00
Anthony Stirling
6793fd5bc7 thirs party js folder 2023-06-01 21:37:33 +01:00
systo
8ac5cf759e Merge branch 'main' of git@github.com:Frooodle/Stirling-PDF.git into main 2023-06-01 11:22:56 +01:00
Anthony Stirling
19880567ba Donation buttons 2023-06-01 11:22:44 +01:00
Anthony Stirling
5c5a3fefc1 Merge pull request #205 from Frooodle/dependabot/gradle/org.springframework.boot-spring-boot-starter-test-3.1.0
Bump org.springframework.boot:spring-boot-starter-test from 3.0.6 to 3.1.0
2023-06-01 10:53:13 +01:00
Anthony Stirling
90057828a5 Merge branch 'main' into dependabot/gradle/org.springframework.boot-spring-boot-starter-test-3.1.0 2023-06-01 10:52:24 +01:00
Anthony Stirling
7cfc3a09a2 Merge pull request #206 from Frooodle/dependabot/gradle/org.springframework.boot-3.1.0
Bump org.springframework.boot from 3.0.6 to 3.1.0
2023-06-01 10:52:08 +01:00
dependabot[bot]
b8bbee27f8 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.0.6 to 3.1.0.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.0.6...v3.1.0)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-test
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-01 09:51:11 +00:00
Anthony Stirling
8e5c665e49 Merge branch 'main' into dependabot/gradle/org.springframework.boot-3.1.0 2023-06-01 10:50:49 +01:00
Anthony Stirling
7b1e6fb953 Merge pull request #204 from Frooodle/dependabot/gradle/org.springframework.boot-spring-boot-starter-thymeleaf-3.1.0
Bump org.springframework.boot:spring-boot-starter-thymeleaf from 3.0.6 to 3.1.0
2023-06-01 10:50:22 +01:00
dependabot[bot]
79936e69c5 Bump org.springframework.boot from 3.0.6 to 3.1.0
Bumps [org.springframework.boot](https://github.com/spring-projects/spring-boot) from 3.0.6 to 3.1.0.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.0.6...v3.1.0)

---
updated-dependencies:
- dependency-name: org.springframework.boot
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-01 09:49:33 +00:00
dependabot[bot]
a19cd327f3 Bump org.springframework.boot:spring-boot-starter-thymeleaf
Bumps [org.springframework.boot:spring-boot-starter-thymeleaf](https://github.com/spring-projects/spring-boot) from 3.0.6 to 3.1.0.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.0.6...v3.1.0)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-thymeleaf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-01 09:49:26 +00:00
Anthony Stirling
5c831c156b Merge pull request #203 from Frooodle/dependabot/gradle/org.springframework.boot-spring-boot-starter-web-3.1.0
Bump org.springframework.boot:spring-boot-starter-web from 3.0.6 to 3.1.0
2023-06-01 10:48:55 +01:00
Anthony Stirling
602df08df5 Merge branch 'main' into dependabot/gradle/org.springframework.boot-spring-boot-starter-web-3.1.0 2023-06-01 10:48:04 +01:00
Anthony Stirling
3b8d06a9e3 Merge pull request #222 from MarcO-79/patch-14
Update messages_pl_PL.properties
2023-06-01 07:40:45 +01:00
Marcin Bielicki
5fd43b50e0 Update messages_pl_PL.properties
Adjusting the translation to the new version
2023-06-01 08:00:39 +02:00
Anthony Stirling
15d39413f3 scaled changes 2023-05-31 21:33:45 +01:00
systo
5e01946981 Merge branch 'main' of git@github.com:Frooodle/Stirling-PDF.git into main 2023-05-31 21:28:15 +01:00
Anthony Stirling
576d11f09a Download cleanup 2023-05-31 21:28:05 +01:00
Anthony Stirling
a43c296eef Merge pull request #221 from LaserKaspar/main
Scale Pages
2023-05-31 21:27:32 +01:00
Felix Kaspar
6015591e34 Language 2023-05-31 21:44:59 +02:00
Felix Kaspar
6f5f031b24 Scale Pages 2023-05-31 21:39:40 +02:00
Anthony Stirling
1499e78795 GeneralUtils 2023-05-31 20:37:13 +01:00
Anthony Stirling
1b45ab7222 util move around 2023-05-31 20:15:48 +01:00
Anthony Stirling
005b158ad3 naming fix 2023-05-31 18:44:32 +01:00
Anthony Stirling
26d003e840 css fix 2023-05-31 00:17:48 +01:00
Anthony Stirling
192fb39302 new error display logic init 2023-05-31 00:06:35 +01:00
dependabot[bot]
1650dfcc29 Bump org.springframework.boot:spring-boot-starter-web
Bumps [org.springframework.boot:spring-boot-starter-web](https://github.com/spring-projects/spring-boot) from 3.0.6 to 3.1.0.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.0.6...v3.1.0)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-web
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-30 19:55:06 +00:00
Anthony Stirling
fda83c4c1d password fix init 2023-05-30 20:54:19 +01:00
systo
1a6ebbb8e5 Merge branch 'main' of git@github.com:Frooodle/Stirling-PDF.git into main 2023-05-30 19:46:09 +01:00
Anthony Stirling
ea1f8912b8 cert change remove requirement for para,s. pdf-to-img dpi fix 2023-05-30 19:45:51 +01:00
Anthony Stirling
a5885d2628 Merge pull request #218 from blairw/patch-1
Update LocalRunGuide.md
2023-05-29 23:27:57 +01:00
Blair Wang
716d4c6f28 Update LocalRunGuide.md
Correct small typo (`/build/libs/` does not exist, `./build/libs/` does)
2023-05-30 08:15:26 +10:00
Anthony Stirling
b3a36c82bb Merge pull request #215 from MarcO-79/patch-13
Update messages_pl_PL.properties
2023-05-29 14:02:43 +01:00
Marcin Bielicki
75fff1d52f Update messages_pl_PL.properties
Adjusting the translation to the new version
2023-05-29 13:34:20 +02:00
Anthony Stirling
2d88987cb3 Multi page layout init for #212 2023-05-27 14:23:25 +01:00
Anthony Stirling
8bbbdbd359 duplex 2023-05-26 23:53:11 +01:00
systo
8a2aa44de8 Merge branch 'main' of git@github.com:Frooodle/Stirling-PDF.git into main 2023-05-26 19:30:06 +01:00
Anthony Stirling
3715c555d3 fix for #213 2023-05-26 15:25:18 +01:00
Anthony Stirling
5e4de6cc5f some filename fixes for nicer extraction 2023-05-26 14:39:08 +01:00
Anthony Stirling
4cadfc64f6 Merge pull request #211 from itsfks/main
Adição tradução PT_BR
2023-05-26 10:15:35 +01:00
felipe
a3f0d47cad Adição tradução PT_BR 2023-05-25 20:49:04 -03:00
Anthony Stirling
bc55b5fdda Merge pull request #208 from MarcO-79/patch-12
Update messages_pl_PL.properties
2023-05-23 11:29:20 +01:00
Marcin Bielicki
43474712eb Update messages_pl_PL.properties
Corrections to the translation
2023-05-23 12:02:37 +02:00
Anthony Stirling
bf48cbb89c Update README.md 2023-05-22 20:43:24 +01:00
Anthony Stirling
c50d8e216a Merge pull request #202 from Frooodle/compress
Fixes for split photo scans
2023-05-22 20:37:55 +01:00
Anthony Stirling
8c160bcddf version bump 2023-05-22 20:33:10 +01:00
Anthony Stirling
6fd6aa2733 fixes to split photos 2023-05-22 20:32:50 +01:00
Anthony Stirling
d7431c459d Merge pull request #200 from ButaNicolae/Romanian-language-and-fixes
Romanian language and fixes
2023-05-22 20:25:51 +01:00
Anthony Stirling
464a11cd69 Merge branch 'main' into Romanian-language-and-fixes 2023-05-22 20:22:37 +01:00
Anthony Stirling
154535a7b1 Merge pull request #201 from Alanimdeo/ko_KR
Add Korean translation
2023-05-22 20:14:38 +01:00
Alanimdeo
f379a759bb Add Korean translation 2023-05-23 00:57:48 +09:00
Nicolae Buta
8cbd7eafb8 required select one language on ocr-pdf 2023-05-22 18:28:16 +03:00
Nicolae Buta
6fb304d010 Detect/Split Scanned photos fixes 2023-05-22 18:27:46 +03:00
Nicolae Buta
089b2290bd blank page path problem fixed 2023-05-22 18:26:29 +03:00
Nicolae Buta
c4e5bfdabb added language Romanian and dosplay u/notpdates button ? 2023-05-22 18:25:58 +03:00
Nicolae Buta
9d5cb104c3 fixed zip on ocr-pdf 2023-05-22 18:25:23 +03:00
Nicolae Buta
d577b8b34e added language Romanian and dosplay u/notpdates button ? 2023-05-22 18:24:55 +03:00
Anthony Stirling
6219cd1d86 Update cert-sign.html 2023-05-22 15:44:45 +01:00
Anthony Stirling
dfd1ac7e99 Merge pull request #197 from wrongecho/patch-1
Update README.md - typo
2023-05-22 09:21:53 +01:00
Anthony Stirling
e3838b291f Merge branch 'main' into patch-1 2023-05-22 08:46:30 +01:00
Anthony Stirling
04a073c7cf Merge pull request #198 from MarcO-79/patch-11
Update messages_pl_PL.properties
2023-05-22 08:46:21 +01:00
Marcin Bielicki
04d5c60957 Update messages_pl_PL.properties
Adjusting the translation to the new version
2023-05-22 08:22:42 +02:00
wrongecho
2be6cad7e1 Update README.md
Correct typo in readme
2023-05-22 06:50:37 +01:00
Anthony Stirling
b44e036be3 Merge pull request #196 from Frooodle/compress
Compress abd cert sign
2023-05-21 23:29:21 +01:00
Anthony Stirling
7ac6e9d37b Update build.gradle 2023-05-21 23:27:59 +01:00
Anthony Stirling
6854e96fb8 cahnges 2023-05-21 23:25:34 +01:00
Anthony Stirling
2df3a386ad Merge remote-tracking branch 'origin/main' into compress 2023-05-21 17:13:53 +01:00
Anthony Stirling
187b47eddd cleanups 2023-05-21 17:12:18 +01:00
Anthony Stirling
763aeb5fae further sign stuff 2023-05-21 12:32:24 +01:00
Anthony Stirling
3cad43006a compress finalise, cert test, locale test 2023-05-20 22:48:59 +01:00
Anthony Stirling
8e4cdb78a0 Update LICENSE 2023-05-20 21:01:33 +01:00
Anthony Stirling
9d80458250 as 2023-05-19 23:58:54 +01:00
Anthony Stirling
d601c2ae64 Update README.md 2023-05-19 23:34:50 +01:00
Anthony Stirling
87cd6dfb54 compress 2023-05-19 20:43:30 +01:00
Anthony Stirling
3dea1b3d7c Merge pull request #194 from Frooodle/Sf298-patch-1
Missed a part in FAQ fixes
2023-05-19 13:52:19 +01:00
Saud Fatayerji
f882c166cd Missed a bit 2023-05-19 15:27:06 +03:00
Anthony Stirling
9be0acd75b Merge pull request #193 from Frooodle/cropping
Fixed language of FAQ
2023-05-19 13:21:03 +01:00
Saud Fatayerji
0901683880 Merge branch 'main' into signCrop 2023-05-19 15:13:51 +03:00
Anthony Stirling
216f3045db Merge pull request #189 from NeilJared/patch-2
Update messages_es_ES.properties
2023-05-19 11:54:20 +01:00
NeilJared
ce544adb62 Merge branch 'main' into patch-2 2023-05-19 10:18:25 +02:00
Anthony Stirling
107d299822 Merge pull request #192 from MarcO-79/patch-10
Update messages_pl_PL.properties
2023-05-19 08:10:00 +01:00
Marcin Bielicki
d577a34135 Update messages_pl_PL.properties
Corrections to the translation
2023-05-19 08:23:25 +02:00
Anthony Stirling
394c3412e5 Update README.md 2023-05-19 00:32:37 +01:00
NeilJared
b53920ddc5 Update messages_es_ES.properties
Updated es-ES translation
2023-05-19 00:33:26 +02:00
874 changed files with 121922 additions and 33584 deletions

5
.git-blame-ignore-revs Normal file
View File

@@ -0,0 +1,5 @@
# Formatting
5f771b785130154ed47952635b7acef371ffe0ec
# Normalize files
55d4fda01b2f39f5b7d7b4fda5214bd7ff0fd5dd

3
.gitattributes vendored
View File

@@ -1,5 +1,8 @@
* text=auto eol=lf
# Ignore all JavaScript files in a directory
src/main/resources/static/pdfjs/* linguist-vendored
src/main/resources/static/pdfjs/** linguist-vendored
src/main/resources/static/css/bootstrap-icons.css linguist-vendored
src/main/resources/static/css/bootstrap.min.css linguist-vendored
src/main/resources/static/css/fonts/* linguist-vendored

2
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,2 @@
# All PRs to V1 must be approved by Frooodle
* @Frooodle

View File

@@ -9,3 +9,7 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "docker"
directory: "/" # Location of Dockerfile
schedule:
interval: "weekly"

18
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,18 @@
# Description
Please provide a summary of the changes, including relevant motivation and context.
Closes #(issue_number)
## Checklist:
- [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] My changes generate no new warnings
## Contributor License Agreement
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 the MPL 2.0 (Mozilla Public License Version 2.0) license.
(This does not change the general open-source nature of Stirling-PDF, simply moving from one license to another license)

51
.github/scripts/check_duplicates.py vendored Normal file
View File

@@ -0,0 +1,51 @@
import sys
def find_duplicate_keys(file_path):
"""
Finds duplicate keys in a properties file and returns their occurrences.
This function reads a properties file, identifies any keys that occur more than
once, and returns a dictionary with these keys and the line numbers of their occurrences.
Parameters:
file_path (str): The path to the properties file to be checked.
Returns:
dict: A dictionary where each key is a duplicated key in the file, and the value is a list
of line numbers where the key occurs.
"""
with open(file_path, "r", encoding="utf-8") as file:
lines = file.readlines()
keys = {}
duplicates = {}
for line_number, line in enumerate(lines, start=1):
line = line.strip()
if line and not line.startswith("#") and "=" in line:
key = line.split("=", 1)[0].strip()
if key in keys:
# If the key already exists, add the current line number
duplicates.setdefault(key, []).append(line_number)
# Also add the first instance of the key if not already done
if keys[key] not in duplicates[key]:
duplicates[key].insert(0, keys[key])
else:
# Store the line number of the first instance of the key
keys[key] = line_number
return duplicates
if __name__ == "__main__":
failed = False
for ar in sys.argv[1:]:
duplicates = find_duplicate_keys(ar)
if duplicates:
for key, lines in duplicates.items():
lines_str = ", ".join(map(str, lines))
print(f"{key} duplicated in {ar} on lines {lines_str}")
failed = True
if failed:
sys.exit(1)

84
.github/scripts/check_tabulator.py vendored Normal file
View File

@@ -0,0 +1,84 @@
"""check_tabulator.py"""
import argparse
import sys
def check_tabs(file_path):
"""
Checks for tabs in the specified file.
Args:
file_path (str): The path to the file to be checked.
Returns:
bool: True if tabs are found, False otherwise.
"""
with open(file_path, "r", encoding="utf-8") as file:
content = file.read()
if "\t" in content:
print(f"Tab found in {file_path}")
return True
return False
def replace_tabs_with_spaces(file_path, replace_with=" "):
"""
Replaces tabs with a specified number of spaces in the file.
Args:
file_path (str): The path to the file where tabs will be replaced.
replace_with (str): The character(s) to replace tabs with. Defaults to two spaces.
"""
with open(file_path, "r", encoding="utf-8") as file:
content = file.read()
updated_content = content.replace("\t", replace_with)
with open(file_path, "w", encoding="utf-8") as file:
file.write(updated_content)
def main():
"""
Main function to replace tabs with spaces in the provided files.
The replacement character and files to check are taken from command line arguments.
"""
# Create ArgumentParser instance
parser = argparse.ArgumentParser(
description="Replace tabs in files with specified characters."
)
# Define optional argument `--replace_with`
parser.add_argument(
"--replace_with",
default=" ",
help="Character(s) to replace tabs with. Default is two spaces.",
)
# Define argument for file paths
parser.add_argument("files", metavar="FILE", nargs="+", help="Files to process.")
# Parse arguments
args = parser.parse_args()
# Extract replacement characters and files from the parsed arguments
replace_with = args.replace_with
files_checked = args.files
error = False
for file_path in files_checked:
if check_tabs(file_path):
replace_tabs_with_spaces(file_path, replace_with)
error = True
if error:
print("Error: Originally found tabs in HTML files, now replaced.")
sys.exit(1)
sys.exit(0)
if __name__ == "__main__":
main()

67
.github/scripts/gradle_to_chart.py vendored Normal file
View File

@@ -0,0 +1,67 @@
import re
import yaml
# Paths to the files
chart_yaml_path = "chart/stirling-pdf/Chart.yaml"
gradle_path = "build.gradle"
def get_chart_version(path):
"""
Reads the appVersion from Chart.yaml.
Args:
path (str): The file path to the Chart.yaml.
Returns:
str: The appVersion if found, otherwise an empty string.
"""
with open(path, encoding="utf-8") as file:
chart_yaml = yaml.safe_load(file)
return chart_yaml.get("appVersion", "")
def get_gradle_version(path):
"""
Extracts the version from build.gradle.
Args:
path (str): The file path to the build.gradle.
Returns:
str: The version if found, otherwise an empty string.
"""
with open(path, encoding="utf-8") as file:
for line in file:
if "version =" in line:
# Extracts the value after 'version ='
return re.search(r'version\s*=\s*[\'"](.+?)[\'"]', line).group(1)
return ""
def update_chart_version(path, new_version):
"""
Updates the appVersion in Chart.yaml with a new version.
Args:
path (str): The file path to the Chart.yaml.
new_version (str): The new version to update to.
"""
with open(path, encoding="utf-8") as file:
chart_yaml = yaml.safe_load(file)
chart_yaml["appVersion"] = new_version
with open(path, "w", encoding="utf-8") as file:
yaml.safe_dump(chart_yaml, file)
# Main logic
chart_version = get_chart_version(chart_yaml_path)
gradle_version = get_gradle_version(gradle_path)
if chart_version != gradle_version:
print(
f"Versions do not match. Updating Chart.yaml from {chart_version} to {gradle_version}."
)
update_chart_version(chart_yaml_path, gradle_version)
else:
print("Versions match. No update required.")

40
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: "Build repo"
on:
push:
branches: [ "main" ]
paths-ignore:
- ".github/**"
- "**/*.md"
pull_request:
branches: [ "main" ]
paths-ignore:
- ".github/**"
- "**/*.md"
jobs:
build:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- uses: gradle/gradle-build-action@v2.4.2
with:
gradle-version: 7.6
arguments: build --no-build-cache

View File

@@ -1,55 +0,0 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
name: "Build repo"
on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '15 12 * * 1'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
# - name: Initialize CodeQL
# uses: github/codeql-action/init@v2
# with:
# languages: java
- uses: gradle/gradle-build-action@v2.4.2
with:
gradle-version: 7.6
arguments: assemble --no-build-cache
#- name: Perform CodeQL analysis
# uses: github/codeql-action/analyze@v2

61
.github/workflows/licenses-update.yml vendored Normal file
View File

@@ -0,0 +1,61 @@
name: License Report Workflow
on:
push:
branches:
- main
paths:
- 'build.gradle'
permissions:
contents: write
pull-requests: write
jobs:
generate-license-report:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Run Gradle Command
run: ./gradlew clean generateLicenseReport
- name: Move and Rename License File
run: |
mv build/reports/dependency-license/index.json src/main/resources/static/3rdPartyLicenses.json
- name: Set up git config
run: |
git config --global user.email "GitHub Action <action@github.com>"
git config --global user.name "GitHub Action <action@github.com>"
- name: Run git add
run: |
git add src/main/resources/static/3rdPartyLicenses.json
git diff --staged --quiet || echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
- name: Create Pull Request
if: env.CHANGES_DETECTED == 'true'
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update 3rd Party Licenses"
committer: GitHub Action <action@github.com>
author: GitHub Action <action@github.com>
signoff: true
branch: update-3rd-party-licenses
title: "Update 3rd Party Licenses"
body: |
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
draft: false
delete-branch: true

View File

@@ -3,36 +3,41 @@ name: Push Docker Image with VersionNumber
on:
workflow_dispatch:
push:
branches:
branches:
- master
- main
permissions:
contents: read
packages: write
jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.2
- name: Set up JDK 17
uses: actions/setup-java@v3.11.0
with:
java-version: '17'
distribution: 'temurin'
- uses: gradle/gradle-build-action@v2.4.2
env:
DOCKER_ENABLE_SECURITY: false
with:
gradle-version: 7.6
arguments: clean build
- name: Make Gradle wrapper executable
run: chmod +x gradlew
- name: Get version number
id: versionNumber
run: echo "::set-output name=versionNumber::$(./gradlew printVersion --quiet | tail -1)"
- name: Login to Docker Hub
uses: docker/login-action@v2.1.0
with:
@@ -46,13 +51,17 @@ jobs:
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Convert repository owner to lowercase
id: repoowner
run: echo "::set-output name=lowercase::$(echo ${{ github.repository_owner }} | awk '{print tolower($0)}')"
- name: Generate tags
id: meta
uses: docker/metadata-action@v4.4.0
with:
images: |
${{ secrets.DOCKER_HUB_USERNAME }}/s-pdf
ghcr.io/${{ github.repository_owner }}/s-pdf
ghcr.io/${{ steps.repoowner.outputs.lowercase }}/s-pdf
tags: |
type=raw,value=${{ steps.versionNumber.outputs.versionNumber }},enable=${{ github.ref == 'refs/heads/master' }}
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
@@ -74,34 +83,36 @@ jobs:
cache-to: type=gha,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args:
VERSION_TAG=${{ steps.versionNumber.outputs.versionNumber }}
platforms: linux/amd64,linux/arm64/v8
- name: Generate tags
- name: Generate tags ultra-lite
id: meta2
uses: docker/metadata-action@v4.4.0
if: github.ref != 'refs/heads/main'
with:
images: |
${{ secrets.DOCKER_HUB_USERNAME }}/s-pdf
ghcr.io/${{ github.repository_owner }}/s-pdf
ghcr.io/${{ steps.repoowner.outputs.lowercase }}/s-pdf
tags: |
type=raw,value=${{ steps.versionNumber.outputs.versionNumber }}-ultra-light,enable=${{ github.ref == 'refs/heads/master' }}
type=raw,value=latest-ultra-light,enable=${{ github.ref == 'refs/heads/master' }}
type=raw,value=alpha-ultra-light,enable=${{ github.ref == 'refs/heads/main' }}
- name: Convert repository owner to lowercase
id: repoowner
run: echo "::set-output name=lowercase::$(echo ${{ github.repository_owner }} | awk '{print tolower($0)}')"
type=raw,value=${{ steps.versionNumber.outputs.versionNumber }}-ultra-lite,enable=${{ github.ref == 'refs/heads/master' }}
type=raw,value=latest-ultra-lite,enable=${{ github.ref == 'refs/heads/master' }}
- name: Build and push Dockerfile-ultralite
- name: Build and push Dockerfile-ultra-lite
uses: docker/build-push-action@v4.0.0
if: github.ref != 'refs/heads/main'
with:
context: .
file: ./Dockerfile-ultralite
file: ./Dockerfile-ultra-lite
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta2.outputs.tags }}
labels: ${{ steps.meta2.outputs.labels }}
platforms: linux/amd64,linux/arm64/v8
build-args:
VERSION_TAG=${{ steps.versionNumber.outputs.versionNumber }}
platforms: linux/amd64,linux/arm64/v8

57
.github/workflows/releaseArtifacts.yml vendored Normal file
View File

@@ -0,0 +1,57 @@
name: Release Artifacts
on:
release:
types: [created]
permissions:
contents: write
packages: write
jobs:
push:
runs-on: ubuntu-latest
strategy:
matrix:
enable_security: [true, false]
include:
- enable_security: true
file_suffix: '-with-login'
- enable_security: false
file_suffix: ''
steps:
- uses: actions/checkout@v3.5.2
- name: Set up JDK 17
uses: actions/setup-java@v3.11.0
with:
java-version: '17'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Generate jar (With Security=${{ matrix.enable_security }})
run: ./gradlew clean createExe
env:
DOCKER_ENABLE_SECURITY: ${{ matrix.enable_security }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./build/launch4j/Stirling-PDF.exe
asset_name: Stirling-PDF${{ matrix.file_suffix }}.exe
tag: ${{ github.ref }}
overwrite: true
- name: Get version number
id: versionNumber
run: echo "::set-output name=versionNumber::$(./gradlew printVersion --quiet | tail -1)"
- name: Upload jar binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./build/libs/Stirling-PDF-${{ steps.versionNumber.outputs.versionNumber }}.jar
asset_name: Stirling-PDF${{ matrix.file_suffix }}.jar
tag: ${{ github.ref }}
overwrite: true

38
.github/workflows/swagger.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: Update Swagger
on:
workflow_dispatch:
push:
branches:
- master
jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.2
- name: Set up JDK 17
uses: actions/setup-java@v3.11.0
with:
java-version: '17'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Generate Swagger documentation
run: ./gradlew generateOpenApiDocs
- name: Upload Swagger Documentation to SwaggerHub
run: ./gradlew swaggerhubUpload
env:
SWAGGERHUB_API_KEY: ${{ secrets.SWAGGERHUB_API_KEY }}
- name: Set API version as published and default on SwaggerHub
run: |
curl -X PUT -H "Authorization: ${SWAGGERHUB_API_KEY}" "https://api.swaggerhub.com/apis/Frooodle/Stirling-PDF/${{ steps.versionNumber.outputs.versionNumber }}/settings/lifecycle" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"published\":true,\"default\":true}"
env:
SWAGGERHUB_API_KEY: ${{ secrets.SWAGGERHUB_API_KEY }}

51
.github/workflows/sync_versions.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
name: Sync Versions
on:
push:
branches:
- main
paths:
- "build.gradle"
permissions:
contents: write
pull-requests: write
jobs:
sync-versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- name: Set up Python
uses: actions/setup-python@v5.0.0
with:
python-version: '3.x'
- name: Install dependencies
run: pip install pyyaml
- name: Sync versions
run: python .github/scripts/gradle_to_chart.py
- name: Set up git config
run: |
git config --global user.email "GitHub Action <action@github.com>"
git config --global user.name "GitHub Action <action@github.com>"
- name: Run git add
run: |
git add .
git diff --staged --quiet || git commit -m ":floppy_disk: Sync Versions
> Made via sync_versions.yml" || echo "no changes"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update files
committer: GitHub Action <action@github.com>
author: GitHub Action <action@github.com>
signoff: true
branch: sync_version
title: ":floppy_disk: Update Version"
body: |
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
draft: false
delete-branch: true

56
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,56 @@
name: Docker Compose Tests
on:
pull_request:
paths:
- 'src/**'
- '**.gradle'
- '!src/main/java/resources/messages*'
- 'exampleYmlFiles/**'
- 'Dockerfile'
- 'Dockerfile**'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Java 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Run Docker Compose Tests
run: |
chmod +x ./gradlew
- name: Get version number
id: versionNumber
run: echo "::set-output name=versionNumber::$(./gradlew printVersion --quiet | tail -1)"
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ steps.versionNumber.outputs.versionNumber }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Install Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.6.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run Docker Compose Tests
run: |
chmod +x ./test.sh
./test.sh

17
.gitignore vendored
View File

@@ -14,6 +14,14 @@ local.properties
.recommenders
.classpath
.project
version.properties
pipeline/watchedFolders/
pipeline/finishedFolders/
#### Stirling-PDF Files ###
customFiles/
configs/
watchedFolders/
# Gradle
.gradle
@@ -108,7 +116,12 @@ local.properties
*.zip
*.tar.gz
*.rar
*.db
/build
/.vscode
/.vscode
/.idea
# Ignore Mac DS_Store files
.DS_Store
**/.DS_Store

37
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,37 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.1
hooks:
- id: ruff
args:
- --fix
- --line-length=127
files: ^((.github/scripts)/.+)?[^/]+\.py$
- id: ruff-format
files: ^((.github/scripts)/.+)?[^/]+\.py$
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
args:
- --ignore-words-list=
- --skip="./.*,*.csv,*.json,*.ambr"
- --quiet-level=2
files: \.(properties|html|css|js|py|md)$
exclude: (.vscode|.devcontainer|src/main/resources|Dockerfile)
- repo: local
hooks:
- id: check-duplicate-properties-keys
name: Check Duplicate Properties Keys
entry: python .github/scripts/check_duplicates.py
language: python
files: ^(src)/.+\.properties$
- repo: local
hooks:
- id: check-html-tabs
name: Check HTML for tabs
# args: ["--replace_with= "]
entry: python .github/scripts/check_tabulator.py
language: python
exclude: ^src/main/resources/static/pdfjs/
files: ^.*(\.html|\.css|\.js)$

1
CNAME
View File

@@ -1 +0,0 @@
stirlingtools.com

40
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,40 @@
# Contributing to Stirling-PDF
Thank you for your interest in contributing to Stirling-PDF! There are many ways to contribute other than writing code. For example, reporting bugs, creating suggestions, and adding or modifying translations.
## Issue Guidelines
Issues can be used to report bugs, request features, or ask questions. If you have a question, you could also ask us in our [Discord](https://discord.gg/FJUSXUSYec).
Before opening an issue, please check to make sure someone hasn't already opened an issue about it.
## Pull Requests
Before you start working on an issue, please comment on (or create) the issue and wait for it to be assigned to you. If someone has already been assigned but didn't have the time to work on it lately, please communicate with them and ask if they're still working on it. This is to avoid multiple people working on the same issue.
Once you have been assigned an issue, you can start working on it. When you are ready to submit your changes, open a pull request.
For a detailed pull request tutorial, see [this guide](https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github).
Please make sure your Pull Request adheres to the following guidelines:
- Use the PR template provided.
- Keep your Pull Request title succinct, detailed and to the point.
- Keep commits atomic. One commit should contain one change. If you want to make multiple changes, submit multiple Pull Requests.
- Commits should be clear, concise and easy to understand.
- References to the Issue number in the Pull Request and/or Commit message.
## Translations
If you would like to add or modify a translation, please see [How to add new languages to Stirling-PDF](HowToAddNewLanguage.md). Also, please create a Pull Request so others can use it!
## Fixing Bugs or Adding a New Feature
First, make sure you've read the section [Pull Requests](#pull-requests).
To build from source, please follow this [Guide](LocalRunGuide.md).
If, at any point of time, you have a question, please feel free to ask in the same issue thread or in our [Discord](https://discord.gg/FJUSXUSYec).
## License
By contributing to this project, you agree that your contributions will be licensed under the [GPL 3 License](LICENSE). You also acknowledge and agree that your contributions will be included in Stirling-PDF and that they can be relicensed in the future under the MPL 2.0 (Mozilla Public License Version 2.0) license.

View File

@@ -1,22 +1,67 @@
# Build jbig2enc in a separate stage
FROM frooodle/stirling-pdf-base:beta2
# Create scripts folder and copy local scripts
RUN mkdir /scripts
COPY ./scripts/* /scripts/
# Copy the application JAR file
COPY build/libs/*.jar app.jar
# Expose the application port
EXPOSE 8080
# Set environment variables
ENV APP_HOME_NAME="Stirling PDF"
#ENV APP_HOME_DESCRIPTION="Personal PDF Website!"
#ENV APP_NAVBAR_NAME="Stirling PDF"
# Run the application
RUN chmod +x /scripts/init.sh
ENTRYPOINT ["/scripts/init.sh"]
CMD ["java", "-jar", "/app.jar"]
# Main stage
FROM alpine:20240329
# Copy necessary files
COPY scripts /scripts
COPY pipeline /pipeline
COPY src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto
COPY src/main/resources/static/fonts/*.otf /usr/share/fonts/opentype/noto
COPY build/libs/*.jar app.jar
ARG VERSION_TAG
# Set Environment Variables
ENV DOCKER_ENABLE_SECURITY=false \
VERSION_TAG=$VERSION_TAG \
JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -XX:MaxRAMPercentage=75" \
HOME=/home/stirlingpdfuser \
PUID=1000 \
PGID=1000 \
UMASK=022
# JDK for app
RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/apk/repositories && \
echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/community" | tee -a /etc/apk/repositories && \
echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" | tee -a /etc/apk/repositories && \
apk add --no-cache \
ca-certificates \
tzdata \
tini \
bash \
curl \
openjdk17-jre \
su-exec \
font-noto-cjk \
shadow \
# Doc conversion
libreoffice@testing \
# pdftohtml
poppler-utils \
# OCR MY PDF (unpaper for descew and other advanced featues)
ocrmypdf \
tesseract-ocr-data-eng \
# CV
py3-opencv \
# python3/pip
python3 && \
wget https://bootstrap.pypa.io/get-pip.py -qO - | python3 - --break-system-packages --no-cache-dir --upgrade && \
# uno unoconv and HTML
pip install --break-system-packages --no-cache-dir --upgrade unoconv WeasyPrint && \
mv /usr/share/tessdata /usr/share/tessdata-original && \
mkdir -p $HOME /configs /logs /customFiles /pipeline/watchedFolders /pipeline/finishedFolders && \
fc-cache -f -v && \
chmod +x /scripts/* && \
chmod +x /scripts/init.sh && \
# User permissions
addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \
chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline && \
chown stirlingpdfuser:stirlingpdfgroup /app.jar && \
tesseract --list-langs
EXPOSE 8080
# Set user and run command
ENTRYPOINT ["tini", "--", "/scripts/init.sh"]
CMD ["java", "-Dfile.encoding=UTF-8", "-jar", "/app.jar"]

51
Dockerfile-ultra-lite Normal file
View File

@@ -0,0 +1,51 @@
# use alpine
FROM alpine:3.19.1
ARG VERSION_TAG
# Set Environment Variables
ENV DOCKER_ENABLE_SECURITY=false \
HOME=/home/stirlingpdfuser \
VERSION_TAG=$VERSION_TAG \
JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -XX:MaxRAMPercentage=75" \
PUID=1000 \
PGID=1000 \
UMASK=022
# Copy necessary files
COPY scripts/download-security-jar.sh /scripts/download-security-jar.sh
COPY scripts/init-without-ocr.sh /scripts/init-without-ocr.sh
COPY pipeline /pipeline
COPY build/libs/*.jar app.jar
# Set up necessary directories and permissions
RUN mkdir /configs /logs /customFiles && \
chmod +x /scripts/*.sh && \
apk add --no-cache \
ca-certificates \
tzdata \
tini \
bash \
curl \
su-exec \
shadow \
openjdk17-jre && \
echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/apk/repositories && \
echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/community" | tee -a /etc/apk/repositories && \
echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" | tee -a /etc/apk/repositories && \
# User permissions
addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \
chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /configs /customFiles /pipeline && \
chown stirlingpdfuser:stirlingpdfgroup /app.jar
# Set environment variables
ENV ENDPOINTS_GROUPS_TO_REMOVE=CLI
EXPOSE 8080
ENTRYPOINT ["tini", "--", "/scripts/init-without-ocr.sh"]
# Run the application
CMD ["java", "-Dfile.encoding=UTF-8", "-jar", "/app.jar"]

View File

@@ -1,14 +0,0 @@
# Build jbig2enc in a separate stage
FROM openjdk:17-jdk-slim
# Copy the application JAR file
COPY build/libs/*.jar app.jar
# Expose the application port
EXPOSE 8080
# Set environment variables
ENV GROUPS_TO_REMOVE=LibreOffice,CLI
# Run the application
CMD ["java", "-jar", "/app.jar"]

View File

@@ -1,62 +0,0 @@
# Build jbig2enc in a separate stage
FROM debian:bullseye-slim as jbig2enc_builder
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
automake \
autoconf \
libtool \
libleptonica-dev \
pkg-config \
ca-certificates \
zlib1g-dev \
make \
g++
RUN git clone https://github.com/agl/jbig2enc && \
cd jbig2enc && \
./autogen.sh && \
./configure && \
make && \
make install
# Main stage
FROM openjdk:17-jdk-slim AS base
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libreoffice-core-nogui \
libreoffice-common \
libreoffice-writer-nogui \
libreoffice-calc-nogui \
libreoffice-impress-nogui \
python3-uno \
python3-pip \
unoconv \
pngquant \
unpaper \
ocrmypdf && \
rm -rf /var/lib/apt/lists/* && \
mkdir /usr/share/tesseract-ocr-original && \
cp -r /usr/share/tesseract-ocr/* /usr/share/tesseract-ocr-original && \
rm -rf /usr/share/tesseract-ocr
# Python packages stage
FROM base AS python-packages
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
libffi-dev \
libssl-dev \
zlib1g-dev \
libjpeg-dev && \
pip install --upgrade pip && \
pip install --no-cache-dir \
opencv-python-headless && \
rm -rf /var/lib/apt/lists/*
# Final stage: Copy necessary files from the previous stage
FROM base
COPY --from=python-packages /usr/local /usr/local
COPY --from=jbig2enc_builder /usr/local/bin/jbig2 /usr/local/bin/jbig2

46
Endpoint-groups.md Normal file
View File

@@ -0,0 +1,46 @@
| Operation | PageOps | Convert | Security | Other | CLI | Python | OpenCV | LibreOffice | OCRmyPDF | Java | Javascript |
|---------------------|---------|---------|----------|-------|------|--------|--------|-------------|----------|----------|------------|
| adjust-contrast | ✔️ | | | | | | | | | | ✔️ |
| auto-split-pdf | ✔️ | | | | | | | | | ✔️ | |
| crop | ✔️ | | | | | | | | | ✔️ | |
| extract-page | ✔️ | | | | | | | | | ✔️ | |
| merge-pdfs | ✔️ | | | | | | | | | ✔️ | |
| multi-page-layout | ✔️ | | | | | | | | | ✔️ | |
| pdf-organizer | ✔️ | | | | | | | | | ✔️ | ✔️ |
| pdf-to-single-page | ✔️ | | | | | | | | | ✔️ | |
| remove-pages | ✔️ | | | | | | | | | ✔️ | |
| rotate-pdf | ✔️ | | | | | | | | | ✔️ | |
| scale-pages | ✔️ | | | | | | | | | ✔️ | |
| split-pdfs | ✔️ | | | | | | | | | ✔️ | |
| file-to-pdf | | ✔️ | | | ✔️ | | | ✔️ | | | |
| img-to-pdf | | ✔️ | | | | | | | | ✔️ | |
| pdf-to-html | | ✔️ | | | ✔️ | | | ✔️ | | | |
| pdf-to-img | | ✔️ | | | | | | | | ✔️ | |
| pdf-to-pdfa | | ✔️ | | | ✔️ | | | | ✔️ | | |
| pdf-to-markdown | | ✔️ | | | | | | | | ✔️ | |
| pdf-to-presentation | | ✔️ | | | ✔️ | | | ✔️ | | | |
| pdf-to-text | | ✔️ | | | ✔️ | | | ✔️ | | | |
| pdf-to-word | | ✔️ | | | ✔️ | | | ✔️ | | | |
| pdf-to-xml | | ✔️ | | | ✔️ | | | ✔️ | | | |
| xlsx-to-pdf | | ✔️ | | | ✔️ | | | ✔️ | | | |
| add-password | | | ✔️ | | | | | | | ✔️ | |
| add-watermark | | | ✔️ | | | | | | | ✔️ | |
| cert-sign | | | ✔️ | | | | | | | ✔️ | |
| change-permissions | | | ✔️ | | | | | | | ✔️ | |
| remove-password | | | ✔️ | | | | | | | ✔️ | |
| sanitize-pdf | | | ✔️ | | | | | | | ✔️ | |
| add-image | | | | ✔️ | | | | | | ✔️ | |
| add-page-numbers | | | | ✔️ | | | | | | ✔️ | |
| auto-rename | | | | ✔️ | | | | | | ✔️ | |
| change-metadata | | | | ✔️ | | | | | | ✔️ | |
| compare | | | | ✔️ | | | | | | | ✔️ |
| compress-pdf | | | | ✔️ | ✔️ | | | | ✔️ | | |
| extract-image-scans | | | | ✔️ | ✔️ | ✔️ | ✔️ | | | | |
| extract-images | | | | ✔️ | | | | | | ✔️ | |
| flatten | | | | ✔️ | | | | | | | ✔️ |
| get-info-on-pdf | | | | ✔️ | | | | | | ✔️ | |
| ocr-pdf | | | | ✔️ | ✔️ | | | | ✔️ | | |
| remove-blanks | | | | ✔️ | ✔️ | ✔️ | ✔️ | | | | |
| repair | | | | ✔️ | ✔️ | | | ✔️ | | | |
| show-javascript | | | | ✔️ | | | | | | | ✔️ |
| sign | | | | ✔️ | | | | | | | ✔️ |

33
FolderScanning.md Normal file
View File

@@ -0,0 +1,33 @@
## User Guide for Local Directory Scanning and File Processing
### Setting Up Watched Folders:
- Create a folder where you want your files to be monitored. This is your 'watched folder'.
- The default directory for this is `./pipeline/watchedFolders/`
- Place any directories you want to be scanned into this folder, this folder should contain multiple folders each for their own tasks and pipelines.
### Configuring Processing with JSON Files:
- In each directory you want processed (e.g `./pipeline/watchedFolders/officePrinter`), include a JSON configuration file.
- This JSON file should specify how you want the files in the directory to be handled (e.g., what operations to perform on them) which can be made, configured and downloaded from Stirling-PDF Pipeline interface.r
### Automatic Scanning and Processing:
- The system automatically checks the watched folder every minute for new directories and files to process.
- When a directory with a valid JSON configuration file is found, it begins processing the files inside as per the configuration.
### Processing Steps:
- Files in each directory are processed according to the instructions in the JSON file.
- This might involve file conversions, data filtering, renaming files, etc. If the output of a step is a zip, this zip will be automatically unzipped as it passes to next process.
### Results and Output:
- After processing, the results are saved in a specified output location. This could be a different folder or location as defined in the JSON file or the default location `./pipeline/finishedFolders/`.
- Each processed file is named and organized according to the rules set in the JSON configuration.
### Completion and Cleanup:
- Once processing is complete, the original files in the watched folder's directory are removed.
- You can find the processed files in the designated output location.
### Error Handling:
- If there's an error during processing, the system will not delete the original files, allowing you to check and retry if necessary.
### User Interaction:
- As a user, your main tasks are to set up the watched folders, place directories with files for processing, and create the corresponding JSON configuration files.
- The system handles the rest, including scanning, processing, and outputting results.

View File

@@ -1,4 +1,4 @@
<p align="center"><img src="https://raw.githubusercontent.com/Frooodle/Stirling-PDF/main/docs/stirling.png" width="80" ><br><h1 align="center">Stirling-PDF</h1>
<p align="center"><img src="https://raw.githubusercontent.com/Stirling-Tools/Stirling-PDF/main/docs/stirling.png" width="80" ><br><h1 align="center">Stirling-PDF</h1>
</p>
@@ -8,31 +8,31 @@ 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
and add a flag svg file to
https://github.com/Frooodle/Stirling-PDF/tree/main/src/main/resources/static/images/flags
https://github.com/Stirling-Tools/Stirling-PDF/blob/main/src/main/resources/templates/fragments/languages.html
and add a flag svg file to
https://github.com/Stirling-Tools/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/)
If your language isnt represented by a flag just find whichever closely matches it, such as for Arabic i chose Saudi Arabia
If your language isn't represented by a flag just find whichever closely matches it, such as for Arabic i chose Saudi Arabia
For example to add Polish you would add
```
For example to add Polish you would add
```html
<a class="dropdown-item lang_dropdown-item" href="" data-language-code="pl_PL">
<img src="images/flags/pl.svg" alt="icon" width="20" height="15"> Polski
</a>
```
The data-language-code is the code used to reference the file in the next step.
Start by copying the existing english property file
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/Stirling-Tools/Stirling-PDF/blob/main/src/main/resources/messages_en_GB.properties](https://github.com/Stirling-Tools/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
Then simply translate all property entries within that file and make a PR into main for others to use!
If you do not have a java IDE i am happy to verify the changes worked once you raise PR (but wont be able to verify the translations themselves)
If you do not have a java IDE i am happy to verify the changes worked once you raise PR (but won't be able to verify the translations themselves)

View File

@@ -2,9 +2,12 @@
This document provides instructions on how to add additional language packs for the OCR tab in Stirling-PDF, both inside and outside of Docker.
## My OCR used to work and now doesn't!
The paths have changed for the tessadata locations on new docker images, please use ``/usr/share/tessdata`` (Others should still work for backwards compatibility but might not)
## How does the OCR Work
Stirling-PDF uses OCRmyPDF which in turn uses tesseract for its text recognition.
All credit goes to them for this awesome work!
Stirling-PDF uses [OCRmyPDF](https://github.com/ocrmypdf/OCRmyPDF) which in turn uses tesseract for its text recognition.
All credit goes to them for this awesome work!
## Language Packs
@@ -18,13 +21,13 @@ Depending on your requirements, you can choose the appropriate language pack for
### Installing Language Packs
1. Download the desired language pack(s) by selecting the `.traineddata` file(s) for the language(s) you need.
2. Place the `.traineddata` files in the Tesseract tessdata directory: `/usr/share/tesseract-ocr/4.00/tessdata` (Debian) or `/usr/share/tesseract/tessdata` (Fedora)
2. Place the `.traineddata` files in the Tesseract tessdata directory: `/usr/share/tessdata`
# DO NOT REMOVE EXISTING ENG.TRAINEDDATA, ITS REQUIRED.
# DO NOT REMOVE EXISTING ENG.TRAINEDDATA, IT'S REQUIRED.
#### Docker
If you are using Docker, you need to expose the Tesseract tessdata directory as a volume in order to use the additional language packs.
If you are using Docker, you need to expose the Tesseract tessdata directory as a volume in order to use the additional language packs.
#### Docker Compose
Modify your `docker-compose.yml` file to include the following volume configuration:
@@ -34,14 +37,14 @@ services:
your_service_name:
image: your_docker_image_name
volumes:
- /location/of/trainingData:/usr/share/tesseract-ocr/4.00/tessdata
- /location/of/trainingData:/usr/share/tessdata
```
#### Docker run
Add the following to your existing docker run command
```bash
-v /location/of/trainingData:/usr/share/tesseract-ocr/4.00/tessdata
-v /location/of/trainingData:/usr/share/tessdata
```
#### Non-Docker

76
Jenkinsfile vendored
View File

@@ -1,33 +1,45 @@
pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'chmod 755 gradlew'
sh './gradlew build'
}
}
stage('Docker Build') {
steps {
script {
def appVersion = sh(returnStdout: true, script: './gradlew printVersion -q').trim()
def image = "frooodle/s-pdf:$appVersion"
sh "docker build -t $image ."
}
}
}
stage('Docker Push') {
steps {
script {
def appVersion = sh(returnStdout: true, script: './gradlew printVersion -q').trim()
def image = "frooodle/s-pdf:$appVersion"
withCredentials([string(credentialsId: 'docker_hub_access_token', variable: 'DOCKER_HUB_ACCESS_TOKEN')]) {
sh "docker login --username frooodle --password $DOCKER_HUB_ACCESS_TOKEN"
sh "docker push $image"
}
}
}
}
}
pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'chmod 755 gradlew'
sh './gradlew build'
}
}
stage('Docker Build') {
steps {
script {
def appVersion = sh(returnStdout: true, script: './gradlew printVersion -q').trim()
def image = "frooodle/s-pdf:$appVersion"
sh "docker build -t $image ."
}
}
}
stage('Docker Push') {
steps {
script {
def appVersion = sh(returnStdout: true, script: './gradlew printVersion -q').trim()
def image = "frooodle/s-pdf:$appVersion"
withCredentials([string(credentialsId: 'docker_hub_access_token', variable: 'DOCKER_HUB_ACCESS_TOKEN')]) {
sh "docker login --username frooodle --password $DOCKER_HUB_ACCESS_TOKEN"
sh "docker push $image"
}
}
}
}
stage('Helm Push') {
steps {
script {
//TODO: Read chartVersion from Chart.yaml
def chartVersion = '1.0.0'
withCredentials([string(credentialsId: 'docker_hub_access_token', variable: 'DOCKER_HUB_ACCESS_TOKEN')]) {
sh "docker login --username frooodle --password $DOCKER_HUB_ACCESS_TOKEN"
sh "helm package chart/stirling-pdf"
sh "helm push stirling-pdf-chart-1.0.0.tgz oci://registry-1.docker.io/frooodle"
}
}
}
}
}
}

811
LICENSE
View File

@@ -1,201 +1,674 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
1. Definitions.
Preamble
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
The precise terms and conditions for copying, distribution and
modification follow.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
TERMS AND CONDITIONS
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
0. Definitions.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
"This License" refers to version 3 of the GNU General Public License.
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
A "covered work" means either the unmodified Program or a work based
on the Program.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
1. Source Code.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
END OF TERMS AND CONDITIONS
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
APPENDIX: How to apply the Apache License to your work.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
Copyright [yyyy] [name of copyright owner]
The Corresponding Source for a work in source code form is that
same work.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
2. Basic Permissions.
http://www.apache.org/licenses/LICENSE-2.0
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@@ -1,5 +1,5 @@
To run the application without Docker, you will need to manually install all dependencies and build the necessary components.
To run the application without Docker/Podman, you will need to manually install all dependencies and build the necessary components.
Note that some dependencies might not be available in the standard repositories of all Linux distributions, and may require additional steps to install.
@@ -8,6 +8,8 @@ The following guide assumes you have a basic understanding of using a command li
It should work on most Linux distributions and MacOS. For Windows, you might need to use Windows Subsystem for Linux (WSL) for certain steps.
The amount of dependencies is to actually reduce overall size, ie installing LibreOffice sub components rather than full LibreOffice package.
You could theoretically use a Distrobox/Toolbox, if your Distribution has old or not all Packages. But you might just as well use the Docker Container then.
### Step 1: Prerequisites
Install the following software, if not already installed:
@@ -18,7 +20,7 @@ Install the following software, if not already installed:
- Git
- Python 3 (with pip)
- Python 3.8 (with pip)
- Make
@@ -40,10 +42,10 @@ For Debian-based systems, you can use the following command:
```bash
sudo apt-get update
sudo apt-get install -y git automake autoconf libtool libleptonica-dev pkg-config zlib1g-dev make g++ java-17-openjdk python3 python3-pip
sudo apt-get install -y git automake autoconf libtool libleptonica-dev pkg-config zlib1g-dev make g++ openjdk-17-jdk python3 python3-pip
```
For Fedora-based systems use this command:
For Fedora-based systems use this command:
```bash
sudo dnf install -y git automake autoconf libtool leptonica-devel pkg-config zlib-devel make gcc-c++ java-17-openjdk python3 python3-pip
@@ -63,7 +65,7 @@ sudo make install
```
### Step 3: Install Additional Software
Next we need to install LibreOffice for conversions, ocrmypdf for OCR, and opencv for patern recognition functionality.
Next we need to install LibreOffice for conversions, ocrmypdf for OCR, and opencv for pattern recognition functionality.
Install the following software:
@@ -93,21 +95,21 @@ For Debian-based systems, you can use the following command:
```bash
sudo apt-get install -y libreoffice-writer libreoffice-calc libreoffice-impress unpaper ocrmypdf
pip3 install uno opencv-python-headless unoconv pngquant
pip3 install uno opencv-python-headless unoconv pngquant WeasyPrint --break-system-packages
```
For Fedora:
```bash
sudo dnf install -y libreoffice-writer libreoffice-calc libreoffice-impress unpaper ocrmypdf
pip3 install uno opencv-python-headless unoconv pngquant
pip3 install uno opencv-python-headless unoconv pngquant WeasyPrint
```
### Step 4: Clone and Build Stirling-PDF
```bash
cd ~/.git &&\
git clone https://github.com/Frooodle/Stirling-PDF.git &&\
git clone https://github.com/Stirling-Tools/Stirling-PDF.git &&\
cd Stirling-PDF &&\
chmod +x ./gradlew &&\
./gradlew build
@@ -123,7 +125,7 @@ This folder is required for the python scripts using OpenCV
```bash
sudo mkdir /opt/Stirling-PDF &&\
sudo mv /build/libs/S-PDF-*.jar /opt/Stirling-PDF/ &&\
sudo mv ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/ &&\
sudo mv scripts /opt/Stirling-PDF/ &&\
echo "Scripts installed."
```
@@ -137,8 +139,8 @@ Easiest is to use the langpacks provided by your repositories. Skip the other st
Manual:
1. Download the desired language pack(s) by selecting the `.traineddata` file(s) for the language(s) you need.
2. Place the `.traineddata` files in the Tesseract tessdata directory: `/usr/share/tesseract-ocr/4.00/tessdata`
3.
2. Place the `.traineddata` files in the Tesseract tessdata directory: `/usr/share/tessdata`
3.
Please view [OCRmyPDF install guide](https://ocrmypdf.readthedocs.io/en/latest/installation.html) for more info.
**IMPORTANT:** DO NOT REMOVE EXISTING `eng.traineddata`, IT'S REQUIRED.
@@ -174,7 +176,7 @@ rpm -qa | grep tesseract-langpack | sed 's/tesseract-langpack-//g'
```bash
./gradlew bootRun
or
java -jar build/libs/app.jar
java -jar /opt/Stirling-PDF/Stirling-PDF-*.jar
```
### Step 8: Adding a Desktop icon
@@ -200,14 +202,72 @@ EOF
Note: Currently the app will run in the background until manually closed.
### Optional: Run Stirling-PDF as a service
First create a .env file, where you can store environment variables:
```
touch /opt/Stirling-PDF/.env
```
In this file you can add all variables, one variable per line, as stated in the main readme (for example SYSTEM_DEFAULTLOCALE="de-DE").
Create a new file where we store our service settings and open it with nano editor:
```
nano /etc/systemd/system/stirlingpdf.service
```
Paste this content, make sure to update the filename of the jar-file. Press Ctrl+S and Ctrl+X to save and exit the nano editor:
```
[Unit]
Description=Stirling-PDF service
After=syslog.target network.target
[Service]
SuccessExitStatus=143
User=root
Group=root
Type=simple
EnvironmentFile=/opt/Stirling-PDF/.env
WorkingDirectory=/opt/Stirling-PDF
ExecStart=/usr/bin/java -jar Stirling-PDF-0.17.2.jar
ExecStop=/bin/kill -15 $MAINPID
[Install]
WantedBy=multi-user.target
```
Notify systemd that it has to rebuild its internal service database (you have to run this command every time you make a change in the service file):
```
sudo systemctl daemon-reload
```
Enable the service to tell the service to start it automatically:
```
sudo systemctl enable stirlingpdf.service
```
See the status of the service:
```
sudo systemctl status stirlingpdf.service
```
Manually start/stop/restart the service:
```
sudo systemctl start stirlingpdf.service
sudo systemctl stop stirlingpdf.service
sudo systemctl restart stirlingpdf.service
```
---
Remember to set the necessary environment variables before running the project if you want to customize the application the list can be seen in the main readme.
You can do this in the terminal by using the `export` command or -D arguements to java -jar command:
You can do this in the terminal by using the `export` command or -D argument to java -jar command:
```bash
export APP_HOME_NAME="Stirling PDF"
or
-DAPP_HOME_NAME="Stirling PDF"
-DAPP_HOME_NAME="Stirling PDF"
```

44
PipelineFeature.md Normal file
View File

@@ -0,0 +1,44 @@
# Pipeline Configuration and Usage Tutorial
- Configure the pipeline config file and input files to run files against it
- For reuse, download the config file and re-upload it when needed, or place it in /pipeline/defaultWebUIConfigs/ to auto-load in the web UI for all users
## Steps to Configure and Use Your Pipeline
1. **Access Configuration**
- Upon entering the screen, click on the **Configure** button.
2. **Enter Pipeline Name**
- Provide a name for your pipeline in the designated field.
3. **Select Operations**
- Choose the operations for your pipeline (e.g., **Split Pages**), then click **Add Operation**.
4. **Configure Operation Settings**
- Input the necessary settings for each added operation. Settings are highlighted in yellow if customization is needed.
5. **Add More Operations**
- You can add and adjust the order of multiple operations. Ensure each operation's settings are customized.
6. **Save Settings**
- Click **Save Operation Settings** after customizing settings for each operation.
7. **Validate Pipeline**
- Use the **Validation** button to check your pipeline. A green indicator signifies correct setup; a pop-out error indicates issues.
8. **Download Pipeline Configuration**
- To use the configuration for folder scanning (or save it for future use and reupload it), you can also download a JSON file in this menu. You can also pre-load this for future use by placing it in ``/pipeline/defaultWebUIConfigs/``. It will then appear in the dropdown menu for all users to use.
9. **Submit Files for Processing**
- If your pipeline is correctly set up close the configure menu, input the files and hit **Submit**.
10. **Note on Web UI Limitations**
- The current web UI version does not support operations that require multiple different types of inputs, such as adding a separate image to a PDF.
### Current Limitations
- Cannot have more than one of the same operation
- Cannot input additional files via UI
- All files and operations run in serial mode

344
README.md
View File

@@ -1,174 +1,298 @@
<p align="center"><img src="https://raw.githubusercontent.com/Frooodle/Stirling-PDF/main/docs/stirling.png" width="80" ><br><h1 align="center">Stirling-PDF</h1>
</p>
<p align="center"><img src="https://raw.githubusercontent.com/Stirling-Tools/Stirling-PDF/main/docs/stirling.png" width="80" ></p>
<h1 align="center">Stirling-PDF</h1>
[![Docker Pulls](https://img.shields.io/docker/pulls/frooodle/s-pdf)](https://hub.docker.com/r/frooodle/s-pdf)
[![Discord](https://img.shields.io/discord/1068636748814483718?label=Discord)](https://discord.gg/Cn8pWhQRxZ)
[![Docker Image Version (tag latest semver)](https://img.shields.io/docker/v/frooodle/s-pdf/latest)](https://github.com/Frooodle/Stirling-PDF/)
[![GitHub Repo stars](https://img.shields.io/github/stars/frooodle/stirling-pdf?style=social)](https://github.com/Frooodle/stirling-pdf)
[![Docker Image Version (tag latest semver)](https://img.shields.io/docker/v/frooodle/s-pdf/latest)](https://github.com/Stirling-Tools/Stirling-PDF/)
[![GitHub Repo stars](https://img.shields.io/github/stars/stirling-tools/stirling-pdf?style=social)](https://github.com/Stirling-Tools/stirling-pdf)
[![Paypal Donate](https://img.shields.io/badge/Paypal%20Donate-yellow?style=flat&logo=paypal)](https://www.paypal.com/paypalme/froodleplex)
[![Github Sponser](https://img.shields.io/badge/Github%20Sponsor-yellow?style=flat&logo=github)](https://github.com/sponsors/Frooodle)
[![Github Sponsor](https://img.shields.io/badge/Github%20Sponsor-yellow?style=flat&logo=github)](https://github.com/sponsors/Frooodle)
This is a powerful locally hosted web based PDF manipulation tool using docker that allows you to perform various operations on PDF files, such as splitting merging, converting, reorganizing, adding images, rotating, compressing, and more. This locally hosted web application started as a 100% ChatGPT-made application and has evolved to include a wide range of features to handle all your PDF needs.
[![Deploy to DO](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/Stirling-Tools/Stirling-PDF/tree/digitalOcean&refcode=c3210994b1af)
Stirling PDF makes no outbount calls for any record keeping or tracking.
This is a robust, locally hosted web-based PDF manipulation tool using Docker. It enables you to carry out various operations on PDF files, including splitting, merging, converting, reorganizing, adding images, rotating, compressing, and more. Originally developed entirely by ChatGPT, this locally hosted web application has evolved to encompass a comprehensive set of features, addressing all your PDF requirements.
All files and PDFs are either purely client side, in server memory only during the execution of the task or within a temporay file only for execution of the task.
Any file which has been downloaded by the user will have already been deleted from the server by that time.
Stirling PDF does not initiate any outbound calls for record-keeping or tracking purposes.
Feel free to request any features or bug fixes either in github issues or our [Discord](https://discord.gg/Cn8pWhQRxZ)
All files and PDFs exist either exclusively on the client side, reside in server memory only during task execution, or temporarily reside in a file solely for the execution of the task. Any file downloaded by the user will have been deleted from the server by that point.
![stirling-home](images/stirling-home.png)
![stirling-home](images/stirling-home.jpg)
## Features
- Full intractable 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
- 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)
- Extract images from PDF
- OCR on PDF (Using OCRMyPDF)
- Edit metadata
- 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
- Dark mode support.
- Custom download options (see [here](https://github.com/Stirling-Tools/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/Stirling-Tools/Stirling-PDF/tree/main#login-authentication) for documentation)
## **PDF Features**
### **Page Operations**
- View and modify PDFs - View multi page PDFs with custom viewing sorting and searching. Plus on page edit features like annotate, draw and adding text and images. (Using PDF.js with Joxit and Liberation.Liberation fonts)
- 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.
For a overview of the tasks and the technology each uses please view [Endpoint-groups.md](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/Endpoint-groups.md)
Demo of the app is available [here](https://stirlingpdf.io). username: demo, password: demo
## Technologies used
- Spring Boot + Thymeleaf
- PDFBox
- [PDFBox](https://github.com/apache/pdfbox/tree/trunk)
- [LibreOffice](https://www.libreoffice.org/discover/libreoffice/) for advanced conversions
- [OcrMyPdf](https://github.com/ocrmypdf/OCRmyPDF)
- HTML, CSS, JavaScript
- Docker
- PDF.js
- PDF-LIB.js
- [PDF.js](https://github.com/mozilla/pdf.js)
- [PDF-LIB.js](https://github.com/Hopding/pdf-lib)
## How to use
### Locally
Please view https://github.com/Frooodle/Stirling-PDF/blob/main/LocalRunGuide.md
### Docker
Please view https://github.com/Stirling-Tools/Stirling-PDF/blob/main/LocalRunGuide.md
### Docker / Podman
https://hub.docker.com/r/frooodle/s-pdf
Stirling PDF has 2 different versions, a Full version and ultra-Lite version. Depending on the types of features you use you may want a smaller image to save on space.
To see what the different versions offer please look at our [version mapping](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/Version-groups.md)
For people that don't mind about space optimization just use the latest tag.
![Docker Image Size (tag)](https://img.shields.io/docker/image-size/frooodle/s-pdf/latest?label=Stirling-PDF%20Full)
![Docker Image Size (tag)](https://img.shields.io/docker/image-size/frooodle/s-pdf/latest-ultra-lite?label=Stirling-PDF%20Ultra-Lite)
Docker Run
```
```bash
docker run -d \
-p 8080:8080 \
-v /location/of/trainingData:/usr/share/tesseract-ocr/4.00/tessdata \
-v /location/of/trainingData:/usr/share/tessdata \
-v /location/of/extraConfigs:/configs \
-v /location/of/logs:/logs \
-e DOCKER_ENABLE_SECURITY=false \
-e INSTALL_BOOK_AND_ADVANCED_HTML_OPS=false \
--name stirling-pdf \
frooodle/s-pdf
frooodle/s-pdf:latest
Can also add these for customisation but are not required
-e APP_HOME_NAME="Stirling PDF" \
-e APP_HOME_DESCRIPTION="Your locally hosted one-stop-shop for all your PDF needs." \
-e APP_NAVBAR_NAME="Stirling PDF" \
-e ALLOW_GOOGLE_VISIBILITY="true" \
-e APP_ROOT_PATH="/" \
-e APP_LOCALE="en_GB" \
-v /location/of/customFiles:/customFiles \
```
Docker Compose
```
```yaml
version: '3.3'
services:
stirling-pdf:
image: frooodle/s-pdf
image: frooodle/s-pdf:latest
ports:
- '8080:8080'
volumes:
- /location/of/trainingData:/usr/share/tesseract-ocr/4.00/tessdata #Required for extra OCR languages
# - /location/of/extraConfigs:/configs
# environment:
# APP_LOCALE: en_GB
# APP_HOME_NAME: Stirling PDF
# APP_HOME_DESCRIPTION: Your locally hosted one-stop-shop for all your PDF needs.
# APP_NAVBAR_NAME: Stirling PDF
# APP_ROOT_PATH: /
# ALLOW_GOOGLE_VISIBILITY: true
- /location/of/trainingData:/usr/share/tessdata #Required for extra OCR languages
- /location/of/extraConfigs:/configs
# - /location/of/customFiles:/customFiles/
# - /location/of/logs:/logs/
environment:
- DOCKER_ENABLE_SECURITY=false
- INSTALL_BOOK_AND_ADVANCED_HTML_OPS=false
```
Note: Podman is CLI-compatible with Docker, so simply replace "docker" with "podman".
## Enable OCR/Compression feature
Please view https://github.com/Frooodle/Stirling-PDF/blob/main/HowToUseOCR.md
## Want to add your own language?
Stirling PDF currently supports
- English (English) (en_GB)
- Arabic (العربية) (ar_AR)
- German (Deutsch) (de_DE)
- French (Français) (fr_FR)
- Spanish (Español) (es_ES)
- Chinese (简体中文) (it_IT)
- Catalan (Català) (zh_CN)
- Italian (Italiano) (ca_CA)
- Swedish (Svenska) (sv_SE)
- Polish (Polski) (pl_PL)
Please view https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToUseOCR.md
If you want to add your own language to Stirling-PDF please refer
https://github.com/Frooodle/Stirling-PDF/blob/main/HowToAddNewLanguage.md
## Supported Languages
And please create a PR to merge it back in so others can use it!
Stirling PDF currently supports 26!
Also please note as i add new features i will google translate existing languages so that they dont lose support. This could mean that new features need grammer corrections as added.
| Language | Progress |
| ------------------------------------------- | -------------------------------------- |
| English (English) (en_GB) | ![100%](https://geps.dev/progress/100) |
| English (US) (en_US) | ![100%](https://geps.dev/progress/100) |
| Arabic (العربية) (ar_AR) | ![58%](https://geps.dev/progress/58) |
| German (Deutsch) (de_DE) | ![95%](https://geps.dev/progress/95) |
| French (Français) (fr_FR) | ![99%](https://geps.dev/progress/99) |
| Spanish (Español) (es_ES) | ![95%](https://geps.dev/progress/95) |
| Simplified Chinese (简体中文) (zh_CN) | ![99%](https://geps.dev/progress/99) |
| Traditional Chinese (繁體中文) (zh_TW) | ![97%](https://geps.dev/progress/97) |
| Catalan (Català) (ca_CA) | ![65%](https://geps.dev/progress/65) |
| Italian (Italiano) (it_IT) | ![99%](https://geps.dev/progress/99) |
| Swedish (Svenska) (sv_SE) | ![58%](https://geps.dev/progress/58) |
| Polish (Polski) (pl_PL) | ![60%](https://geps.dev/progress/60) |
| Romanian (Română) (ro_RO) | ![58%](https://geps.dev/progress/58) |
| Korean (한국어) (ko_KR) | ![92%](https://geps.dev/progress/92) |
| Portuguese Brazilian (Português) (pt_BR) | ![74%](https://geps.dev/progress/74) |
| Russian (Русский) (ru_RU) | ![92%](https://geps.dev/progress/92) |
| Basque (Euskara) (eu_ES) | ![76%](https://geps.dev/progress/76) |
| Japanese (日本語) (ja_JP) | ![92%](https://geps.dev/progress/92) |
| Dutch (Nederlands) (nl_NL) | ![92%](https://geps.dev/progress/92) |
| Greek (Ελληνικά) (el_GR) | ![77%](https://geps.dev/progress/77) |
| Turkish (Türkçe) (tr_TR) | ![99%](https://geps.dev/progress/99) |
| Indonesia (Bahasa Indonesia) (id_ID) | ![87%](https://geps.dev/progress/87) |
| Hindi (हिंदी) (hi_IN) | ![88%](https://geps.dev/progress/88) |
| Hungarian (Magyar) (hu_HU) | ![87%](https://geps.dev/progress/87) |
| Bulgarian (Български) (bg_BG) | ![82%](https://geps.dev/progress/82) |
| Sebian Latin alphabet (Srpski) (sr_LATN_RS) | ![89%](https://geps.dev/progress/89) |
## How to View
1. Open a web browser and navigate to `http://localhost:8080/`
2. Use the application by following the instructions on the website.
## Contributing (creating issues, translations, fixing bugs, etc.)
Please see our [Contributing Guide](CONTRIBUTING.md)!
## Customize App
Stirling PDF allows easy customization of the visible application name.
Simply use environment variables APP_HOME_NAME, APP_HOME_DESCRIPTION and APP_NAVBAR_NAME with Docker or Java.
If running Java directly, you can also pass these as properties using -D arguments.
## Customisation
Using the same method you can also change
Stirling PDF allows easy customization of the app.
Includes things like
- The default language by providing APP_LOCALE with values like de-DE fr-FR or ar-AR (Note the - character not _ ) to select your default language (Will always default to English on invalid locale) Current accepted locales can be seen above in the Want to add your own language section
- Enable/Disable search engine visiblility with ALLOW_GOOGLE_VISIBILITY with true / false values. Default disable visiblility.
- Change root URI for Stirling-PDF ie change server.com/ to server.com/pdf-app by running APP_ROOT_PATH as pdf-app
- Disable and remove endpoints and functionality from Stirling-PDF. Currently the endpoints ENDPOINTS_TO_REMOVE and GROUPS_TO_REMOVE can include comma seperated 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)
- Custom application name
- Custom slogans, icons, images, and even custom HTML (via file overrides)
There are two options for this, either using the generated settings file ``settings.yml``
This file is located in the ``/configs`` directory and follows standard YAML formatting
Environment variables are also supported and would override the settings file
For example in the settings.yml you have
```yaml
system:
defaultLocale: 'en-US'
```
To have this via an environment variable you would have ``SYSTEM_DEFAULTLOCALE``
The Current list of settings is
```yaml
security:
enableLogin: false # set to 'true' to enable login
csrfDisabled: true
system:
defaultLocale: 'en-US' # Set the default language (e.g. 'de-DE', 'fr-FR', etc)
googlevisibility: false # 'true' to allow Google visibility (via robots.txt), 'false' to disallow
customStaticFilePath: '/customFiles/static/' # Directory path for custom static files
#ui:
# appName: exampleAppName # Application's visible name
# homeDescription: I am a description # Short description or tagline shown on homepage.
# appNameNavbar: navbarName # Name displayed on the navigation bar
endpoints:
toRemove: [] # List endpoints to disable (e.g. ['img-to-pdf', 'remove-pages'])
groupsToRemove: [] # List groups to disable (e.g. ['LibreOffice'])
metrics:
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/Stirling-Tools/Stirling-PDF/blob/main/Endpoint-groups.md)
- 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_CONNECTIONTIMEOUTMINUTES`` to set custom connection timeout values
- ``DOCKER_ENABLE_SECURITY`` to tell docker to download security jar (required as true for auth login)
- ``INSTALL_BOOK_AND_ADVANCED_HTML_OPS`` to download calibre onto stirling-pdf enabling pdf to/from book and advanced html conversion
## API
For those wanting to use Stirling-PDFs backend API to link with their own custom scripting to edit PDFs you can view all existing API documentation
[here](https://app.swaggerhub.com/apis-docs/Frooodle/Stirling-PDF/) or navigate to /swagger-ui/index.html of your stirling-pdf instance for your versions documentation
For those wanting to use Stirling-PDFs backend API to link with their own custom scripting to edit PDFs you can view all existing API documentation
[here](https://app.swaggerhub.com/apis-docs/Stirling-Tools/Stirling-PDF/) or navigate to /swagger-ui/index.html of your stirling-pdf instance for your versions documentation (Or by following the API button in your settings of Stirling-PDF)
## 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.
- 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.
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.
To add new users go to the bottom of Account settings and hit 'Admin Settings', here you can add new users. The different roles mentioned within this are for rate limiting. This is a Work in progress which will be expanding on more in future
For API usage you must provide a header with 'X-API-Key' and the associated API key for that user.
## FAQ
### Q1: Where is the authentication for Stirling PDF
There is no Auth within Stirling PDF and there is none planned. This feature will not be added. Instead its recommended to use trusted and secure auth software like Authentik or Authelia.
### Q1: What are your planned features?
### Q2: What are your planned features
- Crop
- Progress bar/Tracking
- Annotations (Sign/draw logic directly on page)
- Full custom logic pipelines to combine multiple operations together.
- Folder support with auto scanning to perform operations on
- Redact text
- Add page numbers
- Auto rename (Renames file based on file title text)
- URL to PDF
- Change contrast
- Redact text (Via UI not just automated way)
- Add Forms
- Multi page layout (Stich PDF pages together) support x rows y columns and custom page sizing
- Fill forms manually or automatically
### Q3: Why is my application download .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.
### Q2: Why is my application downloading .htm files?
This is an issue caused commonly by your NGINX configuration. 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;``

52
Version-groups.md Normal file
View File

@@ -0,0 +1,52 @@
| Technology | Ultra-Lite | Full |
|----------------|:----------:|:----:|
| Java | ✔️ | ✔️ |
| JavaScript | ✔️ | ✔️ |
| Libre | | ✔️ |
| Python | | ✔️ |
| OpenCV | | ✔️ |
| OCRmyPDF | | ✔️ |
Operation | Ultra-Lite | Full
-------------------------|------------|-----
add-page-numbers | ✔️ | ✔️
add-password | ✔️ | ✔️
add-image | ✔️ | ✔️
add-watermark | ✔️ | ✔️
adjust-contrast | ✔️ | ✔️
auto-split-pdf | ✔️ | ✔️
auto-redact | ✔️ | ✔️
auto-rename | ✔️ | ✔️
cert-sign | ✔️ | ✔️
crop | ✔️ | ✔️
change-metadata | ✔️ | ✔️
change-permissions | ✔️ | ✔️
compare | ✔️ | ✔️
extract-page | ✔️ | ✔️
extract-images | ✔️ | ✔️
flatten | ✔️ | ✔️
get-info-on-pdf | ✔️ | ✔️
img-to-pdf | ✔️ | ✔️
markdown-to-pdf | ✔️ | ✔️
merge-pdfs | ✔️ | ✔️
multi-page-layout | ✔️ | ✔️
overlay-pdf | ✔️ | ✔️
pdf-organizer | ✔️ | ✔️
pdf-to-csv | ✔️ | ✔️
pdf-to-img | ✔️ | ✔️
pdf-to-single-page | ✔️ | ✔️
remove-pages | ✔️ | ✔️
remove-password | ✔️ | ✔️
rotate-pdf | ✔️ | ✔️
sanitize-pdf | ✔️ | ✔️
scale-pages | ✔️ | ✔️
sign | ✔️ | ✔️
show-javascript | ✔️ | ✔️
split-by-size-or-count | ✔️ | ✔️
split-pdf-by-sections | ✔️ | ✔️
split-pdfs | ✔️ | ✔️
compress-pdf | | ✔️
extract-image-scans | | ✔️
ocr-pdf | | ✔️
pdf-to-pdfa | | ✔️
remove-blanks | | ✔️

View File

@@ -1,49 +1,205 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.0.6'
id 'io.spring.dependency-management' version '1.1.0'
id 'java'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.3'
id 'org.springdoc.openapi-gradle-plugin' version '1.8.0'
id "io.swagger.swaggerhub" version "1.3.2"
id 'edu.sc.seis.launch4j' version '3.0.5'
id 'com.diffplug.spotless' version '6.25.0'
id 'com.github.jk1.dependency-license-report' version '2.6'
}
import com.github.jk1.license.render.*
group = 'stirling.software'
version = '0.8.3'
version = '0.22.8'
sourceCompatibility = '17'
repositories {
mavenCentral()
mavenCentral()
}
licenseReport {
renderers = [new JsonReportRenderer()]
}
sourceSets {
main {
java {
if (System.getenv('DOCKER_ENABLE_SECURITY') == 'false') {
exclude 'stirling/software/SPDF/config/security/**'
exclude 'stirling/software/SPDF/controller/api/UserController.java'
exclude 'stirling/software/SPDF/controller/web/AccountWebController.java'
exclude 'stirling/software/SPDF/model/ApiKeyAuthenticationToken.java'
exclude 'stirling/software/SPDF/model/Authority.java'
exclude 'stirling/software/SPDF/model/PersistentLogin.java'
exclude 'stirling/software/SPDF/model/User.java'
exclude 'stirling/software/SPDF/repository/**'
}
}
}
}
openApi {
apiDocsUrl = "http://localhost:8080/v1/api-docs"
outputDir = file("$projectDir")
outputFileName = "SwaggerDoc.json"
}
launch4j {
icon = "${projectDir}/src/main/resources/static/favicon.ico"
outfile="Stirling-PDF.exe"
headerType="console"
jarTask = tasks.bootJar
errTitle="Encountered error, Do you have Java 17?"
downloadUrl="https://download.oracle.com/java/17/latest/jdk-17_windows-x64_bin.exe"
variables=["BROWSER_OPEN=true", "ENDPOINTS_GROUPS_TO_REMOVE=CLI"]
jreMinVersion="17"
mutexName="Stirling-PDF"
windowTitle="Stirling-PDF"
messagesStartupError="An error occurred while starting Stirling-PDF"
//messagesJreNotFoundError="This application requires a Java Runtime Environment, Please download Java 17."
messagesJreVersionError="You are running the wrong version of Java, Please download Java 17."
messagesLauncherError="Java is corrupted. Please uninstall and then install Java 17."
messagesInstanceAlreadyExists="Stirling-PDF is already running."
}
spotless {
java {
target project.fileTree('src/main/java')
googleJavaFormat('1.19.1').aosp().reorderImports(false)
importOrder('java', 'javax', 'org', 'com', 'net', 'io')
toggleOffOn()
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web:3.0.6'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf:3.0.6'
testImplementation 'org.springframework.boot:spring-boot-starter-test:3.0.6'
// https://mvnrepository.com/artifact/org.apache.pdfbox/jbig2-imageio
implementation group: 'org.apache.pdfbox', name: 'jbig2-imageio', version: '3.0.4'
implementation 'commons-io:commons-io:2.11.0'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0'
//general PDF
implementation 'org.apache.pdfbox:pdfbox:2.0.28'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.micrometer:micrometer-core'
developmentOnly("org.springframework.boot:spring-boot-devtools")
//security updates
implementation 'ch.qos.logback:logback-classic:1.5.3'
implementation 'ch.qos.logback:logback-core:1.5.3'
implementation 'org.springframework:spring-webmvc:6.1.5'
implementation("io.github.pixee:java-security-toolkit:1.1.3")
implementation 'org.yaml:snakeyaml:2.2'
implementation 'org.springframework.boot:spring-boot-starter-web:3.2.4'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf:3.2.4'
if (System.getenv('DOCKER_ENABLE_SECURITY') != 'false') {
implementation 'org.springframework.boot:spring-boot-starter-security:3.2.4'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5:3.1.2.RELEASE'
implementation "org.springframework.boot:spring-boot-starter-data-jpa:3.2.4"
//2.2.x requires rebuild of DB file.. need migration path
implementation "com.h2database:h2:2.1.214"
}
testImplementation 'org.springframework.boot:spring-boot-starter-test:3.2.4'
// Batik
implementation 'org.apache.xmlgraphics:batik-all:1.17'
// TwelveMonkeys
implementation 'com.twelvemonkeys.imageio:imageio-batik:3.10.1'
implementation 'com.twelvemonkeys.imageio:imageio-bmp:3.10.1'
// implementation 'com.twelvemonkeys.imageio:imageio-hdr:3.10.1'
// implementation 'com.twelvemonkeys.imageio:imageio-icns:3.10.1'
// implementation 'com.twelvemonkeys.imageio:imageio-iff:3.10.1'
implementation 'com.twelvemonkeys.imageio:imageio-jpeg:3.10.1'
// implementation 'com.twelvemonkeys.imageio:imageio-pcx:3.10.1'
// implementation 'com.twelvemonkeys.imageio:imageio-pict:3.10.1'
// implementation 'com.twelvemonkeys.imageio:imageio-pnm:3.10.1'
// implementation 'com.twelvemonkeys.imageio:imageio-psd:3.10.1'
// implementation 'com.twelvemonkeys.imageio:imageio-sgi:3.10.1'
// implementation 'com.twelvemonkeys.imageio:imageio-tga:3.10.1'
// implementation 'com.twelvemonkeys.imageio:imageio-thumbsdb:3.10.1'
implementation 'com.twelvemonkeys.imageio:imageio-tiff:3.10.1'
implementation 'com.twelvemonkeys.imageio:imageio-webp:3.10.1'
// implementation 'com.twelvemonkeys.imageio:imageio-xwd:3.10.1'
implementation 'commons-io:commons-io:2.15.1'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'
//general PDF
// https://mvnrepository.com/artifact/com.opencsv/opencsv
implementation ('com.opencsv:opencsv:5.9') {
exclude group: 'commons-logging', module: 'commons-logging'
}
implementation ('org.apache.pdfbox:pdfbox:3.0.2'){
exclude group: 'commons-logging', module: 'commons-logging'
}
implementation ('org.apache.pdfbox:xmpbox:3.0.2'){
exclude group: 'commons-logging', module: 'commons-logging'
}
implementation 'org.bouncycastle:bcprov-jdk18on:1.77'
implementation 'org.bouncycastle:bcpkix-jdk18on:1.77'
implementation 'org.springframework.boot:spring-boot-starter-actuator:3.2.4'
implementation 'io.micrometer:micrometer-core:1.12.4'
implementation group: 'com.google.zxing', name: 'core', version: '3.5.3'
// https://mvnrepository.com/artifact/org.commonmark/commonmark
implementation 'org.commonmark:commonmark:0.22.0'
implementation 'org.commonmark:commonmark-ext-gfm-tables:0.22.0'
// https://mvnrepository.com/artifact/com.github.vladimir-bukhtoyarov/bucket4j-core
implementation 'com.github.vladimir-bukhtoyarov:bucket4j-core:7.6.0'
implementation 'com.fathzer:javaluator:3.0.3'
developmentOnly("org.springframework.boot:spring-boot-devtools:3.2.4")
compileOnly 'org.projectlombok:lombok:1.18.32'
annotationProcessor 'org.projectlombok:lombok:1.18.32'
}
tasks.withType(JavaCompile) {
dependsOn 'spotlessApply'
}
compileJava {
options.compilerArgs << '-parameters'
}
task writeVersion {
def propsFile = file('src/main/resources/version.properties')
def props = new Properties()
props.setProperty('version', version)
props.store(propsFile.newWriter(), null)
}
swaggerhubUpload {
//dependsOn generateOpenApiDocs // Depends on your task generating Swagger docs
api 'Stirling-PDF' // The name of your API on SwaggerHub
owner 'Frooodle' // Your SwaggerHub username (or organization name)
version project.version // The version of your API
inputFile './SwaggerDoc.json' // The path to your Swagger docs
token "${System.getenv('SWAGGERHUB_API_KEY')}" // Your SwaggerHub API key, passed as an environment variable
oas '3.0.0' // The version of the OpenAPI Specification you're using
}
jar {
enabled = false
manifest {
attributes 'Implementation-Title': 'Stirling-PDF',
'Implementation-Version': project.version
}
}
tasks.named('test') {
useJUnitPlatform()
useJUnitPlatform()
}
task printVersion {

View File

@@ -0,0 +1,16 @@
apiVersion: v2
appVersion: 0.22.8
description: locally hosted web application that allows you to perform various operations
on PDF files
home: https://github.com/Stirling-Tools/Stirling-PDF
keywords:
- stirling-pdf
- helm
- charts repo
maintainers:
- name: Stirling-Tools
url: https://github.com/Stirling-Tools/Stirling-PDF
name: stirling-pdf-chart
sources:
- https://github.com/Stirling-Tools/Stirling-PDF
version: 1.0.0

View File

@@ -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 }}

View File

@@ -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 -}}

View File

@@ -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 }}

View File

@@ -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 -}}

View File

@@ -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 }}

View File

@@ -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 }}

View File

@@ -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 }}

View File

@@ -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 }}

View File

@@ -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 }}

View File

@@ -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: UI_APP_NAME
# value: "Stirling PDF"
# - name: UI_HOME_DESCRIPTION
# value: "Your locally hosted one-stop-shop for all your PDF needs."
# - name: UI_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: <storageClass>
## 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:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@@ -1,310 +1,110 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
width="99.537987mm"
height="95.209366mm"
viewBox="0 0 99.537987 95.209366"
version="1.1"
id="svg745"
id="Layer_1"
x="0px"
y="0px"
viewBox="0 0 512 512"
style="enable-background:new 0 0 512 512;"
xml:space="preserve"
inkscape:version="1.2.1 (9c6d41e4, 2022-07-14)"
sodipodi:docname="stirling.svg"
inkscape:export-filename="stirling.png"
inkscape:export-xdpi="80"
inkscape:export-ydpi="80"
sodipodi:docname="favicon.svg"
inkscape:version="1.2.2 (732a01da63, 2022-12-09)"
inkscape:export-filename="favicon.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview747"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="0.914906"
inkscape:cx="184.17193"
inkscape:cy="509.88845"
inkscape:window-width="2293"
inkscape:window-height="1387"
inkscape:window-x="122"
inkscape:window-y="25"
inkscape:window-maximized="0"
inkscape:current-layer="svg745" /><defs
id="defs742"><linearGradient
inkscape:collect="always"
id="linearGradient72198"><stop
style="stop-color:#ccd6d7;stop-opacity:1;"
offset="0"
id="stop72194" /><stop
style="stop-color:#0f3a3f;stop-opacity:1;"
offset="1"
id="stop72196" /></linearGradient><linearGradient
inkscape:collect="always"
id="linearGradient71928"><stop
style="stop-color:#4b0005;stop-opacity:1;"
offset="0"
id="stop71924" /><stop
style="stop-color:#8f000c;stop-opacity:1;"
offset="1"
id="stop71926" /></linearGradient><linearGradient
inkscape:collect="always"
id="linearGradient71920"><stop
style="stop-color:#4b0005;stop-opacity:1;"
offset="0"
id="stop71916" /><stop
style="stop-color:#8f000c;stop-opacity:1;"
offset="1"
id="stop71918" /></linearGradient><linearGradient
inkscape:collect="always"
id="linearGradient69598"><stop
style="stop-color:#6a0007;stop-opacity:1;"
offset="0"
id="stop69594" /><stop
style="stop-color:#b8000f;stop-opacity:1;"
offset="1"
id="stop69596" /></linearGradient><linearGradient
inkscape:collect="always"
id="linearGradient46361"><stop
style="stop-color:#f7f6f8;stop-opacity:1;"
offset="0"
id="stop46359" /><stop
style="stop-color:#b7b7b5;stop-opacity:1;"
offset="1"
id="stop46357" /></linearGradient><linearGradient
inkscape:collect="always"
id="linearGradient40554"><stop
style="stop-color:#f4f2f4;stop-opacity:1;"
offset="0"
id="stop40550" /><stop
style="stop-color:#57767b;stop-opacity:1;"
offset="1"
id="stop40552" /></linearGradient><linearGradient
inkscape:collect="always"
id="linearGradient39095"><stop
style="stop-color:#285459;stop-opacity:1;"
offset="0"
id="stop39093" /><stop
style="stop-color:#a6b6af;stop-opacity:1;"
offset="1"
id="stop39091" /></linearGradient><linearGradient
inkscape:collect="always"
id="linearGradient36672"><stop
style="stop-color:#da453f;stop-opacity:1;"
offset="0"
id="stop36668" /><stop
style="stop-color:#a60008;stop-opacity:1;"
offset="1"
id="stop36670" /></linearGradient><linearGradient
inkscape:collect="always"
id="linearGradient19524"><stop
style="stop-color:#3a4b4f;stop-opacity:1;"
offset="0"
id="stop19522" /><stop
style="stop-color:#617979;stop-opacity:0.97461927;"
offset="1"
id="stop19520" /></linearGradient><linearGradient
inkscape:collect="always"
id="linearGradient17996"><stop
style="stop-color:#401016;stop-opacity:1;"
offset="0"
id="stop17994" /><stop
style="stop-color:#761f19;stop-opacity:1;"
offset="1"
id="stop17992" /></linearGradient><linearGradient
inkscape:collect="always"
id="linearGradient15569"><stop
style="stop-color:#8ea8ad;stop-opacity:1;"
offset="0"
id="stop15565" /><stop
style="stop-color:#e9e7eb;stop-opacity:1;"
offset="1"
id="stop15567" /></linearGradient><linearGradient
inkscape:collect="always"
id="linearGradient15557"><stop
style="stop-color:#9b0e11;stop-opacity:1;"
offset="0"
id="stop15553" /><stop
style="stop-color:#370707;stop-opacity:1;"
offset="1"
id="stop15555" /></linearGradient><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient15557"
id="linearGradient15559"
x1="120.06672"
y1="63.25761"
x2="135.16347"
y2="78.078682"
gradientUnits="userSpaceOnUse" /><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient15569"
id="linearGradient15571"
x1="127.97037"
y1="101.66144"
x2="133.88971"
y2="104.77026"
gradientUnits="userSpaceOnUse" /><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient17996"
id="linearGradient17998"
x1="117.9284"
y1="86.055084"
x2="130.67392"
y2="76.945541"
gradientUnits="userSpaceOnUse" /><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient19524"
id="linearGradient19528"
x1="130.98172"
y1="82.402977"
x2="135.72115"
y2="86.45166"
gradientUnits="userSpaceOnUse" /><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient36672"
id="linearGradient36674"
x1="63.797714"
y1="74.81752"
x2="96.636673"
y2="120.29293"
gradientUnits="userSpaceOnUse" /><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient39095"
id="linearGradient39097"
x1="120.54506"
y1="124.76902"
x2="128.04152"
y2="126.0704"
gradientUnits="userSpaceOnUse" /><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient40554"
id="linearGradient40556"
x1="113.84585"
y1="114.04285"
x2="119.65858"
y2="128.50244"
gradientUnits="userSpaceOnUse" /><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient46361"
id="linearGradient46363"
x1="73.993439"
y1="114.13906"
x2="94.845322"
y2="71.247383"
gradientUnits="userSpaceOnUse" /><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient69598"
id="linearGradient69600"
x1="95.854446"
y1="114.66749"
x2="103.77842"
y2="120.1887"
gradientUnits="userSpaceOnUse" /><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient71920"
id="linearGradient71922"
x1="98.580376"
y1="87.186958"
x2="118.09738"
y2="101.19449"
gradientUnits="userSpaceOnUse" /><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient71928"
id="linearGradient71930"
x1="78.278267"
y1="97.433273"
x2="92.313202"
y2="104.33479"
gradientUnits="userSpaceOnUse" /><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient72198"
id="linearGradient72200"
x1="125.76636"
y1="138.46817"
x2="123.3327"
y2="126.03291"
gradientUnits="userSpaceOnUse" /></defs><g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="background"
style="display:inline"
sodipodi:insensitive="true"
transform="translate(-51.420144,-44.470286)"><rect
style="display:inline;fill:#ccd6d7;fill-opacity:1;stroke:none;stroke-width:4.13755;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:3.2"
id="rect72067"
width="99.481979"
height="94.999512"
x="51.476147"
y="44.680138" /></g><g
inkscape:groupmode="layer"
id="layer5"
inkscape:label="shadow"
style="display:inline"
sodipodi:insensitive="true"
transform="translate(-51.420144,-44.470286)"><path
style="display:inline;fill:url(#linearGradient72200);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 84.146049,134.73858 c 0,0 11.721038,2.48294 17.938661,2.91673 6.21763,0.43378 14.75251,0.59994 22.41237,-0.43379 8.01008,-1.081 13.19907,-2.22733 14.50043,-2.66112 1.30136,-0.43379 4.00784,-1.24297 4.15244,-2.25514 0.1446,-1.01217 -3.4703,-2.74733 -6.21763,-3.32571 -2.74732,-0.57838 -12.72444,-1.44596 -14.89337,-1.44596 -2.16894,0 -37.892901,7.20499 -37.892901,7.20499 z"
id="path72192"
sodipodi:nodetypes="cssssssc" /></g><g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Origami"
style="display:inline"
sodipodi:insensitive="true"
transform="translate(-51.420144,-44.470286)"><path
style="display:inline;fill:url(#linearGradient40556);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 84.460552,134.86721 35.165798,-6.85679 16.15467,-42.7383 z"
id="path960"
sodipodi:nodetypes="cccc" /><path
style="fill:url(#linearGradient15571);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 135.71493,85.428056 0.3984,45.049024 -9.66213,-20.46173 z"
id="path964"
sodipodi:nodetypes="cccc" /><path
style="display:inline;fill:url(#linearGradient39097);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 119.60518,128.00293 16.5337,2.48693 -9.68769,-20.5512 z"
id="path966"
sodipodi:nodetypes="cccc" /><path
style="display:inline;fill:url(#linearGradient15559);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 118.42209,57.022622 12.70423,-2.766809 -0.0785,25.087175 -12.43878,-13.376518 z"
id="path968"
sodipodi:nodetypes="ccccc" /><path
style="display:inline;fill:url(#linearGradient19528);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 135.72114,85.386768 -4.84219,-6.459493 0.0305,11.126604 z"
id="path970"
sodipodi:nodetypes="cccc" /><path
style="display:inline;fill:url(#linearGradient17998);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 119.10273,65.682415 11.96883,13.44935 -0.0899,10.819868 -11.88577,11.430427 z"
id="path972"
sodipodi:nodetypes="ccccc" /><path
style="display:inline;fill:url(#linearGradient36674);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 62.145635,130.15618 62.043392,65.435258 c 0,0 0.179321,-2.778132 1.89516,-4.036097 1.874923,-1.374597 4.341768,-1.894096 4.341768,-1.894096 l 50.91788,-11.349167 -0.0113,53.144272 -34.733274,33.56547 z"
id="path958"
sodipodi:nodetypes="ccsccccc" /></g><g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="Letter"
style="display:inline"
sodipodi:insensitive="true"
transform="translate(-51.420144,-44.470286)"><path
style="display:inline;fill:url(#linearGradient69600);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 94.780881,91.406803 16.870379,17.074877 -23.723345,23.00249 -18.122131,-17.99816 5.497473,-2.80607 18.404054,-0.0511 2.35163,-8.23071 z"
id="path54894"
sodipodi:nodetypes="cccccccc" /><path
style="display:inline;fill:url(#linearGradient71930);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 72.440405,92.224764 16.15467,15.745686 4.089788,-6.79927 z"
id="path54892" /><path
style="display:inline;fill:url(#linearGradient71922);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 95.138739,84.965385 1.124691,-14.109776 22.92453,22.286787 0.008,8.164604 -3.28863,3.16649 z"
id="path54890"
sodipodi:nodetypes="cccccc"
inkscape:label="path54890" /><path
style="display:inline;fill:url(#linearGradient46363);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 95.138739,84.965385 h 1.226936 l -0.05112,-14.109776 c 0,0 -5.776827,-3.220709 -12.167126,-2.40275 -6.390296,0.817957 -8.151582,2.1248 -10.58233,4.396523 -1.90229,1.777838 -2.913974,3.527446 -3.987546,7.157132 -0.512646,1.733226 -0.281963,5.988892 0.613471,8.537436 0.664591,1.891528 2.453873,4.294281 4.958868,6.134686 2.662335,1.956002 8.281825,3.527443 8.281825,3.527443 0,0 5.134614,1.887351 5.572338,4.294281 0.308137,1.69437 -0.102243,3.22071 -1.635914,4.95887 -1.258314,1.42609 -3.62969,1.99377 -6.288054,1.07357 -2.658364,-0.92021 -6.139514,-3.85065 -7.106009,-4.90775 -0.817958,-0.89464 -2.820665,-3.06173 -2.890231,-4.294021 -0.01209,-0.214205 -1.229505,-0.0963 -1.229505,-0.0963 l -0.0723,14.256941 5.879073,2.24938 c 0,0 5.214483,1.78929 8.946415,1.43143 3.731934,-0.35786 7.617235,-0.51122 11.604778,-5.16336 3.987542,-4.65213 3.680812,-12.831715 2.147141,-15.899056 -1.533673,-3.067344 -3.561212,-6.138812 -10.480087,-8.281826 -5.776829,-1.789283 -7.872846,-3.01622 -8.128458,-4.396524 -0.255611,-1.380305 0.0091,-4.253646 2.760607,-5.214481 3.220711,-1.124693 5.623462,-0.05112 7.05489,1.12469 1.431425,1.175817 5.572339,5.623462 5.572339,5.623462 z"
id="path46355"
sodipodi:nodetypes="cccssssscssssscccssssssscc" /></g></svg>
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs173">
<linearGradient
id="XMLID_5_"
gradientUnits="userSpaceOnUse"
x1="304.496"
y1="422.9102"
x2="316.036"
y2="326.2626">
<stop
offset="0"
style="stop-color:#DCF1F3"
id="stop156" />
<stop
offset="1"
style="stop-color:#C2C2C9"
id="stop158" />
</linearGradient>
</defs><sodipodi:namedview
id="namedview171"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="1.4142136"
inkscape:cx="219.91021"
inkscape:cy="232.63813"
inkscape:window-width="3840"
inkscape:window-height="2054"
inkscape:window-x="2869"
inkscape:window-y="-11"
inkscape:window-maximized="1"
inkscape:current-layer="XMLID_4_" />
<style
type="text/css"
id="style150">
.st0{fill:#FFFFFF;}
.st1{fill:#C02223;}
.st2{fill:#882425;}
.st3{fill:url(#XMLID_5_);}
.st4{fill:url(#XMLID_7_);}
</style>
<g
id="XMLID_4_">
<path
id="XMLID_131_"
class="st1"
d="M 347.01402,14.355825 98.978019,69.02261 C 73.825483,74.547445 55.942464,96.792175 55.942464,122.52628 v 315.06096 c 0,22.39012 16.719895,41.14548 38.819234,43.76251 L 224.8861,498.36042 339.48636,384.26465 455.76603,265.15425 453.73057,84.870162 C 453.43979,62.916214 433.08513,46.632491 411.71274,51.284984 l -28.78729,6.251786 0.14539,-13.666697 C 383.36162,24.678542 365.62399,10.284894 347.01402,14.355825 Z"
sodipodi:nodetypes="ccssccccccccc"
style="stroke-width:1.45391" /><path
id="XMLID_117_"
class="st2"
d="m 383.21622,57.53677 v 285.8375 L 456.05681,265.00885 454.02135,78.763767 C 453.87595,59.863016 436.28372,45.905539 417.81914,49.97647 Z"
style="stroke-width:1.45391" /><polygon
id="XMLID_18_"
class="st3"
points="234.7,422.6 368.5,387.7 393.5,262.2 "
style="fill:url(#XMLID_5_)"
transform="matrix(1.4556308,0,0,1.4548265,-116.73161,-116.45231)" />
<linearGradient
id="XMLID_7_"
gradientUnits="userSpaceOnUse"
x1="223.0838"
y1="372.7559"
x2="241.4174"
y2="114.557"
gradientTransform="matrix(1.4539039,0,0,1.4539039,-116.19976,-116.20474)">
<stop
offset="0"
style="stop-color:#DCF1F3"
id="stop163" />
<stop
offset="1"
style="stop-color:#C2C2C9"
id="stop165" />
</linearGradient>
<path
id="XMLID_6_"
class="st4"
d="m 282.89686,214.84917 c 0,0 -22.24473,-28.93269 -38.67384,-36.78377 -10.46811,-4.94327 -26.02489,-6.83335 -38.23768,-0.72695 -18.02841,9.0142 -19.91848,34.31213 -3.34397,44.34406 3.92553,2.47165 9.15959,4.50711 15.99294,6.10641 36.63838,8.43264 97.12077,25.87949 89.70587,96.10304 0,0 -4.21633,65.86185 -73.56753,73.42215 -12.2128,1.30851 -24.57098,0.43617 -36.493,-2.32625 -16.42911,-3.63476 -45.50719,-11.04967 -59.75545,-19.91849 l -2.61703,-75.16682 h 6.97875 c 0,0 13.81208,33.43978 53.06749,49.57812 7.26952,2.90781 15.26599,4.07093 22.97168,2.90781 9.74116,-1.45391 21.22699,-6.68796 25.87949,-22.53551 0,0 7.85108,-23.11707 -32.85823,-35.76604 -32.56744,-10.17733 -63.24481,-20.64543 -75.89378,-54.95757 -5.961,-16.28371 -6.97874,-34.31212 -2.90781,-51.61358 5.37944,-22.53551 20.79082,-54.23062 64.40794,-67.89732 0,0 57.28381,-15.55677 96.53922,5.52484 l -1.74468,89.70587 z"
style="fill:url(#XMLID_7_);stroke-width:1.45391" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -0,0 +1,34 @@
version: '3.3'
services:
stirling-pdf:
container_name: Stirling-PDF-Security
image: frooodle/s-pdf:latest
deploy:
resources:
limits:
memory: 4G
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP' && curl -fL http://localhost:8080/ | grep -q 'Please sign in'"]
interval: 5s
timeout: 10s
retries: 16
ports:
- 8080:8080
volumes:
- /stirling/latest/data:/usr/share/tessdata:rw
- /stirling/latest/config:/configs:rw
- /stirling/latest/logs:/logs:rw
environment:
DOCKER_ENABLE_SECURITY: "true"
SECURITY_ENABLELOGIN: "true"
PUID: 1002
PGID: 1002
UMASK: "022"
SYSTEM_DEFAULTLOCALE: en-US
UI_APPNAME: Stirling-PDF
UI_HOMEDESCRIPTION: Demo site for Stirling-PDF Latest with Security
UI_APPNAMENAVBAR: Stirling-PDF Latest
SYSTEM_MAXFILESIZE: "100"
METRICS_ENABLED: "true"
SYSTEM_GOOGLEVISIBILITY: "true"
restart: on-failure:5

View File

@@ -0,0 +1,31 @@
version: '3.3'
services:
stirling-pdf:
container_name: Stirling-PDF-Ultra-Lite-Security
image: frooodle/s-pdf:latest-ultra-lite
deploy:
resources:
limits:
memory: 1G
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP' && curl -fL http://localhost:8080/ | grep -q 'Please sign in'"]
interval: 5s
timeout: 10s
retries: 16
ports:
- 8080:8080
volumes:
- /stirling/latest/data:/usr/share/tessdata:rw
- /stirling/latest/config:/configs:rw
- /stirling/latest/logs:/logs:rw
environment:
DOCKER_ENABLE_SECURITY: "true"
SECURITY_ENABLELOGIN: "true"
SYSTEM_DEFAULTLOCALE: en-US
UI_APPNAME: Stirling-PDF-Lite
UI_HOMEDESCRIPTION: Demo site for Stirling-PDF-Lite Latest with Security
UI_APPNAMENAVBAR: Stirling-PDF-Lite Latest
SYSTEM_MAXFILESIZE: "100"
METRICS_ENABLED: "true"
SYSTEM_GOOGLEVISIBILITY: "true"
restart: on-failure:5

View File

@@ -0,0 +1,30 @@
version: '3.3'
services:
stirling-pdf:
container_name: Stirling-PDF-Ultra-Lite
image: frooodle/s-pdf:latest-ultra-lite
deploy:
resources:
limits:
memory: 1G
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP' && curl -fL http://localhost:8080/ | grep -qv 'Please sign in'"]
interval: 5s
timeout: 10s
retries: 16
ports:
- 8080:8080
volumes:
- /stirling/latest/config:/configs:rw
- /stirling/latest/logs:/logs:rw
environment:
DOCKER_ENABLE_SECURITY: "false"
SECURITY_ENABLELOGIN: "false"
SYSTEM_DEFAULTLOCALE: en-US
UI_APPNAME: Stirling-PDF-Ultra-lite
UI_HOMEDESCRIPTION: Demo site for Stirling-PDF-Ultra-lite Latest
UI_APPNAMENAVBAR: Stirling-PDF-Ultra-lite Latest
SYSTEM_MAXFILESIZE: "100"
METRICS_ENABLED: "true"
SYSTEM_GOOGLEVISIBILITY: "true"
restart: on-failure:5

View File

@@ -0,0 +1,31 @@
version: '3.3'
services:
stirling-pdf:
container_name: Stirling-PDF
image: frooodle/s-pdf:latest
deploy:
resources:
limits:
memory: 4G
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/info/status | grep -q 'UP' && curl -fL http://localhost:8080/ | grep -qv 'Please sign in'"]
interval: 5s
timeout: 10s
retries: 16
ports:
- 8080:8080
volumes:
- /stirling/latest/data:/usr/share/tessdata:rw
- /stirling/latest/config:/configs:rw
- /stirling/latest/logs:/logs:rw
environment:
DOCKER_ENABLE_SECURITY: "false"
SECURITY_ENABLELOGIN: "false"
SYSTEM_DEFAULTLOCALE: en-US
UI_APPNAME: Stirling-PDF
UI_HOMEDESCRIPTION: Demo site for Stirling-PDF Latest
UI_APPNAMENAVBAR: Stirling-PDF Latest
SYSTEM_MAXFILESIZE: "100"
METRICS_ENABLED: "true"
SYSTEM_GOOGLEVISIBILITY: "true"
restart: on-failure:5

0
gradlew vendored Normal file → Executable file
View File

182
gradlew.bat vendored
View File

@@ -1,91 +1,91 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@@ -1,32 +0,0 @@
Operation | PageOps | Convert | Security | Other | CLI | Python | OpenCV | LibreOffice | OCRmyPDF | Java | Javascript
--------------------|---------|---------|----------|-------|------|--------|--------|-------------|--------- |-------- |-----------
remove-pages | X | | | | | | | | | X |
merge-pdfs | X | | | | | | | | | X |
split-pdfs | X | | | | | | | | | X |
pdf-organizer | X | | | | | | | | | X | X
rotate-pdf | X | | | | | | | | | X |
pdf-to-img | | X | | | | | | | | X |
img-to-pdf | | X | | | | | | | | X |
pdf-to-pdfa | | X | | | X | | | | X | |
file-to-pdf | | X | | | X | | | X | | |
xlsx-to-pdf | | X | | | X | | | X | | |
pdf-to-word | | X | | | X | | | X | | |
pdf-to-presentation | | X | | | X | | | X | | |
pdf-to-text | | X | | | X | | | X | | |
pdf-to-html | | X | | | X | | | X | | |
pdf-to-xml | | X | | | X | | | X | | |
add-password | | | X | | | | | | | X |
remove-password | | | X | | | | | | | X |
change-permissions | | | X | | | | | | | X |
add-watermark | | | X | | | | | | | X |
ocr-pdf | | | | X | X | | | | X | |
add-image | | | | X | | | | | | X |
compress-pdf | | | | X | X | | | | X
extract-images | | | | X | | | | | | X |
change-metadata | | | | X | | | | | | X |
extract-image-scans | | | | X | X | X | X | | | |
sign | | | | X | | | | | | | X
flatten | | | | X | | | | | | |
repair | | | | X | X | | | X | | |
remove-blanks | | | | X | X | X | X | | | |
compare | | | | X | | | | | | | X

BIN
images/login-dark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
images/login-light.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
images/stirling-home.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

36
lauch4jConfig.xml Normal file
View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<launch4jConfig>
<dontWrapJar>false</dontWrapJar>
<headerType>console</headerType>
<jar>.\build\libs\S-PDF-0.10.1.jar</jar>
<outfile>.\Stirling-PDF.exe</outfile>
<errTitle>Please download Java17</errTitle>
<cmdLine></cmdLine>
<chdir>.</chdir>
<priority>normal</priority>
<downloadUrl>https://download.oracle.com/java/17/latest/jdk-17_windows-x64_bin.exe</downloadUrl>
<supportUrl></supportUrl>
<stayAlive>false</stayAlive>
<restartOnCrash>false</restartOnCrash>
<manifest></manifest>
<icon>./src/main/resources/static/favicon.ico</icon>
<var>BROWSER_OPEN=true</var>
<singleInstance>
<mutexName>Stirling-PDF</mutexName>
<windowTitle>Stirling-PDF</windowTitle>
</singleInstance>
<jre>
<path>%JAVA_HOME%;%PATH%</path>
<requiresJdk>false</requiresJdk>
<requires64Bit>false</requires64Bit>
<minVersion>17</minVersion>
<maxVersion></maxVersion>
</jre>
<messages>
<startupErr>An error occurred while starting Stirling-PDF</startupErr>
<jreNotFoundErr>This application requires a Java Runtime Environment, Please download Java 17.</jreNotFoundErr>
<jreVersionErr>You are running the wrong version of Java, Please download Java 17.</jreVersionErr>
<launcherErr>Java is corrupted. Please uninstall and then install Java 17.</launcherErr>
<instanceAlreadyExistsMsg>Stirling-PDF is already running.</instanceAlreadyExistsMsg>
</messages>
</launch4jConfig>

View File

@@ -0,0 +1,39 @@
{
"name": "Prepare-pdfs-for-email",
"pipeline": [
{
"operation": "/api/v1/misc/repair",
"parameters": {}
},
{
"operation": "/api/v1/security/sanitize-pdf",
"parameters": {
"removeJavaScript": true,
"removeEmbeddedFiles": false,
"removeMetadata": false,
"removeLinks": false,
"removeFonts": false
}
},
{
"operation": "/api/v1/misc/compress-pdf",
"parameters": {
"optimizeLevel": 2,
"expectedOutputSize": ""
}
},
{
"operation": "/api/v1/general/split-by-size-or-count",
"parameters": {
"splitType": 0,
"splitValue": "15MB"
}
}
],
"_examples": {
"outputDir": "{outputFolder}/{folderName}",
"outputFileName": "{filename}-{pipelineName}-{date}-{time}"
},
"outputDir": "httpWebRequest",
"outputFileName": "{filename}"
}

View File

@@ -0,0 +1,34 @@
{
"name": "split-rotate-auto-rename",
"pipeline": [
{
"operation": "/api/v1/general/split-pdf-by-sections",
"parameters": {
"horizontalDivisions": 2,
"verticalDivisions": 2,
"fileInput": "automated",
"merge": false
}
},
{
"operation": "/api/v1/general/rotate-pdf",
"parameters": {
"angle": 90,
"fileInput": "automated"
}
},
{
"operation": "/api/v1/misc/auto-rename",
"parameters": {
"useFirstTextAsFallback": false,
"fileInput": "automated"
}
}
],
"_examples": {
"outputDir": "{outputFolder}/{folderName}",
"outputFileName": "{filename}-{pipelineName}-{date}-{time}"
},
"outputDir": "{outputFolder}",
"outputFileName": "{filename}"
}

80
scripts/PropSync.java Normal file
View File

@@ -0,0 +1,80 @@
package stirling.software.Stirling.Stats;
import java.nio.file.*;
import java.nio.charset.MalformedInputException;
import java.nio.charset.StandardCharsets;
import java.io.*;
import java.util.*;
public class PropSync {
public static void main(String[] args) throws IOException {
File folder = new File("C:\\Users\\systo\\git\\Stirling-PDF\\src\\main\\resources");
File[] files = folder.listFiles((dir, name) -> name.matches("messages_.*\\.properties"));
List<String> enLines = Files.readAllLines(Paths.get(folder + "\\messages_en_GB.properties"), StandardCharsets.UTF_8);
Map<String, String> enProps = linesToProps(enLines);
for (File file : files) {
if (!"messages_en_GB.properties".equals(file.getName())) {
System.out.println("Processing file: " + file.getName());
List<String> lines;
try {
lines = Files.readAllLines(file.toPath(), StandardCharsets.UTF_8);
} catch (MalformedInputException e) {
System.out.println("Skipping due to not UTF8 format for file: " + file.getName());
continue;
} catch (IOException e) {
throw new UncheckedIOException(e);
}
Map<String, String> currentProps = linesToProps(lines);
List<String> newLines = syncPropsWithLines(enProps, currentProps, enLines);
Files.write(file.toPath(), newLines, StandardCharsets.UTF_8);
System.out.println("Finished processing file: " + file.getName());
}
}
}
private static Map<String, String> linesToProps(List<String> lines) {
Map<String, String> props = new LinkedHashMap<>();
for (String line : lines) {
if (!line.trim().isEmpty() && line.contains("=")) {
String[] parts = line.split("=", 2);
props.put(parts[0].trim(), parts[1].trim());
}
}
return props;
}
private static List<String> syncPropsWithLines(Map<String, String> enProps, Map<String, String> currentProps, List<String> enLines) {
List<String> newLines = new ArrayList<>();
boolean needsTranslateComment = false; // flag to check if we need to add "TODO: Translate"
for (String line : enLines) {
if (line.contains("=")) {
String key = line.split("=", 2)[0].trim();
if (currentProps.containsKey(key)) {
newLines.add(key + "=" + currentProps.get(key));
needsTranslateComment = false;
} else {
if (!needsTranslateComment) {
newLines.add("##########################");
newLines.add("### TODO: Translate ###");
newLines.add("##########################");
needsTranslateComment = true;
}
newLines.add(line);
}
} else {
// handle comments and other non-property lines
newLines.add(line);
needsTranslateComment = false; // reset the flag when we encounter comments or empty lines
}
}
return newLines;
}
}

View File

@@ -0,0 +1,122 @@
"""A script to update language progress status in README.md based on
properties file comparison.
This script compares default properties file with others in a directory to
determine language progress.
It then updates README.md based on provided progress list.
Author: Ludy87
Example:
To use this script, simply run it from command line:
$ python counter_translation.py
"""
import os
import glob
import re
from typing import List, Tuple
def write_readme(progress_list: List[Tuple[str, int]]) -> None:
"""
Updates the progress status in the README.md file based
on the provided progress list.
Parameters:
progress_list (List[Tuple[str, int]]): A list of tuples containing
language and progress percentage.
Returns:
None
"""
with open("README.md", "r", encoding="utf-8") as file:
content = file.read()
lines = content.split("\n")
for i, line in enumerate(lines[2:], start=2):
for progress in progress_list:
language, value = progress
if language in line:
match = re.search(r"\!\[(\d+(\.\d+)?)%\]\(.*\)", line)
if match:
lines[i] = line.replace(
match.group(0),
f"![{value}%](https://geps.dev/progress/{value})",
)
new_content = "\n".join(lines)
with open("README.md", "w", encoding="utf-8") as file:
file.write(new_content)
def compare_files(default_file_path, files_directory) -> List[Tuple[str, int]]:
"""
Compares the default properties file with other
properties files in the directory.
Parameters:
default_file_path (str): The path to the default properties file.
files_directory (str): The directory containing other properties files.
Returns:
List[Tuple[str, int]]: A list of tuples containing
language and progress percentage.
"""
file_paths = glob.glob(os.path.join(files_directory, "messages_*.properties"))
num_lines = sum(1 for _ in open(default_file_path, encoding="utf-8"))
result_list = []
for file_path in file_paths:
language = (
os.path.basename(file_path)
.split("messages_", 1)[1]
.split(".properties", 1)[0]
)
fails = 0
if "en_GB" in language or "en_US" in language:
result_list.append(("en_GB", 100))
result_list.append(("en_US", 100))
continue
with open(default_file_path, "r", encoding="utf-8") as default_file, open(
file_path, "r", encoding="utf-8"
) as file:
for _ in range(5):
next(default_file)
try:
next(file)
except StopIteration:
fails = num_lines
for _, (line_default, line_file) in enumerate(
zip(default_file, file), start=6
):
try:
if (
line_default.split("=", 1)[1].strip()
== line_file.split("=", 1)[1].strip()
):
fails += 1
except IndexError:
pass
result_list.append(
(
language,
int((num_lines - fails) * 100 / num_lines),
)
)
unique_data = list(set(result_list))
unique_data.sort(key=lambda x: x[1], reverse=True)
return unique_data
if __name__ == "__main__":
directory = os.path.join(os.getcwd(), "src", "main", "resources")
reference_file = os.path.join(directory, "messages_en_GB.properties")
write_readme(compare_files(reference_file, directory))

View File

@@ -1,40 +0,0 @@
import cv2
import numpy as np
import sys
import argparse
def is_blank_image(image_path, threshold=10, white_percent=99, white_value=255, blur_size=5):
image = cv2.imread(image_path, cv2.IMREAD_GRAYSCALE)
if image is None:
print(f"Error: Unable to read the image file: {image_path}")
return False
# Apply Gaussian blur to reduce noise
blurred_image = cv2.GaussianBlur(image, (blur_size, blur_size), 0)
_, thresholded_image = cv2.threshold(blurred_image, white_value - threshold, white_value, cv2.THRESH_BINARY)
# Calculate the percentage of white pixels in the thresholded image
white_pixels = np.sum(thresholded_image == white_value)
total_pixels = thresholded_image.size
white_pixel_percentage = (white_pixels / total_pixels) * 100
print(f"Page has white pixel percent of {white_pixel_percentage}")
return white_pixel_percentage > white_percent
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Detect if an image is considered blank or not.')
parser.add_argument('image_path', help='The path to the image file.')
parser.add_argument('-t', '--threshold', type=int, default=10, help='Threshold for determining white pixels. The default value is 10.')
parser.add_argument('-w', '--white_percent', type=float, default=99, help='The percentage of white pixels for an image to be considered blank. The default value is 99.')
args = parser.parse_args()
blank = is_blank_image(args.image_path, args.threshold, args.white_percent)
if blank:
# Return code 1: The image is considered blank.
sys.exit(1)
else:
# Return code 0: The image is not considered blank.
sys.exit(0)

View File

@@ -0,0 +1,21 @@
echo "Running Stirling PDF with DOCKER_ENABLE_SECURITY=${DOCKER_ENABLE_SECURITY} and VERSION_TAG=${VERSION_TAG}"
# Check for DOCKER_ENABLE_SECURITY and download the appropriate JAR if required
if [ "$DOCKER_ENABLE_SECURITY" = "true" ] && [ "$VERSION_TAG" != "alpha" ]; then
if [ ! -f app-security.jar ]; then
echo "Trying to download from: https://github.com/Stirling-Tools/Stirling-PDF/releases/download/v$VERSION_TAG/Stirling-PDF-with-login.jar"
curl -L -o app-security.jar https://github.com/Stirling-Tools/Stirling-PDF/releases/download/v$VERSION_TAG/Stirling-PDF-with-login.jar
# If the first download attempt failed, try with the 'v' prefix
if [ $? -ne 0 ]; then
echo "Trying to download from: https://github.com/Stirling-Tools/Stirling-PDF/releases/download/$VERSION_TAG/Stirling-PDF-with-login.jar"
curl -L -o app-security.jar https://github.com/Stirling-Tools/Stirling-PDF/releases/download/$VERSION_TAG/Stirling-PDF-with-login.jar
fi
if [ $? -eq 0 ]; then # checks if curl was successful
rm -f app.jar
ln -s app-security.jar app.jar
chown stirlingpdfuser:stirlingpdfgroup app.jar || true
chmod 755 app.jar || true
fi
fi
fi

View File

@@ -0,0 +1,29 @@
#!/bin/sh
# Update the user and group IDs as per environment variables
if [ ! -z "$PUID" ] && [ "$PUID" != "$(id -u stirlingpdfuser)" ]; then
usermod -o -u "$PUID" stirlingpdfuser || true
fi
if [ ! -z "$PGID" ] && [ "$PGID" != "$(getent group stirlingpdfgroup | cut -d: -f3)" ]; then
groupmod -o -g "$PGID" stirlingpdfgroup || true
fi
umask "$UMASK" || true
if [[ "$INSTALL_BOOK_AND_ADVANCED_HTML_OPS" == "true" ]]; then
apk add --no-cache calibre@testing
fi
/scripts/download-security-jar.sh
echo "Setting permissions and ownership for necessary directories..."
if chown -R stirlingpdfuser:stirlingpdfgroup $HOME /logs /scripts /usr/share/fonts/opentype/noto /usr/share/tessdata /configs /customFiles /pipeline /app.jar; then
chmod -R 755 /logs /scripts /usr/share/fonts/opentype/noto /usr/share/tessdata /configs /customFiles /pipeline /app.jar || true
# If chown succeeds, execute the command as stirlingpdfuser
exec su-exec stirlingpdfuser "$@"
else
# If chown fails, execute the command without changing the user context
echo "[WARN] Chown failed, running as host user"
exec "$@"
fi

View File

@@ -2,8 +2,58 @@
# Copy the original tesseract-ocr files to the volume directory without overwriting existing files
echo "Copying original files without overwriting existing files"
mkdir -p /usr/share/tesseract-ocr
cp -rn /usr/share/tesseract-ocr-original/* /usr/share/tesseract-ocr
mkdir -p /usr/share/tessdata
cp -rn /usr/share/tessdata-original/* /usr/share/tessdata
# Run the main command
exec "$@"
if [ -d /usr/share/tesseract-ocr/4.00/tessdata ]; then
cp -r /usr/share/tesseract-ocr/4.00/tessdata/* /usr/share/tessdata || true;
fi
if [ -d /usr/share/tesseract-ocr/5/tessdata ]; then
cp -r /usr/share/tesseract-ocr/5/tessdata/* /usr/share/tessdata || true;
fi
# Update the user and group IDs as per environment variables
if [ ! -z "$PUID" ] && [ "$PUID" != "$(id -u stirlingpdfuser)" ]; then
usermod -o -u "$PUID" stirlingpdfuser || true
fi
if [ ! -z "$PGID" ] && [ "$PGID" != "$(getent group stirlingpdfgroup | cut -d: -f3)" ]; then
groupmod -o -g "$PGID" stirlingpdfgroup || true
fi
umask "$UMASK" || true
# Check if TESSERACT_LANGS environment variable is set and is not empty
if [[ -n "$TESSERACT_LANGS" ]]; then
# Convert comma-separated values to a space-separated list
LANGS=$(echo $TESSERACT_LANGS | tr ',' ' ')
pattern='^[a-zA-Z]{2,4}(_[a-zA-Z]{2,4})?$'
# Install each language pack
for LANG in $LANGS; do
if [[ $LANG =~ $pattern ]]; then
apk add --no-cache "tesseract-ocr-data-$LANG"
else
echo "Skipping invalid language code"
fi
done
fi
if [[ "$INSTALL_BOOK_AND_ADVANCED_HTML_OPS" == "true" ]]; then
apk add --no-cache calibre@testing
fi
/scripts/download-security-jar.sh
echo "Setting permissions and ownership for necessary directories..."
# Attempt to change ownership of directories and files
if chown -R stirlingpdfuser:stirlingpdfgroup $HOME /logs /scripts /usr/share/fonts/opentype/noto /usr/share/tessdata /configs /customFiles /pipeline /app.jar; then
chmod -R 755 /logs /scripts /usr/share/fonts/opentype/noto /usr/share/tessdata /configs /customFiles /pipeline /app.jar || true
# If chown succeeds, execute the command as stirlingpdfuser
exec su-exec stirlingpdfuser "$@"
else
# If chown fails, execute the command without changing the user context
echo "[WARN] Chown failed, running as host user"
exec "$@"
fi

View File

@@ -1,7 +1,8 @@
import argparse
import sys
import cv2
import numpy as np
import os
import os
def find_photo_boundaries(image, background_color, tolerance=30, min_area=10000, min_contour_area=500):
mask = cv2.inRange(image, background_color - tolerance, background_color + tolerance)
@@ -36,32 +37,20 @@ def estimate_background_color(image, sample_points=5):
return np.median(colors, axis=0)
def auto_rotate(image, angle_threshold=10):
def auto_rotate(image, angle_threshold=1):
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
ret, binary = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)
contours, _ = cv2.findContours(binary, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
edges = cv2.Canny(gray, 50, 150, apertureSize=3)
lines = cv2.HoughLines(edges, 1, np.pi / 180, 200)
if len(contours) == 0:
if lines is None:
return image
largest_contour = max(contours, key=cv2.contourArea)
mu = cv2.moments(largest_contour)
if mu["m00"] == 0:
return image
x_centroid = int(mu["m10"] / mu["m00"])
y_centroid = int(mu["m01"] / mu["m00"])
# compute the median angle of the lines
angles = []
for rho, theta in lines[:, 0]:
angles.append((theta * 180) / np.pi - 90)
coords = np.column_stack(np.where(binary > 0))
u, _, vt = np.linalg.svd(coords - np.array([[y_centroid, x_centroid]]), full_matrices=False)
angle = np.arctan2(u[1, 0], u[0, 0]) * 180 / np.pi
if angle < -45:
angle = -(90 + angle)
else:
angle = -angle
angle = np.median(angles)
if abs(angle) < angle_threshold:
return image
@@ -73,18 +62,19 @@ def auto_rotate(image, angle_threshold=10):
def crop_borders(image, border_color, tolerance=30):
mask = cv2.inRange(image, border_color - tolerance, border_color + tolerance)
contours, _ = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
if len(contours) == 0:
return image
largest_contour = max(contours, key=cv2.contourArea)
x, y, w, h = cv2.boundingRect(largest_contour)
return image[y:y+h, x:x+w]
def split_photos(input_file, output_directory, tolerance=30, min_area=10000, min_contour_area=500, angle_threshold=10, border_size=0):
image = cv2.imread(input_file)
background_color = estimate_background_color(image)
@@ -112,23 +102,15 @@ def split_photos(input_file, output_directory, tolerance=30, min_area=10000, min
print(f"Saved {output_path}")
if __name__ == "__main__":
if len(sys.argv) < 2:
print("Usage: python3 split_photos.py <input_file> <output_directory> [tolerance] [min_area] [min_contour_area] [angle_threshold] [border_size]")
print("\nParameters:")
print(" <input_file> - The input scanned image containing multiple photos.")
print(" <output_directory> - The directory where the result images should be placed.")
print(" [tolerance] - Optional. Determines the range of color variation around the estimated background color (default: 30).")
print(" [min_area] - Optional. Sets the minimum area threshold for a photo (default: 10000).")
print(" [min_contour_area] - Optional. Sets the minimum contour area threshold for a photo (default: 500).")
print(" [angle_threshold] - Optional. Sets the minimum absolute angle required for the image to be rotated (default: 10).")
print(" [border_size] - Optional. Sets the size of the border added and removed to prevent white borders in the output (default: 0).")
sys.exit(1)
parser = argparse.ArgumentParser(description="Split photos in an image")
parser.add_argument("input_file", help="The input scanned image containing multiple photos.")
parser.add_argument("output_directory", help="The directory where the result images should be placed.")
parser.add_argument("--tolerance", type=int, default=30, help="Determines the range of color variation around the estimated background color (default: 30).")
parser.add_argument("--min_area", type=int, default=10000, help="Sets the minimum area threshold for a photo (default: 10000).")
parser.add_argument("--min_contour_area", type=int, default=500, help="Sets the minimum contour area threshold for a photo (default: 500).")
parser.add_argument("--angle_threshold", type=int, default=10, help="Sets the minimum absolute angle required for the image to be rotated (default: 10).")
parser.add_argument("--border_size", type=int, default=0, help="Sets the size of the border added and removed to prevent white borders in the output (default: 0).")
input_file = sys.argv[1]
output_directory = sys.argv[2]
tolerance = int(sys.argv[3]) if len(sys.argv) > 3 else 20
min_area = int(sys.argv[4]) if len(sys.argv) > 4 else 8000
min_contour_area = int(sys.argv[5]) if len(sys.argv) > 5 else 500
angle_threshold = int(sys.argv[6]) if len(sys.argv) > 6 else 60
border_size = int(sys.argv[7]) if len(sys.argv) > 7 else 0
split_photos(input_file, output_directory, tolerance=tolerance, min_area=min_area, min_contour_area=min_contour_area, angle_threshold=angle_threshold, border_size=border_size)
args = parser.parse_args()
split_photos(args.input_file, args.output_directory, tolerance=args.tolerance, min_area=args.min_area, min_contour_area=args.min_contour_area, angle_threshold=args.angle_threshold, border_size=args.border_size)

View File

@@ -1 +1 @@
rootProject.name = 'S-PDF'
rootProject.name = 'Stirling-PDF'

View File

@@ -0,0 +1,64 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.pdfbox.examples.signature;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.asn1.cms.CMSObjectIdentifiers;
import org.bouncycastle.cms.CMSException;
import org.bouncycastle.cms.CMSTypedData;
/**
* Wraps a InputStream into a CMSProcessable object for bouncy castle. It's a memory saving
* alternative to the {@link org.bouncycastle.cms.CMSProcessableByteArray CMSProcessableByteArray}
* class.
*
* @author Thomas Chojecki
*/
class CMSProcessableInputStream implements CMSTypedData {
private final InputStream in;
private final ASN1ObjectIdentifier contentType;
CMSProcessableInputStream(InputStream is) {
this(new ASN1ObjectIdentifier(CMSObjectIdentifiers.data.getId()), is);
}
CMSProcessableInputStream(ASN1ObjectIdentifier type, InputStream is) {
contentType = type;
in = is;
}
@Override
public Object getContent() {
return in;
}
@Override
public void write(OutputStream out) throws IOException, CMSException {
// read the content only one time
in.transferTo(out);
in.close();
}
@Override
public ASN1ObjectIdentifier getContentType() {
return contentType;
}
}

View File

@@ -0,0 +1,170 @@
/*
* Copyright 2015 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.pdfbox.examples.signature;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import java.security.GeneralSecurityException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.UnrecoverableKeyException;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.Arrays;
import java.util.Enumeration;
import org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface;
import org.bouncycastle.cert.jcajce.JcaCertStore;
import org.bouncycastle.cms.CMSException;
import org.bouncycastle.cms.CMSSignedData;
import org.bouncycastle.cms.CMSSignedDataGenerator;
import org.bouncycastle.cms.jcajce.JcaSignerInfoGeneratorBuilder;
import org.bouncycastle.operator.ContentSigner;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder;
import org.bouncycastle.operator.jcajce.JcaDigestCalculatorProviderBuilder;
public abstract class CreateSignatureBase implements SignatureInterface {
private PrivateKey privateKey;
private Certificate[] certificateChain;
private String tsaUrl;
private boolean externalSigning;
/**
* Initialize the signature creator with a keystore (pkcs12) and pin that should be used for the
* signature.
*
* @param keystore is a pkcs12 keystore.
* @param pin is the pin for the keystore / private key
* @throws KeyStoreException if the keystore has not been initialized (loaded)
* @throws NoSuchAlgorithmException if the algorithm for recovering the key cannot be found
* @throws UnrecoverableKeyException if the given password is wrong
* @throws CertificateException if the certificate is not valid as signing time
* @throws IOException if no certificate could be found
*/
public CreateSignatureBase(KeyStore keystore, char[] pin)
throws KeyStoreException,
UnrecoverableKeyException,
NoSuchAlgorithmException,
IOException,
CertificateException {
// grabs the first alias from the keystore and get the private key. An
// alternative method or constructor could be used for setting a specific
// alias that should be used.
Enumeration<String> aliases = keystore.aliases();
String alias;
Certificate cert = null;
while (cert == null && aliases.hasMoreElements()) {
alias = aliases.nextElement();
setPrivateKey((PrivateKey) keystore.getKey(alias, pin));
Certificate[] certChain = keystore.getCertificateChain(alias);
if (certChain != null) {
setCertificateChain(certChain);
cert = certChain[0];
if (cert instanceof X509Certificate) {
// avoid expired certificate
((X509Certificate) cert).checkValidity();
//// SigUtils.checkCertificateUsage((X509Certificate) cert);
}
}
}
if (cert == null) {
throw new IOException("Could not find certificate");
}
}
public final void setPrivateKey(PrivateKey privateKey) {
this.privateKey = privateKey;
}
public final void setCertificateChain(final Certificate[] certificateChain) {
this.certificateChain = certificateChain;
}
public Certificate[] getCertificateChain() {
return certificateChain;
}
public void setTsaUrl(String tsaUrl) {
this.tsaUrl = tsaUrl;
}
/**
* SignatureInterface sample implementation.
*
* <p>This method will be called from inside of the pdfbox and create the PKCS #7 signature. The
* given InputStream contains the bytes that are given by the byte range.
*
* <p>This method is for internal use only.
*
* <p>Use your favorite cryptographic library to implement PKCS #7 signature creation. If you
* want to create the hash and the signature separately (e.g. to transfer only the hash to an
* external application), read <a href="https://stackoverflow.com/questions/41767351">this
* answer</a> or <a href="https://stackoverflow.com/questions/56867465">this answer</a>.
*
* @throws IOException
*/
@Override
public byte[] sign(InputStream content) throws IOException {
// cannot be done private (interface)
try {
CMSSignedDataGenerator gen = new CMSSignedDataGenerator();
X509Certificate cert = (X509Certificate) certificateChain[0];
ContentSigner sha1Signer =
new JcaContentSignerBuilder("SHA256WithRSA").build(privateKey);
gen.addSignerInfoGenerator(
new JcaSignerInfoGeneratorBuilder(
new JcaDigestCalculatorProviderBuilder().build())
.build(sha1Signer, cert));
gen.addCertificates(new JcaCertStore(Arrays.asList(certificateChain)));
CMSProcessableInputStream msg = new CMSProcessableInputStream(content);
CMSSignedData signedData = gen.generate(msg, false);
if (tsaUrl != null && !tsaUrl.isEmpty()) {
ValidationTimeStamp validation = new ValidationTimeStamp(tsaUrl);
signedData = validation.addSignedTimeStamp(signedData);
}
return signedData.getEncoded();
} catch (GeneralSecurityException
| CMSException
| OperatorCreationException
| URISyntaxException e) {
throw new IOException(e);
}
}
/**
* Set if external signing scenario should be used. If {@code false}, SignatureInterface would
* be used for signing.
*
* <p>Default: {@code false}
*
* @param externalSigning {@code true} if external signing should be performed
*/
public void setExternalSigning(boolean externalSigning) {
this.externalSigning = externalSigning;
}
public boolean isExternalSigning() {
return externalSigning;
}
}

View File

@@ -0,0 +1,176 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.pdfbox.examples.signature;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.math.BigInteger;
import java.net.URL;
import java.net.URLConnection;
import java.nio.charset.StandardCharsets;
import java.security.DigestInputStream;
import java.security.MessageDigest;
import java.security.SecureRandom;
import java.util.Base64;
import java.util.Random;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.operator.DefaultDigestAlgorithmIdentifierFinder;
import org.bouncycastle.operator.DigestAlgorithmIdentifierFinder;
import org.bouncycastle.tsp.TSPException;
import org.bouncycastle.tsp.TimeStampRequest;
import org.bouncycastle.tsp.TimeStampRequestGenerator;
import org.bouncycastle.tsp.TimeStampResponse;
import org.bouncycastle.tsp.TimeStampToken;
/**
* Time Stamping Authority (TSA) Client [RFC 3161].
*
* @author Vakhtang Koroghlishvili
* @author John Hewson
*/
public class TSAClient {
private static final Logger LOG = LogManager.getLogger(TSAClient.class);
private static final DigestAlgorithmIdentifierFinder ALGORITHM_OID_FINDER =
new DefaultDigestAlgorithmIdentifierFinder();
private final URL url;
private final String username;
private final String password;
private final MessageDigest digest;
// SecureRandom.getInstanceStrong() would be better, but sometimes blocks on Linux
private static final Random RANDOM = new SecureRandom();
/**
* @param url the URL of the TSA service
* @param username user name of TSA
* @param password password of TSA
* @param digest the message digest to use
*/
public TSAClient(URL url, String username, String password, MessageDigest digest) {
this.url = url;
this.username = username;
this.password = password;
this.digest = digest;
}
/**
* @param content
* @return the time stamp token
* @throws IOException if there was an error with the connection or data from the TSA server, or
* if the time stamp response could not be validated
*/
public TimeStampToken getTimeStampToken(InputStream content) throws IOException {
digest.reset();
DigestInputStream dis = new DigestInputStream(content, digest);
while (dis.read() != -1) {
// do nothing
}
byte[] hash = digest.digest();
// 32-bit cryptographic nonce
int nonce = RANDOM.nextInt();
// generate TSA request
TimeStampRequestGenerator tsaGenerator = new TimeStampRequestGenerator();
tsaGenerator.setCertReq(true);
ASN1ObjectIdentifier oid = ALGORITHM_OID_FINDER.find(digest.getAlgorithm()).getAlgorithm();
TimeStampRequest request = tsaGenerator.generate(oid, hash, BigInteger.valueOf(nonce));
// get TSA response
byte[] tsaResponse = getTSAResponse(request.getEncoded());
TimeStampResponse response;
try {
response = new TimeStampResponse(tsaResponse);
response.validate(request);
} catch (TSPException e) {
throw new IOException(e);
}
TimeStampToken timeStampToken = response.getTimeStampToken();
if (timeStampToken == null) {
// https://www.ietf.org/rfc/rfc3161.html#section-2.4.2
throw new IOException(
"Response from "
+ url
+ " does not have a time stamp token, status: "
+ response.getStatus()
+ " ("
+ response.getStatusString()
+ ")");
}
return timeStampToken;
}
// gets response data for the given encoded TimeStampRequest data
// throws IOException if a connection to the TSA cannot be established
private byte[] getTSAResponse(byte[] request) throws IOException {
LOG.debug("Opening connection to TSA server");
// todo: support proxy servers
URLConnection connection = url.openConnection();
connection.setDoOutput(true);
connection.setDoInput(true);
connection.setRequestProperty("Content-Type", "application/timestamp-query");
LOG.debug("Established connection to TSA server");
if (username != null && password != null && !username.isEmpty() && !password.isEmpty()) {
String contentEncoding = connection.getContentEncoding();
if (contentEncoding == null) {
contentEncoding = StandardCharsets.UTF_8.name();
}
connection.setRequestProperty(
"Authorization",
"Basic "
+ new String(
Base64.getEncoder()
.encode(
(username + ":" + password)
.getBytes(contentEncoding))));
}
// read response
try (OutputStream output = connection.getOutputStream()) {
output.write(request);
} catch (IOException ex) {
LOG.error("Exception when writing to {}", this.url, ex);
throw ex;
}
LOG.debug("Waiting for response from TSA server");
byte[] response;
try (InputStream input = connection.getInputStream()) {
response = input.readAllBytes();
} catch (IOException ex) {
LOG.error("Exception when reading from {}", this.url, ex);
throw ex;
}
LOG.debug("Received response from TSA server");
return response;
}
}

View File

@@ -0,0 +1,134 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.pdfbox.examples.signature;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.List;
import org.bouncycastle.asn1.ASN1Encodable;
import org.bouncycastle.asn1.ASN1EncodableVector;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.DERSet;
import org.bouncycastle.asn1.cms.Attribute;
import org.bouncycastle.asn1.cms.AttributeTable;
import org.bouncycastle.asn1.cms.Attributes;
import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
import org.bouncycastle.cms.CMSSignedData;
import org.bouncycastle.cms.SignerInformation;
import org.bouncycastle.cms.SignerInformationStore;
import org.bouncycastle.tsp.TimeStampToken;
/**
* This class wraps the TSAClient and the work that has to be done with it. Like Adding Signed
* TimeStamps to a signature, or creating a CMS timestamp attribute (with a signed timestamp)
*
* @author Others
* @author Alexis Suter
*/
public class ValidationTimeStamp {
private TSAClient tsaClient;
/**
* @param tsaUrl The url where TS-Request will be done.
* @throws NoSuchAlgorithmException
* @throws MalformedURLException
* @throws java.net.URISyntaxException
*/
public ValidationTimeStamp(String tsaUrl)
throws NoSuchAlgorithmException, MalformedURLException, URISyntaxException {
if (tsaUrl != null) {
MessageDigest digest = MessageDigest.getInstance("SHA-256");
this.tsaClient = new TSAClient(new URI(tsaUrl).toURL(), null, null, digest);
}
}
/**
* Creates a signed timestamp token by the given input stream.
*
* @param content InputStream of the content to sign
* @return the byte[] of the timestamp token
* @throws IOException
*/
public byte[] getTimeStampToken(InputStream content) throws IOException {
TimeStampToken timeStampToken = tsaClient.getTimeStampToken(content);
return timeStampToken.getEncoded();
}
/**
* Extend cms signed data with TimeStamp first or to all signers
*
* @param signedData Generated CMS signed data
* @return CMSSignedData Extended CMS signed data
* @throws IOException
*/
public CMSSignedData addSignedTimeStamp(CMSSignedData signedData) throws IOException {
SignerInformationStore signerStore = signedData.getSignerInfos();
List<SignerInformation> newSigners = new ArrayList<>();
for (SignerInformation signer : signerStore.getSigners()) {
// This adds a timestamp to every signer (into his unsigned attributes) in the
// signature.
newSigners.add(signTimeStamp(signer));
}
// Because new SignerInformation is created, new SignerInfoStore has to be created
// and also be replaced in signedData. Which creates a new signedData object.
return CMSSignedData.replaceSigners(signedData, new SignerInformationStore(newSigners));
}
/**
* Extend CMS Signer Information with the TimeStampToken into the unsigned Attributes.
*
* @param signer information about signer
* @return information about SignerInformation
* @throws IOException
*/
private SignerInformation signTimeStamp(SignerInformation signer) throws IOException {
AttributeTable unsignedAttributes = signer.getUnsignedAttributes();
ASN1EncodableVector vector = new ASN1EncodableVector();
if (unsignedAttributes != null) {
vector = unsignedAttributes.toASN1EncodableVector();
}
TimeStampToken timeStampToken =
tsaClient.getTimeStampToken(new ByteArrayInputStream(signer.getSignature()));
byte[] token = timeStampToken.getEncoded();
ASN1ObjectIdentifier oid = PKCSObjectIdentifiers.id_aa_signatureTimeStampToken;
ASN1Encodable signatureTimeStamp =
new Attribute(oid, new DERSet(ASN1Primitive.fromByteArray(token)));
vector.add(signatureTimeStamp);
Attributes signedAttributes = new Attributes(vector);
// There is no other way changing the unsigned attributes of the signer information.
// result is never null, new SignerInformation always returned,
// see source code of replaceUnsignedAttributes
return SignerInformation.replaceUnsignedAttributes(
signer, new AttributeTable(signedAttributes));
}
}

View File

@@ -0,0 +1,82 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.pdfbox.examples.util;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
/**
* Delegate class to close the connection when the class gets closed.
*
* @author Tilman Hausherr
*/
public class ConnectedInputStream extends InputStream {
HttpURLConnection con;
InputStream is;
public ConnectedInputStream(HttpURLConnection con, InputStream is) {
this.con = con;
this.is = is;
}
@Override
public int read() throws IOException {
return is.read();
}
@Override
public int read(byte[] b) throws IOException {
return is.read(b);
}
@Override
public int read(byte[] b, int off, int len) throws IOException {
return is.read(b, off, len);
}
@Override
public long skip(long n) throws IOException {
return is.skip(n);
}
@Override
public int available() throws IOException {
return is.available();
}
@Override
public synchronized void mark(int readlimit) {
is.mark(readlimit);
}
@Override
public synchronized void reset() throws IOException {
is.reset();
}
@Override
public boolean markSupported() {
return is.markSupported();
}
@Override
public void close() throws IOException {
is.close();
con.disconnect();
}
}

View File

@@ -6,6 +6,8 @@ import java.net.Socket;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import io.github.pixee.security.SystemCommand;
public class LibreOfficeListener {
private static final long ACTIVITY_TIMEOUT = 20 * 60 * 1000; // 20 minutes
@@ -22,14 +24,14 @@ public class LibreOfficeListener {
private Process process;
private LibreOfficeListener() {
}
private LibreOfficeListener() {}
private boolean isListenerRunning() {
try {
System.out.println("waiting for listener to start");
Socket socket = new Socket();
socket.connect(new InetSocketAddress("localhost", 2002), 1000); // Timeout after 1 second
socket.connect(
new InetSocketAddress("localhost", 2002), 1000); // Timeout after 1 second
socket.close();
return true;
} catch (IOException e) {
@@ -44,26 +46,27 @@ public class LibreOfficeListener {
}
// Start the listener process
process = Runtime.getRuntime().exec("unoconv --listener");
process = SystemCommand.runCommand(Runtime.getRuntime(), "unoconv --listener");
lastActivityTime = System.currentTimeMillis();
// Start a background thread to monitor the activity timeout
executorService = Executors.newSingleThreadExecutor();
executorService.submit(() -> {
while (true) {
long idleTime = System.currentTimeMillis() - lastActivityTime;
if (idleTime >= ACTIVITY_TIMEOUT) {
// If there has been no activity for too long, tear down the listener
process.destroy();
break;
}
try {
Thread.sleep(5000); // Check for inactivity every 5 seconds
} catch (InterruptedException e) {
break;
}
}
});
executorService.submit(
() -> {
while (true) {
long idleTime = System.currentTimeMillis() - lastActivityTime;
if (idleTime >= ACTIVITY_TIMEOUT) {
// If there has been no activity for too long, tear down the listener
process.destroy();
break;
}
try {
Thread.sleep(5000); // Check for inactivity every 5 seconds
} catch (InterruptedException e) {
break;
}
}
});
// Wait for the listener to start up
long startTime = System.currentTimeMillis();
@@ -92,5 +95,4 @@ public class LibreOfficeListener {
process.destroy();
}
}
}

View File

@@ -1,11 +1,106 @@
package stirling.software.SPDF;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collections;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableScheduling;
import io.github.pixee.security.SystemCommand;
import jakarta.annotation.PostConstruct;
import stirling.software.SPDF.config.ConfigInitializer;
import stirling.software.SPDF.model.ApplicationProperties;
@SpringBootApplication
@EnableScheduling
public class SPdfApplication {
public static void main(String[] args) {
SpringApplication.run(SPdfApplication.class, args);
private static final Logger logger = LoggerFactory.getLogger(SPdfApplication.class);
@Autowired private Environment env;
@Autowired ApplicationProperties applicationProperties;
private static String serverPortStatic;
@Value("${server.port:8080}")
public void setServerPortStatic(String port) {
SPdfApplication.serverPortStatic = port;
}
}
@PostConstruct
public void init() {
// Check if the BROWSER_OPEN environment variable is set to true
String browserOpenEnv = env.getProperty("BROWSER_OPEN");
boolean browserOpen = browserOpenEnv != null && "true".equalsIgnoreCase(browserOpenEnv);
if (browserOpen) {
try {
String url = "http://localhost:" + getNonStaticPort();
String os = System.getProperty("os.name").toLowerCase();
Runtime rt = Runtime.getRuntime();
if (os.contains("win")) {
// For Windows
SystemCommand.runCommand(rt, "rundll32 url.dll,FileProtocolHandler " + url);
}
} catch (Exception e) {
logger.error("Error opening browser: {}", e.getMessage());
}
}
logger.info("Running configs {}", applicationProperties.toString());
}
public static void main(String[] args) throws IOException, InterruptedException {
SpringApplication app = new SpringApplication(SPdfApplication.class);
app.addInitializers(new ConfigInitializer());
if (Files.exists(Paths.get("configs/settings.yml"))) {
app.setDefaultProperties(
Collections.singletonMap(
"spring.config.additional-location", "file:configs/settings.yml"));
} else {
logger.warn(
"External configuration file 'configs/settings.yml' does not exist. Using default configuration and environment configuration instead.");
}
app.run(args);
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException("Thread interrupted while sleeping", e);
}
try {
Files.createDirectories(Path.of("customFiles/static/"));
Files.createDirectories(Path.of("customFiles/templates/"));
} catch (Exception e) {
logger.error("Error creating directories: {}", e.getMessage());
}
printStartupLogs();
}
private static void printStartupLogs() {
logger.info("Stirling-PDF Started.");
String url = "http://localhost:" + getStaticPort();
logger.info("Navigate to {}", url);
}
public static String getStaticPort() {
return serverPortStatic;
}
public String getNonStaticPort() {
return serverPortStatic;
}
}

View File

@@ -1,42 +1,88 @@
package stirling.software.SPDF.config;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Properties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import stirling.software.SPDF.model.ApplicationProperties;
@Configuration
public class AppConfig {
@Autowired ApplicationProperties applicationProperties;
@Bean(name = "loginEnabled")
public boolean loginEnabled() {
return applicationProperties.getSecurity().getEnableLogin();
}
@Bean(name = "appName")
public String appName() {
String appName = System.getProperty("APP_HOME_NAME");
if (appName == null)
appName = System.getenv("APP_HOME_NAME");
return (appName != null) ? appName : "Stirling PDF";
String homeTitle = applicationProperties.getUi().getAppName();
return (homeTitle != null) ? homeTitle : "Stirling PDF";
}
@Bean(name = "appVersion")
public String appVersion() {
String version = getClass().getPackage().getImplementationVersion();
return (version != null) ? version : "0.3.3";
Resource resource = new ClassPathResource("version.properties");
Properties props = new Properties();
try {
props.load(resource.getInputStream());
return props.getProperty("version");
} catch (IOException e) {
e.printStackTrace();
}
return "0.0.0";
}
@Bean(name = "homeText")
public String homeText() {
String homeText = System.getProperty("APP_HOME_DESCRIPTION");
if (homeText == null)
homeText = System.getenv("APP_HOME_DESCRIPTION");
return (homeText != null) ? homeText : "null";
return (applicationProperties.getUi().getHomeDescription() != null)
? applicationProperties.getUi().getHomeDescription()
: "null";
}
@Bean(name = "navBarText")
public String navBarText() {
String navBarText = System.getProperty("APP_NAVBAR_NAME");
if (navBarText == null)
navBarText = System.getenv("APP_NAVBAR_NAME");
if (navBarText == null)
navBarText = System.getProperty("APP_HOME_NAME");
if (navBarText == null)
navBarText = System.getenv("APP_HOME_NAME");
return (navBarText != null) ? navBarText : "Stirling PDF";
String defaultNavBar =
applicationProperties.getUi().getAppNameNavbar() != null
? applicationProperties.getUi().getAppNameNavbar()
: applicationProperties.getUi().getAppName();
return (defaultNavBar != null) ? defaultNavBar : "Stirling PDF";
}
}
@Bean(name = "enableAlphaFunctionality")
public boolean enableAlphaFunctionality() {
return applicationProperties.getSystem().getEnableAlphaFunctionality() != null
? applicationProperties.getSystem().getEnableAlphaFunctionality()
: false;
}
@Bean(name = "rateLimit")
public boolean rateLimit() {
String appName = System.getProperty("rateLimit");
if (appName == null) appName = System.getenv("rateLimit");
return (appName != null) ? Boolean.valueOf(appName) : false;
}
@Bean(name = "RunningInDocker")
public boolean runningInDocker() {
return Files.exists(Paths.get("/.dockerenv"));
}
@Bean(name = "bookAndHtmlFormatsInstalled")
public boolean bookAndHtmlFormatsInstalled() {
String installOps = System.getProperty("INSTALL_BOOK_AND_ADVANCED_HTML_OPS");
if (installOps == null) {
installOps = System.getenv("INSTALL_BOOK_AND_ADVANCED_HTML_OPS");
}
return "true".equalsIgnoreCase(installOps);
}
}

View File

@@ -2,6 +2,7 @@ package stirling.software.SPDF.config;
import java.util.Locale;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.LocaleResolver;
@@ -10,9 +11,13 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import org.springframework.web.servlet.i18n.SessionLocaleResolver;
import stirling.software.SPDF.model.ApplicationProperties;
@Configuration
public class Beans implements WebMvcConfigurer {
@Autowired ApplicationProperties applicationProperties;
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(localeChangeInterceptor());
@@ -30,10 +35,9 @@ public class Beans implements WebMvcConfigurer {
public LocaleResolver localeResolver() {
SessionLocaleResolver slr = new SessionLocaleResolver();
String appLocaleEnv = System.getProperty("APP_LOCALE");
if (appLocaleEnv == null)
appLocaleEnv = System.getenv("APP_LOCALE");
Locale defaultLocale = Locale.UK; // Fallback to UK locale if environment variable is not set
String appLocaleEnv = applicationProperties.getSystem().getDefaultLocale();
Locale defaultLocale =
Locale.UK; // Fallback to UK locale if environment variable is not set
if (appLocaleEnv != null && !appLocaleEnv.isEmpty()) {
Locale tempLocale = Locale.forLanguageTag(appLocaleEnv);
@@ -42,12 +46,19 @@ public class Beans implements WebMvcConfigurer {
if (appLocaleEnv.equalsIgnoreCase(tempLanguageTag)) {
defaultLocale = tempLocale;
} else {
System.err.println("Invalid APP_LOCALE environment variable value. Falling back to default Locale.UK.");
tempLocale = Locale.forLanguageTag(appLocaleEnv.replace("_", "-"));
tempLanguageTag = tempLocale.toLanguageTag();
if (appLocaleEnv.equalsIgnoreCase(tempLanguageTag)) {
defaultLocale = tempLocale;
} else {
System.err.println(
"Invalid APP_LOCALE environment variable value. Falling back to default Locale.UK.");
}
}
}
slr.setDefaultLocale(defaultLocale);
return slr;
}
}

View File

@@ -1,6 +1,9 @@
package stirling.software.SPDF.config;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
@@ -10,24 +13,44 @@ import jakarta.servlet.http.HttpServletResponse;
public class CleanUrlInterceptor implements HandlerInterceptor {
private static final Pattern LANG_PATTERN = Pattern.compile("&?lang=([^&]+)");
private static final List<String> ALLOWED_PARAMS =
Arrays.asList(
"lang", "endpoint", "endpoints", "logout", "error", "file", "messageType");
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
public boolean preHandle(
HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {
String queryString = request.getQueryString();
if (queryString != null && !queryString.isEmpty()) {
String requestURI = request.getRequestURI();
Map<String, String> parameters = new HashMap<>();
// Keep the lang parameter if it exists
Matcher langMatcher = LANG_PATTERN.matcher(queryString);
String langQueryString = langMatcher.find() ? "lang=" + langMatcher.group(1) : "";
// Keep only the allowed parameters
String[] queryParameters = queryString.split("&");
for (String param : queryParameters) {
String[] keyValue = param.split("=");
if (keyValue.length != 2) {
continue;
}
if (ALLOWED_PARAMS.contains(keyValue[0])) {
parameters.put(keyValue[0], keyValue[1]);
}
}
// Check if there are any other query parameters besides the lang parameter
String remainingQueryString = queryString.replaceAll(LANG_PATTERN.pattern(), "").replaceAll("&+", "&").replaceAll("^&|&$", "");
// If there are any parameters that are not allowed
if (parameters.size() != queryParameters.length) {
// Construct new query string
StringBuilder newQueryString = new StringBuilder();
for (Map.Entry<String, String> entry : parameters.entrySet()) {
if (newQueryString.length() > 0) {
newQueryString.append("&");
}
newQueryString.append(entry.getKey()).append("=").append(entry.getValue());
}
if (!remainingQueryString.isEmpty()) {
// Redirect to the URL without other query parameters
String redirectUrl = requestURI + (langQueryString.isEmpty() ? "" : "?" + langQueryString);
// Redirect to the URL with only allowed query parameters
String redirectUrl = requestURI + "?" + newQueryString;
response.sendRedirect(redirectUrl);
return false;
}
@@ -36,10 +59,16 @@ public class CleanUrlInterceptor implements HandlerInterceptor {
}
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) {
}
public void postHandle(
HttpServletRequest request,
HttpServletResponse response,
Object handler,
ModelAndView modelAndView) {}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {
}
public void afterCompletion(
HttpServletRequest request,
HttpServletResponse response,
Object handler,
Exception ex) {}
}

View File

@@ -0,0 +1,220 @@
package stirling.software.SPDF.config;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
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;
import org.springframework.context.ConfigurableApplicationContext;
public class ConfigInitializer
implements ApplicationContextInitializer<ConfigurableApplicationContext> {
@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");
// 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<String> 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);
}
}
public void mergeYamlFiles(List<String> templateLines, Path userFilePath, Path outputPath)
throws IOException {
List<String> userLines = Files.readAllLines(userFilePath);
List<String> mergedLines = new ArrayList<>();
boolean insideAutoGenerated = false;
boolean beforeFirstKey = true;
Function<String, Boolean> isCommented = line -> line.trim().startsWith("#");
Function<String, String> extractKey =
line -> {
String[] parts = line.split(":");
return parts.length > 0 ? parts[0].trim().replace("#", "").trim() : "";
};
Function<String, Integer> getIndentationLevel =
line -> {
int count = 0;
for (char ch : line.toCharArray()) {
if (ch == ' ') count++;
else break;
}
return count;
};
Set<String> userKeys = userLines.stream().map(extractKey).collect(Collectors.toSet());
for (String line : templateLines) {
String key = extractKey.apply(line);
if ("AutomaticallyGenerated:".equalsIgnoreCase(line.trim())) {
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<String> 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)) {
if (!childOfTemplateEntry(
isCommented,
extractKey,
getIndentationLevel,
userLines,
userLine,
templateLines)) {
// check if userLine is a child of a entry within templateLines or not, if child
// of parent in templateLines then dont add to mergedLines, if anything else
// then add
mergedLines.add(userLine);
}
}
}
Files.write(outputPath, mergedLines, StandardCharsets.UTF_8);
}
// New method to check if a userLine is a child of an entry in templateLines
boolean childOfTemplateEntry(
Function<String, Boolean> isCommented,
Function<String, String> extractKey,
Function<String, Integer> getIndentationLevel,
List<String> userLines,
String userLine,
List<String> templateLines) {
String userKey = extractKey.apply(userLine).trim();
int userIndentation = getIndentationLevel.apply(userLine);
// Start by assuming the line is not a child of an entry in templateLines
boolean isChild = false;
// Iterate backwards through userLines from the current line to find any parent
for (int i = userLines.indexOf(userLine) - 1; i >= 0; i--) {
String potentialParentLine = userLines.get(i);
int parentIndentation = getIndentationLevel.apply(potentialParentLine);
// Check if we've reached a potential parent based on indentation
if (parentIndentation < userIndentation) {
String parentKey = extractKey.apply(potentialParentLine).trim();
// Now, check if this potential parent or any of its parents exist in templateLines
boolean parentExistsInTemplate =
templateLines.stream()
.filter(line -> !isCommented.apply(line)) // Skip commented lines
.anyMatch(
templateLine -> {
String templateKey =
extractKey.apply(templateLine).trim();
return parentKey.equalsIgnoreCase(templateKey);
});
if (!parentExistsInTemplate) {
// If the parent does not exist in template, check the next level parent
userIndentation =
parentIndentation; // Update userIndentation to the parent's indentation
// for next iteration
if (parentIndentation == 0) {
// If we've reached the top-level parent and it's not in template, the
// original line is considered not a child
isChild = false;
break;
}
} else {
// If any parent exists in template, the original line is considered a child
isChild = true;
break;
}
}
}
return isChild; // Return true if the line is not a child of any entry in templateLines
}
}

View File

@@ -1,33 +1,50 @@
package stirling.software.SPDF.config;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Service;
import stirling.software.SPDF.model.ApplicationProperties;
@Service
@DependsOn({"bookAndHtmlFormatsInstalled"})
public class EndpointConfiguration {
private static final Logger logger = LoggerFactory.getLogger(EndpointConfiguration.class);
private Map<String, Boolean> endpointStatuses = new ConcurrentHashMap<>();
private Map<String, Set<String>> endpointGroups = new ConcurrentHashMap<>();
public EndpointConfiguration() {
private final ApplicationProperties applicationProperties;
private boolean bookAndHtmlFormatsInstalled;
@Autowired
public EndpointConfiguration(
ApplicationProperties applicationProperties,
@Qualifier("bookAndHtmlFormatsInstalled") boolean bookAndHtmlFormatsInstalled) {
this.applicationProperties = applicationProperties;
this.bookAndHtmlFormatsInstalled = bookAndHtmlFormatsInstalled;
init();
processEnvironmentConfigs();
}
public void enableEndpoint(String endpoint) {
endpointStatuses.put(endpoint, true);
}
public void disableEndpoint(String endpoint) {
logger.info("Disabling {}", endpoint);
endpointStatuses.put(endpoint, false);
if (!endpointStatuses.containsKey(endpoint) || endpointStatuses.get(endpoint) != false) {
logger.info("Disabling {}", endpoint);
endpointStatuses.put(endpoint, false);
}
}
public boolean isEndpointEnabled(String endpoint) {
@@ -58,7 +75,7 @@ public class EndpointConfiguration {
}
}
}
public void init() {
// Adding endpoints to "PageOps" group
addEndpointToGroup("PageOps", "remove-pages");
@@ -66,6 +83,16 @@ public class EndpointConfiguration {
addEndpointToGroup("PageOps", "split-pdfs");
addEndpointToGroup("PageOps", "pdf-organizer");
addEndpointToGroup("PageOps", "rotate-pdf");
addEndpointToGroup("PageOps", "multi-page-layout");
addEndpointToGroup("PageOps", "scale-pages");
addEndpointToGroup("PageOps", "adjust-contrast");
addEndpointToGroup("PageOps", "crop");
addEndpointToGroup("PageOps", "auto-split-pdf");
addEndpointToGroup("PageOps", "extract-page");
addEndpointToGroup("PageOps", "pdf-to-single-page");
addEndpointToGroup("PageOps", "split-by-size-or-count");
addEndpointToGroup("PageOps", "overlay-pdf");
addEndpointToGroup("PageOps", "split-pdf-by-sections");
// Adding endpoints to "Convert" group
addEndpointToGroup("Convert", "pdf-to-img");
@@ -78,12 +105,19 @@ public class EndpointConfiguration {
addEndpointToGroup("Convert", "pdf-to-text");
addEndpointToGroup("Convert", "pdf-to-html");
addEndpointToGroup("Convert", "pdf-to-xml");
addEndpointToGroup("Convert", "html-to-pdf");
addEndpointToGroup("Convert", "url-to-pdf");
addEndpointToGroup("Convert", "markdown-to-pdf");
addEndpointToGroup("Convert", "pdf-to-csv");
// Adding endpoints to "Security" group
addEndpointToGroup("Security", "add-password");
addEndpointToGroup("Security", "remove-password");
addEndpointToGroup("Security", "change-permissions");
addEndpointToGroup("Security", "add-watermark");
addEndpointToGroup("Security", "cert-sign");
addEndpointToGroup("Security", "sanitize-pdf");
addEndpointToGroup("Security", "auto-redact");
// Adding endpoints to "Other" group
addEndpointToGroup("Other", "ocr-pdf");
@@ -95,19 +129,17 @@ public class EndpointConfiguration {
addEndpointToGroup("Other", "sign");
addEndpointToGroup("Other", "flatten");
addEndpointToGroup("Other", "repair");
addEndpointToGroup("Other", "remove-blanks");
addEndpointToGroup("Other", REMOVE_BLANKS);
addEndpointToGroup("Other", "remove-annotations");
addEndpointToGroup("Other", "compare");
//CLI
addEndpointToGroup("Other", "add-page-numbers");
addEndpointToGroup("Other", "auto-rename");
addEndpointToGroup("Other", "get-info-on-pdf");
addEndpointToGroup("Other", "show-javascript");
// CLI
addEndpointToGroup("CLI", "compress-pdf");
addEndpointToGroup("CLI", "extract-image-scans");
addEndpointToGroup("CLI", "remove-blanks");
addEndpointToGroup("CLI", "repair");
addEndpointToGroup("CLI", "pdf-to-pdfa");
addEndpointToGroup("CLI", "file-to-pdf");
@@ -118,18 +150,26 @@ public class EndpointConfiguration {
addEndpointToGroup("CLI", "pdf-to-html");
addEndpointToGroup("CLI", "pdf-to-xml");
addEndpointToGroup("CLI", "ocr-pdf");
//python
addEndpointToGroup("Python", "extract-image-scans");
addEndpointToGroup("Python", "remove-blanks");
//openCV
addEndpointToGroup("OpenCV", "extract-image-scans");
addEndpointToGroup("OpenCV", "remove-blanks");
addEndpointToGroup("CLI", "html-to-pdf");
addEndpointToGroup("CLI", "url-to-pdf");
addEndpointToGroup("CLI", "book-to-pdf");
addEndpointToGroup("CLI", "pdf-to-book");
//LibreOffice
// Calibre
addEndpointToGroup("Calibre", "book-to-pdf");
addEndpointToGroup("Calibre", "pdf-to-book");
// python
addEndpointToGroup("Python", "extract-image-scans");
addEndpointToGroup("Python", REMOVE_BLANKS);
addEndpointToGroup("Python", "html-to-pdf");
addEndpointToGroup("Python", "url-to-pdf");
// openCV
addEndpointToGroup("OpenCV", "extract-image-scans");
addEndpointToGroup("OpenCV", REMOVE_BLANKS);
// LibreOffice
addEndpointToGroup("LibreOffice", "repair");
addEndpointToGroup("LibreOffice", "file-to-pdf");
addEndpointToGroup("LibreOffice", "xlsx-to-pdf");
@@ -138,14 +178,13 @@ public class EndpointConfiguration {
addEndpointToGroup("LibreOffice", "pdf-to-text");
addEndpointToGroup("LibreOffice", "pdf-to-html");
addEndpointToGroup("LibreOffice", "pdf-to-xml");
//OCRmyPDF
// OCRmyPDF
addEndpointToGroup("OCRmyPDF", "compress-pdf");
addEndpointToGroup("OCRmyPDF", "pdf-to-pdfa");
addEndpointToGroup("OCRmyPDF", "ocr-pdf");
//Java
// Java
addEndpointToGroup("Java", "merge-pdfs");
addEndpointToGroup("Java", "remove-pages");
addEndpointToGroup("Java", "split-pdfs");
@@ -160,33 +199,51 @@ public class EndpointConfiguration {
addEndpointToGroup("Java", "add-image");
addEndpointToGroup("Java", "extract-images");
addEndpointToGroup("Java", "change-metadata");
//Javascript
addEndpointToGroup("Java", "cert-sign");
addEndpointToGroup("Java", "multi-page-layout");
addEndpointToGroup("Java", "scale-pages");
addEndpointToGroup("Java", "add-page-numbers");
addEndpointToGroup("Java", "auto-rename");
addEndpointToGroup("Java", "auto-split-pdf");
addEndpointToGroup("Java", "sanitize-pdf");
addEndpointToGroup("Java", "crop");
addEndpointToGroup("Java", "get-info-on-pdf");
addEndpointToGroup("Java", "extract-page");
addEndpointToGroup("Java", "pdf-to-single-page");
addEndpointToGroup("Java", "markdown-to-pdf");
addEndpointToGroup("Java", "show-javascript");
addEndpointToGroup("Java", "auto-redact");
addEndpointToGroup("Java", "pdf-to-csv");
addEndpointToGroup("Java", "split-by-size-or-count");
addEndpointToGroup("Java", "overlay-pdf");
addEndpointToGroup("Java", "split-pdf-by-sections");
addEndpointToGroup("Java", REMOVE_BLANKS);
// Javascript
addEndpointToGroup("Javascript", "pdf-organizer");
addEndpointToGroup("Javascript", "sign");
addEndpointToGroup("Javascript", "compare");
addEndpointToGroup("Javascript", "adjust-contrast");
}
private void processEnvironmentConfigs() {
String endpointsToRemove = System.getenv("ENDPOINTS_TO_REMOVE");
String groupsToRemove = System.getenv("GROUPS_TO_REMOVE");
private void processEnvironmentConfigs() {
List<String> endpointsToRemove = applicationProperties.getEndpoints().getToRemove();
List<String> groupsToRemove = applicationProperties.getEndpoints().getGroupsToRemove();
if (!bookAndHtmlFormatsInstalled) {
groupsToRemove.add("Calibre");
}
if (endpointsToRemove != null) {
String[] endpoints = endpointsToRemove.split(",");
for (String endpoint : endpoints) {
for (String endpoint : endpointsToRemove) {
disableEndpoint(endpoint.trim());
}
}
if (groupsToRemove != null) {
String[] groups = groupsToRemove.split(",");
for (String group : groups) {
for (String group : groupsToRemove) {
disableGroup(group.trim());
}
}
}
private static final String REMOVE_BLANKS = "remove-blanks";
}

View File

@@ -10,11 +10,11 @@ import jakarta.servlet.http.HttpServletResponse;
@Component
public class EndpointInterceptor implements HandlerInterceptor {
@Autowired
private EndpointConfiguration endpointConfiguration;
@Autowired private EndpointConfiguration endpointConfiguration;
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
public boolean preHandle(
HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {
String requestURI = request.getRequestURI();
if (!endpointConfiguration.isEndpointEnabled(requestURI)) {
@@ -23,4 +23,4 @@ public class EndpointInterceptor implements HandlerInterceptor {
}
return true;
}
}
}

View File

@@ -1,12 +1,9 @@
package stirling.software.SPDF.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;
import io.micrometer.core.instrument.Counter;
import io.micrometer.core.instrument.Meter;
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.config.MeterFilter;
import io.micrometer.core.instrument.config.MeterFilterReply;
@@ -25,4 +22,4 @@ public class MetricsConfig {
}
};
}
}
}

View File

@@ -3,15 +3,12 @@ package stirling.software.SPDF.config;
import java.io.IOException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;
import io.micrometer.core.instrument.Counter;
import io.micrometer.core.instrument.Meter;
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.config.MeterFilter;
import io.micrometer.core.instrument.config.MeterFilterReply;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
@@ -28,23 +25,40 @@ public class MetricsFilter extends OncePerRequestFilter {
}
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
protected void doFilterInternal(
HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
String uri = request.getRequestURI();
// System.out.println("uri="+uri + ", method=" + request.getMethod() );
// Ignore static resources
if (!(uri.startsWith("/js") || uri.startsWith("/images") || uri.endsWith(".ico") || uri.endsWith(".css") || uri.endsWith(".svg")|| uri.endsWith(".js") || uri.contains("swagger") || uri.startsWith("/api"))) {
Counter counter = Counter.builder("http.requests")
.tag("uri", uri)
.tag("method", request.getMethod())
.register(meterRegistry);
if (!(uri.startsWith("/js")
|| uri.startsWith("/v1/api-docs")
|| uri.endsWith("robots.txt")
|| uri.startsWith("/images")
|| uri.startsWith("/images")
|| uri.endsWith(".png")
|| uri.endsWith(".ico")
|| uri.endsWith(".css")
|| uri.endsWith(".map")
|| uri.endsWith(".svg")
|| uri.endsWith(".js")
|| uri.contains("swagger")
|| uri.startsWith("/api/v1/info")
|| uri.startsWith("/site.webmanifest")
|| uri.startsWith("/fonts")
|| uri.startsWith("/pdfjs"))) {
Counter counter =
Counter.builder("http.requests")
.tag("uri", uri)
.tag("method", request.getMethod())
.register(meterRegistry);
counter.increment();
// System.out.println("Counted");
}
filterChain.doFilter(request, response);
}
}

View File

@@ -1,22 +1,53 @@
package stirling.software.SPDF.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.security.SecurityRequirement;
import io.swagger.v3.oas.models.security.SecurityScheme;
import stirling.software.SPDF.model.ApplicationProperties;
@Configuration
public class OpenApiConfig {
@Autowired ApplicationProperties applicationProperties;
@Bean
public OpenAPI customOpenAPI() {
String version = getClass().getPackage().getImplementationVersion();
version = (version != null) ? version : "1.0.0";
return new OpenAPI().components(new Components()).info(
new Info().title("Stirling PDF API").version(version).description("API documentation for all Server-Side processing.\nPlease note some functionality might be UI only and missing from here."));
}
if (version == null) {
version = "1.0.0"; // default version if all else fails
}
SecurityScheme apiKeyScheme =
new SecurityScheme()
.type(SecurityScheme.Type.APIKEY)
.in(SecurityScheme.In.HEADER)
.name("X-API-KEY");
if (!applicationProperties.getSecurity().getEnableLogin()) {
return new OpenAPI()
.components(new Components())
.info(
new Info()
.title("Stirling PDF API")
.version(version)
.description(
"API documentation for all Server-Side processing.\nPlease note some functionality might be UI only and missing from here."));
} else {
return new OpenAPI()
.components(new Components().addSecuritySchemes("apiKey", apiKeyScheme))
.info(
new Info()
.title("Stirling PDF API")
.version(version)
.description(
"API documentation for all Server-Side processing.\nPlease note some functionality might be UI only and missing from here."))
.addSecurityItem(new SecurityRequirement().addList("apiKey"));
}
}
}

View File

@@ -0,0 +1,18 @@
package stirling.software.SPDF.config;
import java.time.LocalDateTime;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;
@Component
public class StartupApplicationListener implements ApplicationListener<ContextRefreshedEvent> {
public static LocalDateTime startTime;
@Override
public void onApplicationEvent(ContextRefreshedEvent event) {
startTime = LocalDateTime.now();
}
}

View File

@@ -3,16 +3,24 @@ package stirling.software.SPDF.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
@Autowired
private EndpointInterceptor endpointInterceptor;
@Autowired private EndpointInterceptor endpointInterceptor;
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(endpointInterceptor);
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
// Handler for external static resources
registry.addResourceHandler("/**")
.addResourceLocations("file:customFiles/static/", "classpath:/static/");
// .setCachePeriod(0); // Optional: disable caching
}
}

View File

@@ -0,0 +1,25 @@
package stirling.software.SPDF.config;
import java.io.IOException;
import java.util.Properties;
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean;
import org.springframework.core.env.PropertiesPropertySource;
import org.springframework.core.env.PropertySource;
import org.springframework.core.io.support.EncodedResource;
import org.springframework.core.io.support.PropertySourceFactory;
public class YamlPropertySourceFactory implements PropertySourceFactory {
@Override
public PropertySource<?> createPropertySource(String name, EncodedResource encodedResource)
throws IOException {
YamlPropertiesFactoryBean factory = new YamlPropertiesFactoryBean();
factory.setResources(encodedResource.getResource());
Properties properties = factory.getObject();
return new PropertiesPropertySource(
encodedResource.getResource().getFilename(), properties);
}
}

View File

@@ -0,0 +1,64 @@
package stirling.software.SPDF.config.security;
import java.io.IOException;
import java.util.Optional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.LockedException;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;
import org.springframework.stereotype.Component;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import stirling.software.SPDF.model.User;
@Component
public class CustomAuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler {
@Autowired private final LoginAttemptService loginAttemptService;
@Autowired private final UserService userService; // Inject the UserService
public CustomAuthenticationFailureHandler(
LoginAttemptService loginAttemptService, UserService userService) {
this.loginAttemptService = loginAttemptService;
this.userService = userService;
}
@Override
public void onAuthenticationFailure(
HttpServletRequest request,
HttpServletResponse response,
AuthenticationException exception)
throws IOException, ServletException {
String ip = request.getRemoteAddr();
logger.error("Failed login attempt from IP: " + ip);
String username = request.getParameter("username");
if (!isDemoUser(username)) {
if (loginAttemptService.loginAttemptCheck(username)) {
setDefaultFailureUrl("/login?error=locked");
} else {
if (exception.getClass().isAssignableFrom(LockedException.class)) {
setDefaultFailureUrl("/login?error=locked");
}
}
}
if (exception.getClass().isAssignableFrom(BadCredentialsException.class)) {
setDefaultFailureUrl("/login?error=badcredentials");
}
super.onAuthenticationFailure(request, response, exception);
}
private boolean isDemoUser(String username) {
Optional<User> user = userService.findByUsername(username);
return user.isPresent()
&& user.get().getAuthorities().stream()
.anyMatch(authority -> "ROLE_DEMO_USER".equals(authority.getAuthority()));
}
}

View File

@@ -0,0 +1,47 @@
package stirling.software.SPDF.config.security;
import java.io.IOException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler;
import org.springframework.security.web.savedrequest.SavedRequest;
import org.springframework.stereotype.Component;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpSession;
import stirling.software.SPDF.utils.RequestUriUtils;
@Component
public class CustomAuthenticationSuccessHandler
extends SavedRequestAwareAuthenticationSuccessHandler {
@Autowired private LoginAttemptService loginAttemptService;
@Override
public void onAuthenticationSuccess(
HttpServletRequest request, HttpServletResponse response, Authentication authentication)
throws ServletException, IOException {
String username = request.getParameter("username");
loginAttemptService.loginSucceeded(username);
// Get the saved request
HttpSession session = request.getSession(false);
SavedRequest savedRequest =
session != null
? (SavedRequest) session.getAttribute("SPRING_SECURITY_SAVED_REQUEST")
: null;
if (savedRequest != null
&& !RequestUriUtils.isStaticResource(savedRequest.getRedirectUrl())) {
// Redirect to the original destination
super.onAuthenticationSuccess(request, response, authentication);
} else {
// Redirect to the root URL (considering context path)
getRedirectStrategy().sendRedirect(request, response, "/");
}
// super.onAuthenticationSuccess(request, response, authentication);
}
}

View File

@@ -0,0 +1,57 @@
package stirling.software.SPDF.config.security;
import java.util.Collection;
import java.util.Set;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.LockedException;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
import stirling.software.SPDF.model.Authority;
import stirling.software.SPDF.model.User;
import stirling.software.SPDF.repository.UserRepository;
@Service
public class CustomUserDetailsService implements UserDetailsService {
@Autowired private UserRepository userRepository;
@Autowired private LoginAttemptService loginAttemptService;
@Override
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
User user =
userRepository
.findByUsername(username)
.orElseThrow(
() ->
new UsernameNotFoundException(
"No user found with username: " + username));
if (loginAttemptService.isBlocked(username)) {
throw new LockedException(
"Your account has been locked due to too many failed login attempts.");
}
return new org.springframework.security.core.userdetails.User(
user.getUsername(),
user.getPassword(),
user.isEnabled(),
true,
true,
true,
getAuthorities(user.getAuthorities()));
}
private Collection<? extends GrantedAuthority> getAuthorities(Set<Authority> authorities) {
return authorities.stream()
.map(authority -> new SimpleGrantedAuthority(authority.getAuthority()))
.collect(Collectors.toList());
}
}

View File

@@ -0,0 +1,53 @@
package stirling.software.SPDF.config.security;
import java.io.IOException;
import java.util.Optional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import stirling.software.SPDF.model.User;
import stirling.software.SPDF.utils.RequestUriUtils;
@Component
public class FirstLoginFilter extends OncePerRequestFilter {
@Autowired @Lazy private UserService userService;
@Override
protected void doFilterInternal(
HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
String method = request.getMethod();
String requestURI = request.getRequestURI();
// Check if the request is for static resources
boolean isStaticResource = RequestUriUtils.isStaticResource(requestURI);
// If it's a static resource, just continue the filter chain and skip the logic below
if (isStaticResource) {
filterChain.doFilter(request, response);
return;
}
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
if (authentication != null && authentication.isAuthenticated()) {
Optional<User> user = userService.findByUsername(authentication.getName());
if ("GET".equalsIgnoreCase(method)
&& user.isPresent()
&& user.get().isFirstLogin()
&& !"/change-creds".equals(requestURI)) {
response.sendRedirect("/change-creds");
return;
}
}
filterChain.doFilter(request, response);
}
}

View File

@@ -0,0 +1,68 @@
package stirling.software.SPDF.config.security;
import java.io.IOException;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
import jakarta.servlet.Filter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import stirling.software.SPDF.utils.RequestUriUtils;
public class IPRateLimitingFilter implements Filter {
private final ConcurrentHashMap<String, AtomicInteger> requestCounts =
new ConcurrentHashMap<>();
private final ConcurrentHashMap<String, AtomicInteger> getCounts = new ConcurrentHashMap<>();
private final int maxRequests;
private final int maxGetRequests;
public IPRateLimitingFilter(int maxRequests, int maxGetRequests) {
this.maxRequests = maxRequests;
this.maxGetRequests = maxGetRequests;
}
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
if (request instanceof HttpServletRequest) {
HttpServletRequest httpRequest = (HttpServletRequest) request;
String method = httpRequest.getMethod();
String requestURI = httpRequest.getRequestURI();
// Check if the request is for static resources
boolean isStaticResource = RequestUriUtils.isStaticResource(requestURI);
// If it's a static resource, just continue the filter chain and skip the logic below
if (isStaticResource) {
chain.doFilter(request, response);
return;
}
String clientIp = request.getRemoteAddr();
requestCounts.computeIfAbsent(clientIp, k -> new AtomicInteger(0));
if (!"GET".equalsIgnoreCase(method)) {
if (requestCounts.get(clientIp).incrementAndGet() > maxRequests) {
// Handle limit exceeded (e.g., send error response)
response.getWriter().write("Rate limit exceeded");
return;
}
} else {
if (requestCounts.get(clientIp).incrementAndGet() > maxGetRequests) {
// Handle limit exceeded (e.g., send error response)
response.getWriter().write("GET Rate limit exceeded");
return;
}
}
}
chain.doFilter(request, response);
}
public void resetRequestCounts() {
requestCounts.clear();
getCounts.clear();
}
}

View File

@@ -0,0 +1,88 @@
package stirling.software.SPDF.config.security;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import java.util.UUID;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import jakarta.annotation.PostConstruct;
import stirling.software.SPDF.model.ApplicationProperties;
import stirling.software.SPDF.model.Role;
@Component
public class InitialSecuritySetup {
@Autowired private UserService userService;
@Autowired ApplicationProperties applicationProperties;
@PostConstruct
public void init() {
if (!userService.hasUsers()) {
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);
}
}
if (!userService.usernameExists(Role.INTERNAL_API_USER.getRoleId())) {
userService.saveUser(
Role.INTERNAL_API_USER.getRoleId(),
UUID.randomUUID().toString(),
Role.INTERNAL_API_USER.getRoleId());
userService.addApiKeyToUser(Role.INTERNAL_API_USER.getRoleId());
}
}
@PostConstruct
public void initSecretKey() throws IOException {
String secretKey = applicationProperties.getAutomaticallyGenerated().getKey();
if (secretKey == null || secretKey.isEmpty()) {
secretKey = UUID.randomUUID().toString(); // Generating a random UUID as the secret key
saveKeyToConfig(secretKey);
}
}
private void saveKeyToConfig(String key) throws IOException {
Path path = Paths.get("configs", "settings.yml"); // Target the configs/settings.yml
List<String> lines = Files.readAllLines(path);
boolean keyFound = false;
// Search for the existing key to replace it or place to add it
for (int i = 0; i < lines.size(); i++) {
if (lines.get(i).startsWith("AutomaticallyGenerated:")) {
keyFound = true;
if (i + 1 < lines.size() && lines.get(i + 1).trim().startsWith("key:")) {
lines.set(i + 1, " key: " + key);
break;
} else {
lines.add(i + 1, " key: " + key);
break;
}
}
}
// If the section doesn't exist, append it
if (!keyFound) {
lines.add("# Automatically Generated Settings (Do Not Edit Directly)");
lines.add("AutomaticallyGenerated:");
lines.add(" key: " + key);
}
// Write back to the file
Files.write(path, lines);
}
}

View File

@@ -0,0 +1,58 @@
package stirling.software.SPDF.config.security;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import jakarta.annotation.PostConstruct;
import stirling.software.SPDF.model.ApplicationProperties;
import stirling.software.SPDF.model.AttemptCounter;
@Service
public class LoginAttemptService {
@Autowired ApplicationProperties applicationProperties;
private int MAX_ATTEMPTS;
private long ATTEMPT_INCREMENT_TIME;
@PostConstruct
public void init() {
MAX_ATTEMPTS = applicationProperties.getSecurity().getLoginAttemptCount();
ATTEMPT_INCREMENT_TIME =
TimeUnit.MINUTES.toMillis(
applicationProperties.getSecurity().getLoginResetTimeMinutes());
}
private final ConcurrentHashMap<String, AttemptCounter> attemptsCache =
new ConcurrentHashMap<>();
public void loginSucceeded(String key) {
attemptsCache.remove(key);
}
public boolean loginAttemptCheck(String key) {
attemptsCache.compute(
key,
(k, attemptCounter) -> {
if (attemptCounter == null
|| attemptCounter.shouldReset(ATTEMPT_INCREMENT_TIME)) {
return new AttemptCounter();
} else {
attemptCounter.increment();
return attemptCounter;
}
});
return attemptsCache.get(key).getAttemptCount() >= MAX_ATTEMPTS;
}
public boolean isBlocked(String key) {
AttemptCounter attemptCounter = attemptsCache.get(key);
if (attemptCounter != null) {
return attemptCounter.getAttemptCount() >= MAX_ATTEMPTS;
}
return false;
}
}

View File

@@ -0,0 +1,19 @@
package stirling.software.SPDF.config.security;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Component
public class RateLimitResetScheduler {
private final IPRateLimitingFilter rateLimitingFilter;
public RateLimitResetScheduler(IPRateLimitingFilter rateLimitingFilter) {
this.rateLimitingFilter = rateLimitingFilter;
}
@Scheduled(cron = "0 0 0 * * MON") // At 00:00 every Monday TODO: configurable
public void resetRateLimit() {
rateLimitingFilter.resetRequestCounts();
}
}

View File

@@ -0,0 +1,169 @@
package stirling.software.SPDF.config.security;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.core.session.SessionRegistry;
import org.springframework.security.core.session.SessionRegistryImpl;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.security.web.authentication.rememberme.PersistentTokenRepository;
import org.springframework.security.web.savedrequest.NullRequestCache;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
import jakarta.servlet.http.HttpSession;
import stirling.software.SPDF.repository.JPATokenRepositoryImpl;
@Configuration
@EnableWebSecurity()
@EnableMethodSecurity
public class SecurityConfiguration {
@Autowired private UserDetailsService userDetailsService;
@Bean
public PasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder();
}
@Autowired @Lazy private UserService userService;
@Autowired
@Qualifier("loginEnabled")
public boolean loginEnabledValue;
@Autowired private UserAuthenticationFilter userAuthenticationFilter;
@Autowired private LoginAttemptService loginAttemptService;
@Autowired private FirstLoginFilter firstLoginFilter;
@Bean
public SessionRegistry sessionRegistry() {
return new SessionRegistryImpl();
}
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http.addFilterBefore(userAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);
if (loginEnabledValue) {
http.csrf(csrf -> csrf.disable());
http.addFilterBefore(rateLimitingFilter(), UsernamePasswordAuthenticationFilter.class);
http.addFilterAfter(firstLoginFilter, UsernamePasswordAuthenticationFilter.class);
http.sessionManagement(
sessionManagement ->
sessionManagement
.sessionCreationPolicy(SessionCreationPolicy.IF_REQUIRED)
.maximumSessions(10)
.maxSessionsPreventsLogin(false)
.sessionRegistry(sessionRegistry())
.expiredUrl("/login?logout=true"));
http.formLogin(
formLogin ->
formLogin
.loginPage("/login")
.successHandler(
new CustomAuthenticationSuccessHandler())
.defaultSuccessUrl("/")
.failureHandler(
new CustomAuthenticationFailureHandler(
loginAttemptService, userService))
.permitAll())
.requestCache(requestCache -> requestCache.requestCache(new NullRequestCache()))
.logout(
logout ->
logout.logoutRequestMatcher(
new AntPathRequestMatcher("/logout"))
.logoutSuccessUrl("/login?logout=true")
.invalidateHttpSession(true) // Invalidate session
.deleteCookies("JSESSIONID", "remember-me")
.addLogoutHandler(
(request, response, authentication) -> {
HttpSession session =
request.getSession(false);
if (session != null) {
String sessionId = session.getId();
sessionRegistry()
.removeSessionInformation(
sessionId);
}
}))
.rememberMe(
rememberMeConfigurer ->
rememberMeConfigurer // Use the configurator directly
.key("uniqueAndSecret")
.tokenRepository(persistentTokenRepository())
.tokenValiditySeconds(1209600) // 2 weeks
)
.authorizeHttpRequests(
authz ->
authz.requestMatchers(
req -> {
String uri = req.getRequestURI();
String contextPath = req.getContextPath();
// Remove the context path from the URI
String trimmedUri =
uri.startsWith(contextPath)
? uri.substring(
contextPath
.length())
: uri;
return trimmedUri.startsWith("/login")
|| trimmedUri.endsWith(".svg")
|| trimmedUri.startsWith(
"/register")
|| trimmedUri.startsWith("/error")
|| trimmedUri.startsWith("/images/")
|| trimmedUri.startsWith("/public/")
|| trimmedUri.startsWith("/css/")
|| trimmedUri.startsWith("/js/")
|| trimmedUri.startsWith(
"/api/v1/info/status");
})
.permitAll()
.anyRequest()
.authenticated())
.userDetailsService(userDetailsService)
.authenticationProvider(authenticationProvider());
} else {
http.csrf(csrf -> csrf.disable())
.authorizeHttpRequests(authz -> authz.anyRequest().permitAll());
}
return http.build();
}
@Bean
public IPRateLimitingFilter rateLimitingFilter() {
int maxRequestsPerIp = 1000000; // Example limit TODO add config level
return new IPRateLimitingFilter(maxRequestsPerIp, maxRequestsPerIp);
}
@Bean
public DaoAuthenticationProvider authenticationProvider() {
DaoAuthenticationProvider authProvider = new DaoAuthenticationProvider();
authProvider.setUserDetailsService(userDetailsService);
authProvider.setPasswordEncoder(passwordEncoder());
return authProvider;
}
@Bean
public PersistentTokenRepository persistentTokenRepository() {
return new JPATokenRepositoryImpl();
}
}

View File

@@ -0,0 +1,118 @@
package stirling.software.SPDF.config.security;
import java.io.IOException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.HttpStatus;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import stirling.software.SPDF.model.ApiKeyAuthenticationToken;
@Component
public class UserAuthenticationFilter extends OncePerRequestFilter {
@Autowired private UserDetailsService userDetailsService;
@Autowired @Lazy private UserService userService;
@Autowired
@Qualifier("loginEnabled")
public boolean loginEnabledValue;
@Override
protected void doFilterInternal(
HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
if (!loginEnabledValue) {
// If login is not enabled, just pass all requests without authentication
filterChain.doFilter(request, response);
return;
}
String requestURI = request.getRequestURI();
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
// Check for API key in the request headers if no authentication exists
if (authentication == null || !authentication.isAuthenticated()) {
String apiKey = request.getHeader("X-API-Key");
if (apiKey != null && !apiKey.trim().isEmpty()) {
try {
// Use API key to authenticate. This requires you to have an authentication
// provider for API keys.
UserDetails userDetails = userService.loadUserByApiKey(apiKey);
if (userDetails == null) {
response.setStatus(HttpStatus.UNAUTHORIZED.value());
response.getWriter().write("Invalid API Key.");
return;
}
authentication =
new ApiKeyAuthenticationToken(
userDetails, apiKey, userDetails.getAuthorities());
SecurityContextHolder.getContext().setAuthentication(authentication);
} catch (AuthenticationException e) {
// If API key authentication fails, deny the request
response.setStatus(HttpStatus.UNAUTHORIZED.value());
response.getWriter().write("Invalid API Key.");
return;
}
}
}
// If we still don't have any authentication, deny the request
if (authentication == null || !authentication.isAuthenticated()) {
String method = request.getMethod();
String contextPath = request.getContextPath();
if ("GET".equalsIgnoreCase(method) && !(contextPath + "/login").equals(requestURI)) {
response.sendRedirect(contextPath + "/login"); // redirect to the login page
return;
} else {
response.setStatus(HttpStatus.UNAUTHORIZED.value());
response.getWriter()
.write(
"Authentication required. Please provide a X-API-KEY in request header.\nThis is found in Settings -> Account Settings -> API Key\nAlternatively you can disable authentication if this is unexpected");
return;
}
}
filterChain.doFilter(request, response);
}
@Override
protected boolean shouldNotFilter(HttpServletRequest request) throws ServletException {
String uri = request.getRequestURI();
String contextPath = request.getContextPath();
String[] permitAllPatterns = {
contextPath + "/login",
contextPath + "/register",
contextPath + "/error",
contextPath + "/images/",
contextPath + "/public/",
contextPath + "/css/",
contextPath + "/js/",
contextPath + "/pdfjs/",
contextPath + "/api/v1/info/status",
contextPath + "/site.webmanifest"
};
for (String pattern : permitAllPatterns) {
if (uri.startsWith(pattern) || uri.endsWith(".svg")) {
return true;
}
}
return false;
}
}

View File

@@ -0,0 +1,143 @@
package stirling.software.SPDF.config.security;
import java.io.IOException;
import java.time.Duration;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.HttpStatus;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;
import io.github.bucket4j.Bandwidth;
import io.github.bucket4j.Bucket;
import io.github.bucket4j.ConsumptionProbe;
import io.github.bucket4j.Refill;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import stirling.software.SPDF.model.Role;
@Component
public class UserBasedRateLimitingFilter extends OncePerRequestFilter {
private final Map<String, Bucket> apiBuckets = new ConcurrentHashMap<>();
private final Map<String, Bucket> webBuckets = new ConcurrentHashMap<>();
@Autowired private UserDetailsService userDetailsService;
@Autowired
@Qualifier("rateLimit")
public boolean rateLimit;
@Override
protected void doFilterInternal(
HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
if (!rateLimit) {
// If rateLimit is not enabled, just pass all requests without rate limiting
filterChain.doFilter(request, response);
return;
}
String method = request.getMethod();
if (!"POST".equalsIgnoreCase(method)) {
// If the request is not a POST, just pass it through without rate limiting
filterChain.doFilter(request, response);
return;
}
String identifier = null;
// Check for API key in the request headers
String apiKey = request.getHeader("X-API-Key");
if (apiKey != null && !apiKey.trim().isEmpty()) {
identifier =
"API_KEY_" + apiKey; // Prefix to distinguish between API keys and usernames
} else {
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
if (authentication != null && authentication.isAuthenticated()) {
UserDetails userDetails = (UserDetails) authentication.getPrincipal();
identifier = userDetails.getUsername();
}
}
// If neither API key nor an authenticated user is present, use IP address
if (identifier == null) {
identifier = request.getRemoteAddr();
}
Role userRole =
getRoleFromAuthentication(SecurityContextHolder.getContext().getAuthentication());
if (request.getHeader("X-API-Key") != null) {
// It's an API call
processRequest(
userRole.getApiCallsPerDay(),
identifier,
apiBuckets,
request,
response,
filterChain);
} else {
// It's a Web UI call
processRequest(
userRole.getWebCallsPerDay(),
identifier,
webBuckets,
request,
response,
filterChain);
}
}
private Role getRoleFromAuthentication(Authentication authentication) {
if (authentication != null && authentication.isAuthenticated()) {
for (GrantedAuthority authority : authentication.getAuthorities()) {
try {
return Role.fromString(authority.getAuthority());
} catch (IllegalArgumentException ex) {
// Ignore and continue to next authority.
}
}
}
throw new IllegalStateException("User does not have a valid role.");
}
private void processRequest(
int limitPerDay,
String identifier,
Map<String, Bucket> buckets,
HttpServletRequest request,
HttpServletResponse response,
FilterChain filterChain)
throws IOException, ServletException {
Bucket userBucket = buckets.computeIfAbsent(identifier, k -> createUserBucket(limitPerDay));
ConsumptionProbe probe = userBucket.tryConsumeAndReturnRemaining(1);
if (probe.isConsumed()) {
response.setHeader("X-Rate-Limit-Remaining", Long.toString(probe.getRemainingTokens()));
filterChain.doFilter(request, response);
} else {
long waitForRefill = probe.getNanosToWaitForRefill() / 1_000_000_000;
response.setStatus(HttpStatus.TOO_MANY_REQUESTS.value());
response.setHeader("X-Rate-Limit-Retry-After-Seconds", String.valueOf(waitForRefill));
response.getWriter().write("Rate limit exceeded for POST requests.");
}
}
private Bucket createUserBucket(int limitPerDay) {
Bandwidth limit =
Bandwidth.classic(limitPerDay, Refill.intervally(limitPerDay, Duration.ofDays(1)));
return Bucket.builder().addLimit(limit).build();
}
}

Some files were not shown because too many files have changed in this diff Show More