Compare commits

...

1211 Commits

Author SHA1 Message Date
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
Anthony Stirling
e3aa726f12 Update build.gradle 2023-05-19 00:22:40 +01:00
Anthony Stirling
e46b7aaf35 Update push-docker.yml 2023-05-19 00:19:55 +01:00
Anthony Stirling
68947de06a Update push-docker.yml 2023-05-19 00:18:30 +01:00
Anthony Stirling
1739de95a6 Update push-docker.yml 2023-05-19 00:15:22 +01:00
Anthony Stirling
759f184d36 Update push-docker.yml 2023-05-19 00:13:43 +01:00
Anthony Stirling
8a8d3437a6 Update push-docker.yml 2023-05-19 00:12:48 +01:00
Anthony Stirling
87f0d6930e Update push-docker.yml 2023-05-19 00:03:09 +01:00
Anthony Stirling
e659f11f05 Update push-docker.yml 2023-05-19 00:01:16 +01:00
NeilJared
b53920ddc5 Update messages_es_ES.properties
Updated es-ES translation
2023-05-19 00:33:26 +02:00
Anthony Stirling
21c2bb281f Update push-docker.yml 2023-05-18 23:25:17 +01:00
Anthony Stirling
b0232eb917 Merge pull request #184 from Frooodle/conditional
Conditional removable PDF services
2023-05-18 23:23:56 +01:00
Anthony Stirling
f8c855eab1 test 2023-05-18 23:22:44 +01:00
Anthony Stirling
8a277aebd7 Test stuff 2023-05-18 23:17:46 +01:00
Anthony Stirling
d4c25476d2 Merge remote-tracking branch 'origin/main' into conditional 2023-05-18 14:16:56 +01:00
Anthony Stirling
8fa35da2d1 Merge pull request #185 from demonisius/main
add ru_RU language
2023-05-18 12:15:43 +01:00
Дмитрий
dcf5852432 add ru_RU language 2023-05-18 13:13:08 +03:00
Anthony Stirling
e2aa342539 Merge branch 'main' into conditional 2023-05-18 00:05:53 +01:00
Anthony Stirling
e28e5230d7 maybe fx 2023-05-18 00:03:59 +01:00
Anthony Stirling
cbe5b15abd fix 2023-05-17 23:59:48 +01:00
Anthony Stirling
566546748d docker script 2023-05-17 23:58:28 +01:00
Anthony Stirling
320f56e473 lots of stuff 2023-05-17 23:58:15 +01:00
Anthony Stirling
54e7998bf7 remove 2023-05-17 18:17:11 +01:00
Anthony Stirling
479dcb18b3 readme stuff 2023-05-17 18:16:39 +01:00
Anthony Stirling
1a9329d1df other endpoints 2023-05-17 17:59:28 +01:00
Anthony Stirling
7fda51a0c9 Merge pull request #182 from IXEguy/visibility_fix
Change Visability to Visibility
2023-05-17 16:43:31 +01:00
Ahrr Jay
28368cd6c0 Change Visability to Visibility 2023-05-17 08:16:11 -07:00
Anthony Stirling
5d6b1280a8 Merge remote-tracking branch 'origin/main' into conditional 2023-05-17 15:40:09 +01:00
Anthony Stirling
8fddb4d6bf Merge pull request #180 from MarcO-79/patch-8
Create pl.svg
2023-05-17 14:50:50 +01:00
Anthony Stirling
81a9b65559 Merge branch 'main' into patch-8 2023-05-17 14:49:49 +01:00
Anthony Stirling
d20533e048 Merge pull request #179 from MarcO-79/patch-7
Update navbar.html
2023-05-17 14:49:28 +01:00
Anthony Stirling
6eb32b06af Merge branch 'main' into patch-7 2023-05-17 14:48:30 +01:00
Anthony Stirling
9c9970d6fb Merge pull request #178 from MarcO-79/patch-6
Create messages_pl_PL.properties
2023-05-17 14:48:20 +01:00
MarcO-79
887d634fde Create pl.svg
Add Polish flag
2023-05-17 15:15:07 +02:00
MarcO-79
9c334fb021 Update navbar.html
Add Polish language
2023-05-17 15:12:37 +02:00
MarcO-79
8c9880145e Create messages_pl_PL.properties
Add Polish language
2023-05-17 14:58:05 +02:00
Anthony Stirling
6fa6f3d1dc Merge remote-tracking branch 'origin/main' into conditional 2023-05-17 01:05:24 +01:00
Anthony Stirling
fe0c9fe57a Merge remote-tracking branch 'origin/main' into conditional 2023-05-17 00:49:22 +01:00
Anthony Stirling
3ab820763b Merge pull request #171 from pitah81/swedish
Swedish
2023-05-17 00:26:52 +01:00
Peter Wickenberg
31a6f6af93 Add files via upload
Added swedish flag
2023-05-17 00:55:55 +02:00
Peter Wickenberg
32f4245024 Update navbar.html
Added swedish language to navbar
2023-05-17 00:55:16 +02:00
Peter Wickenberg
92a8aba69c Add files via upload
Messages file translated using Google Translate
2023-05-17 00:51:14 +02:00
Anthony Stirling
c2fec0a030 stats and conditionals 2023-05-16 22:44:53 +01:00
Anthony Stirling
e0ef53431a Merge pull request #158 from trytomakeyouprivate/patch-4
minor changes
2023-05-14 22:14:46 +01:00
Anthony Stirling
093dcba4ba Merge branch 'main' into patch-4 2023-05-14 22:11:20 +01:00
Anthony Stirling
1cffb64344 Merge pull request #160 from trytomakeyouprivate/patch-5
Added Fedora location & install commands
2023-05-14 22:11:14 +01:00
Anthony Stirling
caffe7b455 Merge branch 'main' into patch-5 2023-05-14 22:09:26 +01:00
Anthony Stirling
2e87db99c2 Merge pull request #161 from trytomakeyouprivate/main
changed APT install
2023-05-14 22:09:05 +01:00
trytomakeyouprivate
220ef5ae1a changed APT install
removed unnessecary Libreoffice core packages, these will be installed along. Changed all the python packages to pip3 instead of apt
2023-05-14 20:59:21 +00:00
trytomakeyouprivate
395f7272c3 Added Fedora location & install commands 2023-05-14 20:54:31 +00:00
trytomakeyouprivate
fd427c3931 minor changes
minor
2023-05-14 20:28:52 +00:00
Anthony Stirling
2ea07688be Merge pull request #156 from trytomakeyouprivate/main
Update LocalRunGuide.md
2023-05-14 20:41:25 +01:00
Anthony Stirling
b1f8324c21 Merge branch 'main' into main 2023-05-14 20:40:45 +01:00
trytomakeyouprivate
e920fb16d4 Update LocalRunGuide.md 2023-05-14 19:35:02 +00:00
Anthony Stirling
802ae3643c Merge pull request #155 from trytomakeyouprivate/patch-3
Update LocalRunGuide.md
2023-05-14 19:55:26 +01:00
trytomakeyouprivate
42cc031200 Update LocalRunGuide.md
fixed one file that was not executable with chmod +x

also added language-pack installation and viewing.

Manually adding langpacks could also be useful but dont see the reason yet
2023-05-14 18:32:17 +00:00
Anthony Stirling
d6cf4648a2 Merge pull request #154 from trytomakeyouprivate/patch-2
Update LocalRunGuide.md
2023-05-14 19:02:02 +01:00
trytomakeyouprivate
d6deb52731 Update LocalRunGuide.md
added tesseract-osd nessecary in Fedora
2023-05-14 17:56:50 +00:00
Anthony Stirling
a4c8221fc4 Merge pull request #152 from trytomakeyouprivate/patch-1
Update LocalRunGuide.md
2023-05-14 18:35:43 +01:00
trytomakeyouprivate
50b921f318 Update LocalRunGuide.md
Added Fedora Installation translations.

Not sure about zlib-devel.

Why are pip packages installed through apt on ubuntu? Where is the reasoning?
2023-05-14 17:11:04 +00:00
Anthony Stirling
e0526b9584 Version bump 2023-05-14 15:43:56 +01:00
Anthony Stirling
f822f6d931 Merge pull request #150 from pesaventofilippo/ita-translation
Added Italian language
2023-05-14 15:37:25 +01:00
Filippo Pesavento
0a25d75682 Merge branch 'Frooodle:main' into ita-translation 2023-05-14 15:43:20 +02:00
Filippo Pesavento
0eea2c672f Added Italian translation 2023-05-14 15:43:12 +02:00
Anthony Stirling
e4e7b8f449 Merge pull request #148 from JabSYsEmb/main
fix style issue for rtl languages
2023-05-14 12:12:55 +01:00
JabSysEmb
54a5c621c4 add style in common file general.css 2023-05-14 14:03:09 +03:00
Filippo Pesavento
03e1d9a863 Added Italian flag 2023-05-14 11:54:01 +02:00
Filippo Pesavento
098fc340ca Added Italian language to navbar.html 2023-05-14 11:51:46 +02:00
JabSysEmb
27c8a03c16 fix style issue for rtl languages 2023-05-14 12:01:13 +03:00
Anthony Stirling
1ddf829a6d Update LocalRunGuide.md 2023-05-13 23:40:50 +01:00
Anthony Stirling
6952a8b72a Add files via upload 2023-05-13 17:04:21 +01:00
Anthony Stirling
2ee720760d Add files via upload 2023-05-13 16:58:00 +01:00
Anthony Stirling
ccee0eecb5 Update build.gradle 2023-05-13 13:28:20 +01:00
Anthony Stirling
2b7e97a09f Merge pull request #147 from Frooodle/hotfix
Minor fixes
2023-05-13 13:27:37 +01:00
Anthony Stirling
a2926b8fe9 Minor language stuff 2023-05-13 13:26:28 +01:00
Anthony Stirling
9009317f83 star in top right fix 2023-05-13 13:15:24 +01:00
Anthony Stirling
67772e7221 Update README.md 2023-05-13 11:12:50 +01:00
Anthony Stirling
cc02da47d7 Update push-docker.yml 2023-05-13 10:44:22 +01:00
Anthony Stirling
af540183a6 Merge pull request #146 from Frooodle/cleanups
Latest release
2023-05-13 10:35:22 +01:00
Anthony Stirling
6581bb4ab4 Improved API documentation 2023-05-13 10:32:47 +01:00
Anthony Stirling
53e5edcb75 0.8.0 instead of 1.0.0 2023-05-13 09:45:01 +01:00
Anthony Stirling
ae22066bad languages,add images and flags 2023-05-13 09:42:56 +01:00
systo
6ee5daf884 Merge remote-tracking branch 'origin/main' into cleanups 2023-05-13 09:14:21 +01:00
Rubens
93edc56f1d Create messages_ca_CA.properties
added catalan file
2023-05-13 08:16:25 +01:00
Rubens
41970348cd Update navbar.html
Add Catalan language to navbar
2023-05-13 08:16:25 +01:00
Anthony Stirling
815a823104 debugs 2023-05-12 20:55:18 +01:00
Anthony Stirling
c27f99ab58 99.9 for blanks 2023-05-12 20:42:45 +01:00
Anthony Stirling
ed35a878a5 update readme 2023-05-12 20:35:17 +01:00
Anthony Stirling
bd1ab5e80b narbar for favorites 2023-05-12 18:16:47 +01:00
Anthony Stirling
a1fae66800 favourites 2023-05-12 16:47:43 +01:00
Anthony Stirling
c4d1761687 lang 2023-05-12 14:02:37 +01:00
Anthony Stirling
a647347e10 Changes to blank detection, WIP for % 2023-05-11 23:05:33 +01:00
Anthony Stirling
2d42ae9a36 Merge branch 'cleanups' of git@github.com:Frooodle/Stirling-PDF.git into cleanups 2023-05-11 21:56:17 +01:00
Anthony Stirling
8ce900acca compare imrpove 2023-05-11 21:55:57 +01:00
Anthony Stirling
60ee55b602 Update LocalRunGuide.md 2023-05-11 21:07:08 +01:00
Anthony Stirling
75cd62b7c2 Update LocalRunGuide.md 2023-05-11 20:35:09 +01:00
Anthony Stirling
55fe47d4f3 extra document changes 2023-05-11 14:36:20 +01:00
Anthony Stirling
440d5072b7 lang readme 2023-05-11 14:31:08 +01:00
Anthony Stirling
80968ee6c4 Merge remote-tracking branch 'origin/main' into cleanups 2023-05-11 14:23:51 +01:00
IZUMI-Zu
99254c964b add Chinese translate
Signed-off-by: BSS ZU <274620705z@gmail.com>
2023-05-11 11:41:49 +01:00
Anthony Stirling
d2a4cf74e8 APP_ROOT_PATH 2023-05-10 23:26:31 +01:00
Anthony Stirling
fd918ef15f local execution 2023-05-10 23:21:20 +01:00
Anthony Stirling
e16ed5ca1a changes for img to pdf #142 2023-05-10 22:51:01 +01:00
Anthony Stirling
25e5470c5e Fix for #140 2023-05-10 22:16:02 +01:00
Anthony Stirling
59320e6828 Merge pull request #141 from MayannF/customURI
Customize application uri (#136)
2023-05-10 20:12:45 +01:00
Mayann
f9aacb4c66 #136 Added environment variable APP_ROOT_PATH to expose the webapp behind a reverse proxy using subfolder. Minor changes to html pages to remove absolute path for some resources 2023-05-10 20:01:05 +02:00
Anthony Stirling
28faf3888c init home for toher featues 2023-05-08 22:55:01 +01:00
Saud Fatayerji
a9e22947ef Merge branch 'cleanups' of https://github.com/Frooodle/Stirling-PDF into cleanups 2023-05-08 20:07:23 +03:00
Saud Fatayerji
7585fc80b4 Made added draggable elements persist between pages. 2023-05-08 20:06:34 +03:00
Anthony Stirling
5139af9f48 organise imports 2023-05-08 15:26:41 +01:00
Anthony Stirling
f2521717ae more docs 2023-05-08 15:20:04 +01:00
Anthony Stirling
0f935b92cb api docs 2023-05-08 15:07:53 +01:00
Saud Fatayerji
5e3a2b456e Merge branch 'cleanups' of https://github.com/Frooodle/Stirling-PDF into cleanups 2023-05-08 16:54:34 +03:00
Anthony Stirling
632f29d1d6 ./ 2023-05-08 12:36:48 +01:00
systo
7353d69f1a Merge branch 'cleanups' of git@github.com:Frooodle/Stirling-PDF.git into cleanups 2023-05-08 12:18:56 +01:00
Anthony Stirling
0b1cdf6a68 remove blanks 2023-05-08 12:18:48 +01:00
Saud Fatayerji
e0350b2837 Fixed error when clicking the delete draggable element with none available. 2023-05-08 12:36:39 +03:00
Saud Fatayerji
1a521505a6 Fixed bug with rainbow mode style 2023-05-08 04:29:26 +03:00
Saud Fatayerji
12d457e3ee Merge branch 'cleanups' of https://github.com/Frooodle/Stirling-PDF into cleanups 2023-05-08 04:24:42 +03:00
Saud Fatayerji
d58933ea8d Adjusted how styles work. Made signature canvas bigger. 2023-05-08 04:23:45 +03:00
Anthony Stirling
5bbfd15f38 other msg langs for eng 2023-05-08 00:24:30 +01:00
Anthony Stirling
acf4662d2f compare init, robots, sign lang and local js 2023-05-08 00:17:20 +01:00
Saud Fatayerji
1d55ee7f93 Merge branch 'cleanups' of https://github.com/Frooodle/Stirling-PDF into cleanups 2023-05-07 23:40:12 +03:00
Saud Fatayerji
b86afd7fc9 Revamped Signing page to allow multiple signatures and images 2023-05-07 23:39:34 +03:00
Anthony Stirling
a5164dc0b6 Merge branch 'cleanups' of git@github.com:Frooodle/Stirling-PDF.git into cleanups 2023-05-07 13:18:39 +01:00
Anthony Stirling
cc919ea614 blank page test 2023-05-07 12:56:38 +01:00
Anthony Stirling
42d0d49682 Merge branch 'cleanups' of git@github.com:Frooodle/Stirling-PDF.git into cleanups 2023-05-06 18:10:08 +01:00
Saud Fatayerji
07e81a117b Fixed signature scaling 2023-05-06 19:56:31 +03:00
Anthony Stirling
a56bcb09b0 Merge branch 'cleanups' of git@github.com:Frooodle/Stirling-PDF.git into cleanups 2023-05-06 17:21:17 +01:00
Anthony Stirling
28b3272cd0 demo 2023-05-06 17:21:02 +01:00
Saud Fatayerji
5c7221d0d7 Merge branch 'cleanups' of https://github.com/Frooodle/Stirling-PDF into cleanups 2023-05-06 18:53:20 +03:00
Saud Fatayerji
0aa79d28f8 Fixed positional accuracy for signatures 2023-05-06 18:52:30 +03:00
Anthony Stirling
4b4cdb85ff documentation 2023-05-06 16:10:06 +01:00
Anthony Stirling
654f7742e4 font fix 2023-05-06 14:32:38 +01:00
Anthony Stirling
f082bca6c9 sign 2023-05-06 14:12:39 +01:00
Anthony Stirling
f7ace9d92a extractImages to sign 2023-05-06 14:04:55 +01:00
Anthony Stirling
9759b44cbb cleanup text 2023-05-06 13:58:36 +01:00
Anthony Stirling
5dfe8a83cd reapir 2023-05-06 12:36:31 +01:00
Anthony Stirling
3c47f21337 sign with text init 2023-05-06 00:48:56 +01:00
Anthony Stirling
b75360bdb1 nav 2023-05-05 20:15:22 +01:00
Anthony Stirling
32bace863c undo wrong commit file for sign 2023-05-04 23:22:33 +01:00
Anthony Stirling
acda1e4dd8 flatten pdf 2023-05-04 23:19:05 +01:00
Saud Fatayerji
a342def43f Fixed #74 (visual feedback of downloads) 2023-05-04 20:48:57 +03:00
Saud Fatayerji
b100435d9c Made the dialog close when clicking off of it. 2023-05-04 19:46:00 +03:00
Saud Fatayerji
b2a29e2b13 Restyled the sign page and cleaned up code in various places. 2023-05-04 00:07:51 +03:00
Anthony Stirling
fc0af56136 Merge remote-tracking branch 'origin/main' into cleanups 2023-05-02 23:00:06 +01:00
Anthony Stirling
fd246aac93 sign v2 2023-05-02 22:59:16 +01:00
LeeAStone
7d90ecf91f Correct typo in messages_en_GB.properties (#126)
Corrected spelling of "interactive"
2023-05-02 10:04:57 +01:00
Anthony Stirling
d2aa72d873 Update Dockerfile 2023-05-01 22:31:30 +01:00
Anthony Stirling
d0b57c0419 Update push-docker.yml 2023-05-01 22:16:06 +01:00
Anthony Stirling
5bee714437 utf8 bug fix and scan pages (#113) 2023-05-01 21:57:48 +01:00
Anthony Stirling
9af537c985 ocr remove images 2023-05-01 21:53:10 +01:00
Anthony Stirling
30c56a0ec9 lang 2023-05-01 18:50:20 +01:00
Anthony Stirling
563a72ad95 Merge branch 'main' into cleanups 2023-05-01 16:36:49 +01:00
Anthony Stirling
2d4aff3b08 Merge pull request #105 from jordyjordy/drag-n-drop
Drag n drop
2023-05-01 16:36:36 +01:00
Anthony Stirling
e0783cad60 Merge branch 'main' into drag-n-drop 2023-05-01 16:30:46 +01:00
Anthony Stirling
feaad367df Merge pull request #125 from Frooodle/dependabot/github_actions/dot-github/workflows/gradle/gradle-build-action-2.4.2
Bump gradle/gradle-build-action from 2.3.3 to 2.4.2 in /.github/workflows
2023-05-01 14:55:02 +01:00
dependabot[bot]
6b5b58ea94 Bump gradle/gradle-build-action in /.github/workflows
Bumps [gradle/gradle-build-action](https://github.com/gradle/gradle-build-action) from 2.3.3 to 2.4.2.
- [Release notes](https://github.com/gradle/gradle-build-action/releases)
- [Commits](https://github.com/gradle/gradle-build-action/compare/v2.3.3...v2.4.2)

---
updated-dependencies:
- dependency-name: gradle/gradle-build-action
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 13:50:35 +00:00
jordy
60d1d336d6 fix RTL drag offset 2023-05-01 10:01:28 +02:00
jordy
2b93407e64 fix file capitalization 2023-05-01 09:46:14 +02:00
Anthony Stirling
d5dec31b39 cleanups 2023-04-30 18:28:29 +01:00
Anthony Stirling
2608aa4c97 cleanup 2023-04-30 17:29:35 +01:00
Anthony Stirling
c174ca1c7e ocr fix 2 2023-04-30 14:47:39 +01:00
Anthony Stirling
80c26a9550 fix for OCR multi lang 2023-04-30 14:42:26 +01:00
jordy
f4ad6b963f Merge branch 'main' into drag-n-drop 2023-04-30 13:41:14 +02:00
jordy
b470cdf60c fix bugs in drag/drop, move styling for functions to separate sheets
To clean up the multi tool page and make the pdf adapters more re-usable the style for them was moved to separate pages that are inserted into head when the adapter is created.
2023-04-30 13:38:30 +02:00
Anthony Stirling
585bf4ccb4 about 2023-04-30 00:48:01 +01:00
Anthony Stirling
6b0fedfabf game init 2023-04-29 22:26:16 +01:00
jordy
9a1510a4f1 further refactor js
Turn the div adapters into injectable files so that each PdfContainer can be customized. And the adapters can be used in different PdfContainers as well.
2023-04-29 12:43:12 +02:00
Anthony Stirling
bcb4594afa docs 2023-04-28 23:54:53 +01:00
Anthony Stirling
0ebec74bed stop annoying fb identify tags in URL 2023-04-28 23:45:54 +01:00
Anthony Stirling
d10f5734fb Merge branch 'cleanups' of git@github.com:Frooodle/Stirling-PDF.git into cleanups 2023-04-28 23:18:24 +01:00
Anthony Stirling
91171727e4 rework for API, folder changes, easter eggs and fun 2023-04-28 23:18:10 +01:00
jordy
e8a91d2631 refactor JS
Rather than having all the JS all in one big file, separate the code into modules.
2023-04-28 21:20:56 +02:00
Anthony Stirling
cd020e536b Merge branch 'main' into cleanups 2023-04-27 07:33:24 +01:00
Anthony Stirling
c05605a286 Update README.md 2023-04-26 22:17:47 +01:00
Anthony Stirling
63a698b679 Merge branch 'cleanups' of git@github.com:Frooodle/Stirling-PDF.git into cleanups 2023-04-26 22:01:32 +01:00
Anthony Stirling
3d3ef6f37b add title hover text 2023-04-26 21:54:12 +01:00
Anthony Stirling
9e839e130e Merge branch 'main' into cleanups 2023-04-26 15:15:32 +01:00
Anthony Stirling
3e2ca2fd5f Merge pull request #104 from jordyjordy/width-improvement
Width improvement
2023-04-26 13:57:55 +01:00
Anthony Stirling
ee26262b6e Merge remote-tracking branch 'origin/main' into cleanups 2023-04-26 13:18:36 +01:00
Anthony Stirling
4327af5133 bug fixes and image scan 2023-04-26 13:18:24 +01:00
Anthony Stirling
6cce2ee70a Merge branch 'main' into drag-n-drop 2023-04-25 18:14:01 +01:00
Anthony Stirling
70d07433d5 Merge branch 'main' into width-improvement 2023-04-25 18:13:52 +01:00
Anthony Stirling
8109c63250 Merge pull request #109 from Frooodle/dependabot/gradle/org.springframework.boot-spring-boot-starter-thymeleaf-3.0.6
Bump org.springframework.boot:spring-boot-starter-thymeleaf from 3.0.5 to 3.0.6
2023-04-25 16:41:26 +01:00
dependabot[bot]
32ba7361ac 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.5 to 3.0.6.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.0.5...v3.0.6)

---
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-04-25 15:40:32 +00:00
dependabot[bot]
a9da1b648f Merge pull request #110 from Frooodle/dependabot/gradle/org.springframework.boot-spring-boot-starter-test-3.0.6 2023-04-25 15:40:02 +00:00
dependabot[bot]
1fcd64a1ab 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.5 to 3.0.6.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.0.5...v3.0.6)

---
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-04-25 15:38:30 +00:00
Anthony Stirling
f8362b6bfa Merge pull request #111 from Frooodle/dependabot/gradle/org.springframework.boot-3.0.6
Bump org.springframework.boot from 3.0.5 to 3.0.6
2023-04-25 16:37:58 +01:00
Anthony Stirling
fb0541fddf Merge branch 'main' into dependabot/gradle/org.springframework.boot-3.0.6 2023-04-25 16:36:49 +01:00
Anthony Stirling
61b645c51c Merge pull request #112 from Frooodle/dependabot/gradle/org.springframework.boot-spring-boot-starter-web-3.0.6
Bump org.springframework.boot:spring-boot-starter-web from 3.0.5 to 3.0.6
2023-04-25 16:36:34 +01:00
dependabot[bot]
84b5a69074 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.5 to 3.0.6.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.0.5...v3.0.6)

---
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-04-24 23:02:17 +00:00
dependabot[bot]
374f445953 Bump org.springframework.boot from 3.0.5 to 3.0.6
Bumps [org.springframework.boot](https://github.com/spring-projects/spring-boot) from 3.0.5 to 3.0.6.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.0.5...v3.0.6)

---
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-04-24 23:02:09 +00:00
jordy
bf78db9b75 drag-drop PoC 2023-04-23 15:55:11 +02:00
Jordy van der Tang
e3882b78db Merge branch 'Frooodle:main' into main 2023-04-23 15:54:45 +02:00
jordy
5389d4fc13 always scrollcontainer by page width on move 2023-04-23 14:16:28 +02:00
jordy
01529cc981 make pdf bar wider, hide buttons until hover 2023-04-23 13:56:39 +02:00
Anthony Stirling
93fb571725 Merge pull request #102 from Frooodle/cleanups
format and move everything, other in own folder
2023-04-23 09:45:01 +01:00
Anthony Stirling
ab4aea315a Merge branch 'main' into cleanups 2023-04-23 09:42:51 +01:00
Anthony Stirling
90ca50ae7a Merge pull request #103 from jordyjordy/main
Update Multi tool UI
2023-04-23 09:42:32 +01:00
jordy
3cb36d36bf address PR feedback 2023-04-23 09:59:19 +02:00
Jordy van der Tang
8f51f025d0 Merge branch 'main' into main 2023-04-22 19:41:07 +02:00
jordy
e048fc6653 fix RTL language directions
The positioning of the insert pdf buttons and the direction icon of the move page buttons are tied to the language direction, to fix this we retrieve the language direction from the document and use this to reverse some logic/elements for RTL languages.
2023-04-22 19:29:21 +02:00
jordy
a44fc62fee center pdfs
To correctly center the pdfs inside of the scrollable div we need a wrapper, ideally the 'safe center' flex-direction would be used, but this is not yet supported by most browsers.
2023-04-22 19:26:42 +02:00
jordy
9da29bf99a small css tweaks
lighten background
2023-04-22 14:57:39 +02:00
jordy
1edb669583 add imagehighlighter
Because the images are now much smaller with the image highlighter we can view images in more detail
2023-04-22 14:49:08 +02:00
Anthony Stirling
8e4e2469b0 Create CNAME 2023-04-22 13:19:30 +01:00
Anthony Stirling
f91953f67a Delete CNAME 2023-04-22 13:19:25 +01:00
Anthony Stirling
0bb61149e8 Create CNAME 2023-04-22 13:19:12 +01:00
Anthony Stirling
e5f7d1077d Delete CNAME 2023-04-22 13:13:22 +01:00
Anthony Stirling
7c91a77442 Create CNAME 2023-04-22 13:13:02 +01:00
jordy
fb24398b01 remove console.logs from prod code 2023-04-22 14:09:03 +02:00
jordy
43107965a9 use horizontal scroll for pages container
By making small thumbnails and aligning everything horizontally the space on the screen is used better.
2023-04-22 14:08:47 +02:00
Anthony Stirling
67b7435624 Merge branch 'main' into cleanups 2023-04-22 12:54:27 +01:00
Anthony Stirling
78d3fd3768 format and move everything, other in own folder 2023-04-22 12:51:01 +01:00
Anthony Stirling
243e4889b9 Merge pull request #101 from pl4nty/patch-1
Support GitHub Container Registry
2023-04-22 10:04:48 +01:00
Tom Plant
42564e683b Create Docker Hub tag from secret 2023-04-22 10:12:14 +10:00
Tom Plant
96097d1cd3 Set buildx context in CI/CD 2023-04-22 10:10:02 +10:00
Tom Plant
4f35a8d79f Enable caching for CI/CD container builds 2023-04-22 09:50:15 +10:00
Tom Plant
3b8bed5b0a Allow manual CI/CD runs 2023-04-22 09:46:27 +10:00
Tom Plant
5897f0e3ed Pin action versions 2023-04-22 09:45:11 +10:00
Tom Plant
2aba80d0ca Support GitHub Container Registry 2023-04-22 09:41:33 +10:00
Anthony Stirling
af6cd2e38b image updates 2023-04-22 00:18:32 +01:00
Anthony Stirling
5ab2664c70 fixes to saving and things 2023-04-22 00:08:36 +01:00
Anthony Stirling
39c31ef5d9 centre align, colour stuff and home icons 2023-04-21 23:32:39 +01:00
Anthony Stirling
bd1c7a35e2 settings bar changes 2023-04-21 19:58:07 +01:00
Anthony Stirling
0eed041986 messy code pretty icon 2023-04-21 18:03:36 +01:00
Anthony Stirling
1958c34bcb new sun moon 2023-04-21 17:52:40 +01:00
Anthony Stirling
f5ceede3cd darkmode test (weirdly slow not sure if PC) 2023-04-21 17:50:59 +01:00
Anthony Stirling
d98473f5e3 language stuff 2023-04-21 16:59:59 +01:00
Anthony Stirling
19d7027361 fixes 2023-04-21 13:17:35 +01:00
Anthony Stirling
a34c2863bd Merge branch 'main' of git@github.com:Frooodle/Stirling-PDF.git into
main
2023-04-21 13:15:46 +01:00
Anthony Stirling
4521dce1a9 init icons 2023-04-21 13:13:35 +01:00
Anthony Stirling
3564c1a45c Merge pull request #98 from manumora/main
Spanish language improvements
2023-04-21 11:57:20 +01:00
Manuel Mora Gordillo
b6e2d25462 Spanish language: fixed bug names of variables . Wrong characters corrected. Improved some texts 2023-04-21 11:48:49 +02:00
Anthony Stirling
256ce50c49 Merge pull request #97 from Frooodle/revert-94-patch-1
Revert "Support GitHub Container Registry"
2023-04-20 18:36:11 +01:00
Anthony Stirling
fb0ad73035 Revert "Support GitHub Container Registry" 2023-04-20 18:34:35 +01:00
Anthony Stirling
71636c3413 Merge pull request #96 from Sf298/main
Fixed rotate all button not working
2023-04-20 18:29:12 +01:00
Saud Fatayerji
5ef28bab9a Merge branch 'Frooodle:main' into main 2023-04-20 20:27:47 +03:00
Saud Fatayerji
757433629a Merge branch 'main' of https://github.com/Sf298/Stirling-PDF 2023-04-20 20:27:22 +03:00
Saud Fatayerji
050ae2a512 Fixed rotate all button not working 2023-04-20 20:26:38 +03:00
Anthony Stirling
4c81eac8fb Merge pull request #94 from pl4nty/patch-1
Support GitHub Container Registry
2023-04-20 17:43:59 +01:00
Anthony Stirling
a4544d7943 Merge branch 'main' into patch-1 2023-04-20 17:43:07 +01:00
Anthony Stirling
9d65537317 Merge pull request #95 from Sf298/main
Added "insert document" buttons that appear in the middle of the document. bug fixes
2023-04-20 17:39:38 +01:00
Saud Fatayerji
b6a284e2bc Merge branch 'Frooodle:main' into main 2023-04-20 19:36:14 +03:00
Saud Fatayerji
f4e5690841 Added "insert document" buttons that appear in the middle of the document 2023-04-20 19:34:58 +03:00
Anthony Stirling
fa84479254 Update README.md 2023-04-19 15:38:18 +01:00
Anthony Stirling
6ef1ca0a0b Update README.md 2023-04-19 15:35:58 +01:00
Anthony Stirling
927a1481a9 Update FUNDING.yml 2023-04-19 15:26:13 +01:00
Saud Fatayerji
7f9f45c720 Bug fixes and optimisations 2023-04-19 11:44:58 +03:00
Anthony Stirling
7ddc607fd2 Merge pull request #92 from Frooodle/dependabot/gradle/org.apache.pdfbox-pdfbox-2.0.28
Bump org.apache.pdfbox:pdfbox from 2.0.27 to 2.0.28
2023-04-18 18:53:35 +01:00
Anthony Stirling
4e1b0c6abe Merge branch 'main' into dependabot/gradle/org.apache.pdfbox-pdfbox-2.0.28 2023-04-18 14:27:13 +01:00
Tom Plant
e4d7b53112 Add GHCR perms to CI and pin Action versions 2023-04-18 22:36:38 +10:00
Tom Plant
f9ff57a26e Support GitHub Container Registry
Adds support for GitHub Container Registry to CI/CD and simplifies with third-party Actions
2023-04-18 22:32:37 +10:00
Anthony Stirling
2af9f19c3a nav bar active fix 2023-04-18 12:36:10 +01:00
Anthony Stirling
dbb8e2b245 remove pages movement 2023-04-18 11:07:39 +01:00
Anthony Stirling
689ad18c71 convert navbar improve 2023-04-18 10:52:38 +01:00
Anthony Stirling
4422787d4e Merge pull request #93 from Sf298/main
Added a page for visually editing individual pages of a pdf client-side
2023-04-18 07:55:21 +01:00
Saud Fatayerji
8d1057477b Merge branch 'main' of https://github.com/Sf298/Stirling-PDF 2023-04-18 05:18:20 +03:00
Saud Fatayerji
b3dff3a520 Added Page Manager to navbar and home page 2023-04-18 05:13:09 +03:00
Saud Fatayerji
6141be7310 Merge branch 'Frooodle:main' into main 2023-04-18 05:12:07 +03:00
Saud Fatayerji
2762459acf Created a page for visually editing individual pages of a pdf 2023-04-18 05:08:38 +03:00
dependabot[bot]
53d8d4dbb4 Bump org.apache.pdfbox:pdfbox from 2.0.27 to 2.0.28
Bumps org.apache.pdfbox:pdfbox from 2.0.27 to 2.0.28.

---
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-04-17 23:02:33 +00:00
Anthony Stirling
5ae72f3e6f Update home.html 2023-04-17 17:16:18 +01:00
Anthony Stirling
872b36124f Update home.html 2023-04-17 17:16:00 +01:00
Anthony Stirling
f762ab6aa7 Quick fix to dark mode button and reduce navbar size by removing PDF (#91) 2023-04-16 23:41:56 +01:00
Anthony Stirling
c311f9a4ed Convert PDF to Docx, powerpoint and others (#90) 2023-04-16 22:03:30 +01:00
Anthony Stirling
0a7517ecdd docker logic to avoid rebuilding large image every time for easy dev 2023-04-15 21:17:47 +01:00
Anthony Stirling
03febd9484 Home screen change (#88)
* security

* home screen remove GO button

* fix

* test

* version
2023-04-15 19:55:55 +01:00
Manuel Mora Gordillo
655b97bfd5 Added spanish language (#87) 2023-04-15 00:57:12 +01:00
libertyunion
fdbc7f4621 Added support for multiple adding an image overlay to multiple pages (#86) 2023-04-11 21:22:59 +01:00
Anthony Stirling
f9fe303671 security (#85) 2023-04-03 23:16:11 +01:00
900 changed files with 121878 additions and 28804 deletions

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

@@ -0,0 +1,2 @@
# Formatting
5f771b785130154ed47952635b7acef371ffe0ec

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

2
.github/FUNDING.yml vendored
View File

@@ -1,6 +1,6 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
github: Frooodle # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username

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"

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

@@ -0,0 +1,4 @@
# License Agreement for Contributions
By submitting this pull request, I acknowledge and agree that my contributions will be included in Stirling-PDF and that they can be relicensed in the future under MPL 2.0 (Mozilla Public License Version 2.0) license.
(This does not change the general open-source nature of Stirling-PDF, simply moving from one license to another license)

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

@@ -0,0 +1,34 @@
name: "Build repo"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
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.3.3
with:
gradle-version: 7.6
arguments: assemble --no-build-cache
#- name: Perform CodeQL analysis
# uses: github/codeql-action/analyze@v2

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

@@ -0,0 +1,48 @@
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: Check for Changes
id: git-check
run: |
git add src/main/resources/static/3rdPartyLicenses.json
git diff --staged --exit-code || echo "changes=true" >> $GITHUB_ENV
- name: Commit and Push Changes
if: env.changes == 'true'
run: |
git config --global user.name 'Stirling-PDF-Bot'
git config --global user.email 'Stirling-PDF-Bot@stirlingtools.com'
git commit -m "Update 3rd Party Licenses"
git push

View File

@@ -0,0 +1,3 @@
# License Agreement for Contributions
By submitting this pull request, I acknowledge and agree that my contributions will be included in Stirling-PDF and that they can be relicensed in the future under MPL 2.0 (Mozilla Public License Version 2.0) license.
(This does not change the open-source nature of Stirling-PDF, simply moving from one license to another license)

View File

@@ -1,27 +1,31 @@
name: Push Docker Image with VersionNumber
on:
workflow_dispatch:
push:
branches:
- master
- testGit
- main
permissions:
contents: read
packages: write
jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3.5.2
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v3.11.0
with:
java-version: '17'
distribution: 'temurin'
- uses: gradle/gradle-build-action@v2.3.3
- uses: gradle/gradle-build-action@v2.4.2
env:
DOCKER_ENABLE_SECURITY: false
with:
gradle-version: 7.6
arguments: clean build
@@ -37,43 +41,111 @@ jobs:
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_API }}
# - name: Check if tag exists
# id: checkIdExists
# continue-on-error: true
# run: |
# response=$(curl -s https://hub.docker.com/v2/repositories/frooodle/s-pdf/tags/?name=${{ steps.versionNumber.outputs.versionNumber }})
# result=$(echo $response | jq ".results")
# if [ "$result" == "[]" ]; then
# echo "Tag ${{ steps.versionNumber.outputs.versionNumber }} doesnt exist. Continuing with build and push."
# else
# echo "Tag ${{ steps.versionNumber.outputs.versionNumber }} already exists. Skipping build and push."
# exit 1;
# fi
password: ${{ secrets.DOCKER_HUB_API }}
- name: Setup buildx
- name: Login to GitHub Container Registry
uses: docker/login-action@v2.1.0
with:
registry: ghcr.io
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/${{ 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' }}
type=raw,value=alpha,enable=${{ github.ref == 'refs/heads/main' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2.1.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.5.0
- name: Build and push main Dockerfile
uses: docker/build-push-action@v4.0.0
with:
context: .
dockerfile: ./Dockerfile
push: true
cache-from: type=gha
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 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/${{ steps.repoowner.outputs.lowercase }}/s-pdf
tags: |
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-ultra-lite
uses: docker/build-push-action@v4.0.0
if: github.ref != 'refs/heads/main'
with:
context: .
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 }}
build-args:
VERSION_TAG=${{ steps.versionNumber.outputs.versionNumber }}
platforms: linux/amd64,linux/arm64/v8
- name: Generate tags lite
id: meta3
uses: docker/metadata-action@v4.4.0
if: github.ref != 'refs/heads/main'
with:
images: |
${{ secrets.DOCKER_HUB_USERNAME }}/s-pdf
ghcr.io/${{ steps.repoowner.outputs.lowercase }}/s-pdf
tags: |
type=raw,value=${{ steps.versionNumber.outputs.versionNumber }}-lite,enable=${{ github.ref == 'refs/heads/master' }}
type=raw,value=latest-lite,enable=${{ github.ref == 'refs/heads/master' }}
- name: Build and push Dockerfile-lite
uses: docker/build-push-action@v4.0.0
if: github.ref != 'refs/heads/main'
with:
context: .
file: ./Dockerfile-lite
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta3.outputs.tags }}
labels: ${{ steps.meta3.outputs.labels }}
build-args:
VERSION_TAG=${{ steps.versionNumber.outputs.versionNumber }}
platforms: linux/amd64,linux/arm64/v8
- name: Build and Push Helm Chart
run: |
docker buildx create --name mybuilder
docker buildx use mybuilder
- name: Build and push versioned amd64 and v8
if: github.ref == 'refs/heads/main'
run: |
docker buildx build --platform="linux/amd64,linux/arm64/v8" --push --tag "frooodle/s-pdf:${{ steps.versionNumber.outputs.versionNumber }}-alpha" .
- name: Build and push versioned amd64 and v8
if: github.ref == 'refs/heads/master'
run: |
docker buildx build --platform="linux/amd64,linux/arm64/v8" --push --tag "frooodle/s-pdf:${{ steps.versionNumber.outputs.versionNumber }}" .
- name: Build and push latest amd64 and v8
if: github.ref == 'refs/heads/master'
run: |
docker buildx build --platform="linux/amd64,linux/arm64/v8" --push --tag "frooodle/s-pdf:latest" .
helm package chart/stirling-pdf
helm push stirling-pdf-chart-1.0.0.tgz oci://registry-1.docker.io/frooodle

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

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

@@ -0,0 +1,37 @@
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 }}

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

239
.gitignore vendored
View File

@@ -1,112 +1,127 @@
### Eclipse ###
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders
.classpath
.project
# Gradle
.gradle
.lock
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# PyDev specific (Python IDE for Eclipse)
*.pydevproject
# CDT-specific (C/C++ Development Tooling)
.cproject
# CDT- autotools
.autotools
# Java annotation processor (APT)
.factorypath
# PDT-specific (PHP Development Tools)
.buildpath
# sbteclipse plugin
.target
# Tern plugin
.tern-project
# TeXlipse plugin
.texlipse
# STS (Spring Tool Suite)
.springBeans
# Code Recommenders
.recommenders/
# Annotation Processing
.apt_generated/
.apt_generated_test/
# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet
# Uncomment this line if you wish to ignore the project description file.
# Typically, this file would be tracked if it contains build/dependency configurations:
#.project
### Eclipse Patch ###
# Spring Boot Tooling
.sts4-cache/
### Git ###
# Created by git for backups. To disable backups in Git:
# $ git config --global mergetool.keepBackup false
*.orig
# Created by git when using merge tools for conflicts
*.BACKUP.*
*.BASE.*
*.LOCAL.*
*.REMOTE.*
*_BACKUP_*.txt
*_BASE_*.txt
*_LOCAL_*.txt
*_REMOTE_*.txt
### Java ###
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
/build
### Eclipse ###
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders
.classpath
.project
version.properties
pipeline/watchedFolders/
pipeline/finishedFolders/
#### Stirling-PDF Files ###
customFiles/
configs/
watchedFolders/
# Gradle
.gradle
.lock
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# PyDev specific (Python IDE for Eclipse)
*.pydevproject
# CDT-specific (C/C++ Development Tooling)
.cproject
# CDT- autotools
.autotools
# Java annotation processor (APT)
.factorypath
# PDT-specific (PHP Development Tools)
.buildpath
# sbteclipse plugin
.target
# Tern plugin
.tern-project
# TeXlipse plugin
.texlipse
# STS (Spring Tool Suite)
.springBeans
# Code Recommenders
.recommenders/
# Annotation Processing
.apt_generated/
.apt_generated_test/
# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet
# Uncomment this line if you wish to ignore the project description file.
# Typically, this file would be tracked if it contains build/dependency configurations:
#.project
### Eclipse Patch ###
# Spring Boot Tooling
.sts4-cache/
### Git ###
# Created by git for backups. To disable backups in Git:
# $ git config --global mergetool.keepBackup false
*.orig
# Created by git when using merge tools for conflicts
*.BACKUP.*
*.BASE.*
*.LOCAL.*
*.REMOTE.*
*_BACKUP_*.txt
*_BASE_*.txt
*_LOCAL_*.txt
*_REMOTE_*.txt
### Java ###
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
*.db
/build
/.vscode
/.idea
# Ignore Mac DS_Store files
.DS_Store
**/.DS_Store

View File

@@ -1,61 +1,47 @@
# Build jbig2enc in a separate stage
FROM debian:bullseye-slim as jbig2enc_builder
# Use the base image
FROM frooodle/stirling-pdf-base:version8
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++
ARG VERSION_TAG
RUN git clone https://github.com/agl/jbig2enc && \
cd jbig2enc && \
./autogen.sh && \
./configure && \
make && \
make install
# 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 \
# Main stage
FROM openjdk:17-jdk-slim
# Create user and group
##RUN groupadd -g $PGID stirlingpdfgroup && \
## useradd -u $PUID -g stirlingpdfgroup -s /bin/sh stirlingpdfuser && \
## mkdir -p $HOME && chown stirlingpdfuser:stirlingpdfgroup $HOME
# Install necessary dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libreoffice-core \
libreoffice-common \
libreoffice-writer \
libreoffice-calc \
libreoffice-impress \
python3-uno \
python3-pip \
unoconv \
pngquant \
unpaper \
ocrmypdf && \
pip install --user --upgrade ocrmypdf
# Set up necessary directories and permissions
RUN mkdir -p /scripts /usr/share/fonts/opentype/noto /usr/share/tesseract-ocr /configs /logs /customFiles /pipeline /pipeline/defaultWebUIConfigs /pipeline/watchedFolders /pipeline/finishedFolders
##&& \
## chown -R stirlingpdfuser:stirlingpdfgroup /scripts /usr/share/fonts/opentype/noto /usr/share/tesseract-ocr /configs /customFiles && \
## chown -R stirlingpdfuser:stirlingpdfgroup /usr/share/tesseract-ocr-original
# Copy the jbig2enc binary from the builder stage
COPY --from=jbig2enc_builder /usr/local/bin/jbig2 /usr/local/bin/jbig2
# Copy the application JAR file
# 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
# Expose the application port
# Set font cache and permissions
RUN fc-cache -f -v && chmod +x /scripts/*
##&& \
## chown stirlingpdfuser:stirlingpdfgroup /app.jar && \
## chmod +x /scripts/init.sh
# Expose necessary ports
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
ENTRYPOINT java -jar /app.jar
# Set user and run command
##USER stirlingpdfuser
ENTRYPOINT ["/scripts/init.sh"]
CMD ["java", "-Dfile.encoding=UTF-8", "-jar", "/app.jar"]

65
Dockerfile-lite Normal file
View File

@@ -0,0 +1,65 @@
# Build jbig2enc in a separate stage
FROM bellsoft/liberica-openjdk-debian:17
ARG VERSION_TAG
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libreoffice-core \
libreoffice-common \
libreoffice-writer \
libreoffice-calc \
libreoffice-impress \
unoconv && \
rm -rf /var/lib/apt/lists/*
# 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 \
# Create user and group
#RUN groupadd -g $PGID stirlingpdfgroup && \
# useradd -u $PUID -g stirlingpdfgroup -s /bin/sh stirlingpdfuser && \
# mkdir -p $HOME && chown stirlingpdfuser:stirlingpdfgroup $HOME
# Set up necessary directories and permissions
RUN mkdir -p /scripts /usr/share/fonts/opentype/noto /configs /customFiles /logs /pipeline /pipeline/defaultWebUIConfigs /pipeline/watchedFolders /pipeline/finishedFolders
# chown -R stirlingpdfuser:stirlingpdfgroup /usr/share/fonts/opentype/noto /configs /customFiles
# 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 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
# Set font cache and permissions
RUN fc-cache -f -v && \
chmod +x /scripts/init-without-ocr.sh && \
chmod +x /scripts/download-security-jar.sh
# chown stirlingpdfuser:stirlingpdfgroup /app.jar
# Expose the application port
EXPOSE 8080
# Set environment variables
ENV ENDPOINTS_GROUPS_TO_REMOVE=Python,OpenCV,OCRmyPDF
ENV DOCKER_ENABLE_SECURITY=false
# Run the application
#USER stirlingpdfuser
ENTRYPOINT ["/scripts/init-without-ocr.sh"]
CMD ["java", "-Dfile.encoding=UTF-8", "-jar", "/app.jar"]

46
Dockerfile-ultra-lite Normal file
View File

@@ -0,0 +1,46 @@
# Build jbig2enc in a separate stage
FROM bellsoft/liberica-openjdk-alpine:17
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 \
# Create user and group using Alpine's addgroup and adduser
#RUN addgroup -g $PGID stirlingpdfgroup && \
# adduser -u $PUID -G stirlingpdfgroup -s /bin/sh -D stirlingpdfuser && \
# mkdir -p $HOME && chown stirlingpdfuser:stirlingpdfgroup $HOME
# Set up necessary directories and permissions
#RUN mkdir -p /scripts /configs /customFiles && \
# chown -R stirlingpdfuser:stirlingpdfgroup /scripts /configs /customFiles /logs /pipeline /pipeline/defaultWebUIConfigs /pipeline/watchedFolders /pipeline/finishedFolders
RUN mkdir -p /scripts /usr/share/fonts/opentype/noto /configs /customFiles
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 font cache and permissions
#RUN chown stirlingpdfuser:stirlingpdfgroup /app.jar
RUN chmod +x /scripts/init-without-ocr.sh && \
chmod +x /scripts/download-security-jar.sh && \
apk add --no-cache curl
# Expose the application port
EXPOSE 8080
# Set environment variables
ENV ENDPOINTS_GROUPS_TO_REMOVE=CLI
ENTRYPOINT ["/scripts/init-without-ocr.sh"]
# Run the application
CMD ["java", "-Dfile.encoding=UTF-8", "-jar", "/app.jar"]

43
DockerfileBase Normal file
View File

@@ -0,0 +1,43 @@
# Main stage
FROM ubuntu:latest AS base
# JDK for app
RUN apt-get update && \
apt-get install -y --no-install-recommends \
openjdk-17-jre && \
rm -rf /var/lib/apt/lists/*
# Doc conversion
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libreoffice-core \
libreoffice-common \
libreoffice-writer \
libreoffice-calc \
libreoffice-impress \
python3-uno \
curl \
unoconv && \
rm -rf /var/lib/apt/lists/*
# OCR MY PDF (unpaper for descew and other advanced featues)
RUN apt-get update && apt-get install -y --no-install-recommends software-properties-common gnupg2 && \
add-apt-repository ppa:alex-p/tesseract-ocr5 && apt install -y --no-install-recommends tesseract-ocr && \
apt-get update && \
apt-get install -y --no-install-recommends \
ghostscript \
python3-pip \
ocrmypdf \
unpaper && \
rm -rf /var/lib/apt/lists/* && \
mv /usr/share/tesseract-ocr /usr/share/tesseract-ocr-original && \
pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir --upgrade ocrmypdf && \
pip install --no-cache-dir --upgrade pillow==10.0.1 reportlab==3.6.13 wheel==0.38.1 setuptools==65.5.1 pyjwt==2.4.0 cryptography==39.0.1
#CV and HTML
RUN pip install --no-cache-dir opencv-python-headless WeasyPrint

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 | | | | ✔️ | | | | | | | ✔️ |

41
FolderScanning.md Normal file
View File

@@ -0,0 +1,41 @@
## User Guide for Local Directory Scanning and File Processing
### Whilst Pipelines are in alpha...
You must enable this alpha functionality by setting
```
system:
enableAlphaFunctionality: true
```
To true like in the above for your `/config/settings.yml` file, after restarting Stirling-PDF you should see both UI and folder scanning enabled.
### 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,17 +8,24 @@ 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#L80
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
For example to add Polish you would add
```
<a class="dropdown-item lang_dropdown-item" href="" data-language-code="pl_PL">Polish</a>
<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
[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

View File

@@ -2,8 +2,11 @@
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 doesnt!
Please update your tesseract docker volume path version from 4.00 to 5
## How does the OCR Work
Stirling-PDF uses OCRmyPDF which in turn uses tesseract for its text recognition.
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,7 +21,9 @@ 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`
2. Place the `.traineddata` files in the Tesseract tessdata directory: `/usr/share/tesseract-ocr/5/tessdata` (Debian) or `/usr/share/tesseract/tessdata` (Fedora)
# DO NOT REMOVE EXISTING ENG.TRAINEDDATA, IT'S REQUIRED.
#### Docker
@@ -32,18 +37,43 @@ services:
your_service_name:
image: your_docker_image_name
volumes:
- /usr/share/tesseract-ocr/4.00/tessdata:/location/of/trainingData
- /location/of/trainingData:/usr/share/tesseract-ocr/5/tessdata
```
#### Docker run
Add the following to your existing docker run command
```bash
-v /usr/share/tesseract-ocr/4.00/tessdata:/location/of/trainingData
-v /location/of/trainingData:/usr/share/tesseract-ocr/5/tessdata
```
#### Non-Docker
If you are not using Docker, you need to install the OCR components, including the ocrmypdf app.
You can see [OCRmyPDF install guide](https://ocrmypdf.readthedocs.io/en/latest/installation.html)
Debian based systems, install languages with this command:
```bash
sudo apt update &&\
# All languages
# sudo apt install -y 'tesseract-ocr-*'
# Find languages:
apt search tesseract-ocr-
# View installed languages:
dpkg-query -W tesseract-ocr- | sed 's/tesseract-ocr-//g'
```
Fedora:
```bash
# All languages
# sudo dnf install -y tesseract-langpack-*
# Find languages:
dnf search -C tesseract-langpack-
# View installed languages:
rpm -qa | grep tesseract-langpack | sed 's/tesseract-langpack-//g'
```

20
Jenkinsfile vendored
View File

@@ -22,12 +22,24 @@ pipeline {
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 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>.

273
LocalRunGuide.md Normal file
View File

@@ -0,0 +1,273 @@
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.
The following guide assumes you have a basic understanding of using a command line interface in your operating system.
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:
- Java 17 or later
- Gradle 7.0 or later (included within repo so not needed on server)
- Git
- Python 3.8 (with pip)
- Make
- GCC/G++
- Automake
- Autoconf
- libtool
- pkg-config
- zlib1g-dev
- libleptonica-dev
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
```
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
```
### Step 2: Clone and Build jbig2enc (Only required for certain OCR functionality)
```bash
mkdir ~/.git
cd ~/.git &&\
git clone https://github.com/agl/jbig2enc.git &&\
cd jbig2enc &&\
./autogen.sh &&\
./configure &&\
make &&\
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.
Install the following software:
- libreoffice-core
- libreoffice-common
- libreoffice-writer
- libreoffice-calc
- libreoffice-impress
- python3-uno
- unoconv
- pngquant
- unpaper
- ocrmypdf
- opencv-python-headless
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 WeasyPrint
```
For Fedora:
```bash
sudo dnf install -y libreoffice-writer libreoffice-calc libreoffice-impress unpaper ocrmypdf
pip3 install uno opencv-python-headless unoconv pngquant WeasyPrint
```
### Step 4: Clone and Build Stirling-PDF
```bash
cd ~/.git &&\
git clone https://github.com/Stirling-Tools/Stirling-PDF.git &&\
cd Stirling-PDF &&\
chmod +x ./gradlew &&\
./gradlew build
```
### Step 5: Move jar to desired location
After the build process, a `.jar` file will be generated in the `build/libs` directory.
You can move this file to a desired location, for example, `/opt/Stirling-PDF/`.
You must also move the Script folder within the Stirling-PDF repo that you have downloaded to this directory.
This folder is required for the python scripts using OpenCV
```bash
sudo mkdir /opt/Stirling-PDF &&\
sudo mv ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/ &&\
sudo mv scripts /opt/Stirling-PDF/ &&\
echo "Scripts installed."
```
### Step 6: Other files
#### OCR
If you plan to use the OCR (Optical Character Recognition) functionality, you might need to install language packs for Tesseract if running non-english scanning.
##### Installing Language Packs
Easiest is to use the langpacks provided by your repositories. Skip the other steps
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/5/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.
Debian based systems, install languages with this command:
```bash
sudo apt update &&\
# All languages
# sudo apt install -y 'tesseract-ocr-*'
# Find languages:
apt search tesseract-ocr-
# View installed languages:
dpkg-query -W tesseract-ocr- | sed 's/tesseract-ocr-//g'
```
Fedora:
```bash
# All languages
# sudo dnf install -y tesseract-langpack-*
# Find languages:
dnf search -C tesseract-langpack-
# View installed languages:
rpm -qa | grep tesseract-langpack | sed 's/tesseract-langpack-//g'
```
### Step 7: Run Stirling-PDF
```bash
./gradlew bootRun
or
java -jar /opt/Stirling-PDF/Stirling-PDF-*.jar
```
### Step 8: Adding a Desktop icon
This will add a modified Appstarter to your Appmenu.
```bash
location=$(pwd)/gradlew
image=$(pwd)/docs/stirling-transparent.svg
cat > ~/.local/share/applications/Stirling-PDF.desktop <<EOF
[Desktop Entry]
Name=Stirling PDF;
GenericName=Launch StirlingPDF and open its WebGUI;
Category=Office;
Exec=xdg-open http://localhost:8080 && nohup $location bootRun &;
Icon=$image;
Keywords=pdf;
Type=Application;
NoDisplay=false;
Terminal=true;
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:
```bash
export APP_HOME_NAME="Stirling PDF"
or
-DAPP_HOME_NAME="Stirling PDF"
```

42
PipelineFeature.md Normal file
View File

@@ -0,0 +1,42 @@
# Pipeline Configuration and Usage Tutorial
## Whilst Pipelines are in alpha...
You must enable this alpha functionality by setting
```
system:
enableAlphaFunctionality: true
```
To true like in the above for your `/config/settings.yml` file, after restarting Stirling-PDF you should see both UI and folder scanning enabled.
## 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.

273
README.md
View File

@@ -1,99 +1,278 @@
<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>
[![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)
This is a locally hosted web application that allows you to perform various operations on PDF files, such as splitting and adding images.
[![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)
Started off as a 100% ChatGPT made application, slowly moving away from that as more features are added
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.
I will support and fix/add things to this if there is a demand [Discord](https://discord.gg/Cn8pWhQRxZ)
Stirling PDF makes no outbound calls for any record keeping or tracking.
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.
Please feel free to submit feature requests or report bugs either through GitHub issues or on our [Discord](https://discord.gg/Cn8pWhQRxZ)
![stirling-home](images/stirling-home.png)
## Features
- 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 images to PDFs at specified locations. (WIP)
- 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)
- 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)
- 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)
Hosted instance/demo of the app can be seen [here](https://pdf.adminforge.de/) hosted by the team at adminforge.de
## 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](https://github.com/mozilla/pdf.js)
- [PDF-LIB.js](https://github.com/Hopding/pdf-lib)
## How to use
### Locally
Please view https://github.com/Stirling-Tools/Stirling-PDF/blob/main/LocalRunGuide.md
Prerequisites
- Java 17 or later
- Gradle 7.0 or later
1. Clone or download the repository.
2. Build the project using Gradle by running `./gradlew build`
3. Start the application by running `./gradlew bootRun` or by calling the build jar in build/libs with java -jar jarName.jar
### Docker
### Docker / Podman
https://hub.docker.com/r/frooodle/s-pdf
Stirling PDF has 3 different versions, a Full version, Lite, and ultra-Lite. 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-lite?label=Stirling-PDF%20Lite)
![Docker Image Size (tag)](https://img.shields.io/docker/image-size/frooodle/s-pdf/latest-ultra-lite?label=Stirling-PDF%20Ultra-Lite)
Docker Run
```
docker run -p 8080:8080 frooodle/s-pdf
docker run -d \
-p 8080:8080 \
-v /location/of/trainingData:/usr/share/tesseract-ocr/5/tessdata \
-v /location/of/extraConfigs:/configs \
-v /location/of/logs:/logs \
-e DOCKER_ENABLE_SECURITY=false \
--name stirling-pdf \
frooodle/s-pdf:latest
Can also add these for customisation but are not required
-v /location/of/customFiles:/customFiles \
```
Docker Compose
```
version: '3.3'
services:
s-pdf:
ports:
- '8080:8080'
image: frooodle/s-pdf
stirling-pdf:
image: frooodle/s-pdf:latest
ports:
- '8080:8080'
volumes:
- /location/of/trainingData:/usr/share/tesseract-ocr/5/tessdata #Required for extra OCR languages
- /location/of/extraConfigs:/configs
# - /location/of/customFiles:/customFiles/
# - /location/of/logs:/logs/
environment:
- DOCKER_ENABLE_SECURITY=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
Please view https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToUseOCR.md
## Want to add your own language?
Stirling PDF currently supports 26!
- English (English) (en_GB)
- English (US) (en_US)
- Arabic (العربية) (ar_AR)
- German (Deutsch) (de_DE)
- French (Français) (fr_FR)
- Spanish (Español) (es_ES)
- Simplified Chinese (简体中文) (zh_CN)
- Traditional Chinese (繁體中文) (zh_TW)
- Catalan (Català) (ca_CA)
- Italian (Italiano) (it_IT)
- Swedish (Svenska) (sv_SE)
- Polish (Polski) (pl_PL)
- Romanian (Română) (ro_RO)
- Korean (한국어) (ko_KR)
- Portuguese Brazilian (Português) (pt_BR)
- Russian (Русский) (ru_RU)
- Basque (Euskara) (eu_ES)
- Japanese (日本語) (ja_JP)
- Dutch (Nederlands) (nl_NL)
- Greek (el_GR)
- Turkish (Türkçe) (tr_TR)
- Indonesia (Bahasa Indonesia) (id_ID)
- Hindi (हिंदी) (hi_IN)
- Hungarian (Magyar) (hu_HU)
- Bulgarian (Български) (bg_BG)
- Sebian Latin alphabet (Srpski) (sr-Latn-RS)
If you want to add your own language to Stirling-PDF please refer
https://github.com/Frooodle/Stirling-PDF/blob/main/HowToAddNewLanguage.md
https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md
And please create a PR to merge it back in so others can use it!
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.
## 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.
## 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
Stirling PDF allows easy customization of the app.
Includes things like
- Custom application name
- Custom slogans, icons, images, and even custom HTML (via file overrides)
Using the same method you can also change the default language by providing APP_LOCALE with values like de-DE fr-FR or ar-AR to select your default language (Will always default to English on invalid locale)
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
```
system:
defaultLocale: 'en-US'
```
To have this via an environment variable you would have ``SYSTEM_DEFAULTLOCALE``
The Current list of settings is
```
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)
## 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/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: What are your planned features?
- Progress bar/Tracking
- Full custom logic pipelines to combine multiple operations together.
- Folder support with auto scanning to perform operations on
- Redact text (Via UI not just automated way)
- Add Forms
- Multi page layout (Stich PDF pages together) support x rows y columns and custom page sizing
- Fill forms mannual and automatic
### 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;``

64
Version-groups.md Normal file
View File

@@ -0,0 +1,64 @@
|Technology | Ultra-Lite | Lite | Full |
|----------------|:----------:|:----:|:----:|
| Java | ✔️ | ✔️ | ✔️ |
| JavaScript | ✔️ | ✔️ | ✔️ |
| Libre | | ✔️ | ✔️ |
| Python | | | ✔️ |
| OpenCV | | | ✔️ |
| OCRmyPDF | | | ✔️ |
Operation | Ultra-Lite | 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 | ✔️ | ✔️ | ✔️
file-to-pdf | | ✔️ | ✔️
pdf-to-html | | ✔️ | ✔️
pdf-to-presentation | | ✔️ | ✔️
pdf-to-text | | ✔️ | ✔️
pdf-to-word | | ✔️ | ✔️
pdf-to-xml | | ✔️ | ✔️
repair | | ✔️ | ✔️
xlsx-to-pdf | | ✔️ | ✔️
compress-pdf | | | ✔️
extract-image-scans | | | ✔️
ocr-pdf | | | ✔️
pdf-to-pdfa | | | ✔️
remove-blanks | | | ✔️

View File

@@ -1,47 +1,199 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.0.5'
id 'io.spring.dependency-management' version '1.1.0'
id 'java'
id 'org.springframework.boot' version '3.2.1'
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.23.3'
id 'com.github.jk1.dependency-license-report' version '2.5'
}
import com.github.jk1.license.render.*
group = 'stirling.software'
version = '0.4.7'
version = '0.19.1'
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'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
// https://mvnrepository.com/artifact/org.apache.pdfbox/jbig2-imageio
implementation group: 'org.apache.pdfbox', name: 'jbig2-imageio', version: '3.0.4'
//general PDF
implementation 'org.apache.pdfbox:pdfbox:2.0.27'
implementation 'com.itextpdf:itextpdf:5.5.13.3'
developmentOnly("org.springframework.boot:spring-boot-devtools")
//security updates
implementation 'ch.qos.logback:logback-classic:1.4.14'
implementation 'ch.qos.logback:logback-core:1.4.14'
implementation 'org.springframework:spring-webmvc:6.1.2'
implementation 'org.yaml:snakeyaml:2.2'
implementation 'org.springframework.boot:spring-boot-starter-web:3.2.1'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf:3.2.1'
if (System.getenv('DOCKER_ENABLE_SECURITY') != 'false') {
implementation 'org.springframework.boot:spring-boot-starter-security:3.2.1'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5:3.1.2.RELEASE'
implementation "org.springframework.boot:spring-boot-starter-data-jpa:3.2.1"
//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.1'
// 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:2.0.30'){
exclude group: 'commons-logging', module: 'commons-logging'
}
implementation ('org.apache.pdfbox:xmpbox:2.0.30'){
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'
implementation 'io.micrometer:micrometer-core'
implementation group: 'com.google.zxing', name: 'core', version: '3.5.2'
// https://mvnrepository.com/artifact/org.commonmark/commonmark
implementation 'org.commonmark:commonmark:0.21.0'
// https://mvnrepository.com/artifact/com.github.vladimir-bukhtoyarov/bucket4j-core
implementation 'com.github.vladimir-bukhtoyarov:bucket4j-core:7.6.0'
developmentOnly("org.springframework.boot:spring-boot-devtools")
compileOnly 'org.projectlombok:lombok:1.18.30'
annotationProcessor 'org.projectlombok:lombok:1.18.28'
}
tasks.withType(JavaCompile) {
dependsOn 'spotlessApply'
}
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,15 @@
apiVersion: v2
appVersion: 0.14.2
description: locally hosted web application that allows you to perform various operations on PDF files
home: https://github.com/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: PP_HOME_NAME
# value: "Stirling PDF"
# - name: APP_HOME_DESCRIPTION
# value: "Your locally hosted one-stop-shop for all your PDF needs."
# - name: APP_NAVBAR_NAME
# value: "Stirling PDF"
# - name: ALLOW_GOOGLE_VISIBILITY
# value: "true"
# - name: APP_ROOT_PATH
# value: "/"
# - name: APP_LOCALE
# value: "en_GB"
deployment:
## stirling-pdf Deployment annotations
annotations: {}
# name: value
labels: {}
# name: value
# additional volumes
extraVolumes: []
# - name: nginx-config
# secret:
# secretName: nginx-config
# additional volumes to mount
extraVolumeMounts: []
## sidecarContainers for the stirling-pdf
# Can be used to add a proxy to the pod that does
# scanning for secrets, signing, authentication, validation
# of the chart's content, send notifications...
sidecarContainers: {}
## Example sidecarContainer which uses an extraVolume from above and
## a named port that can be referenced in the service as targetPort.
# proxy:
# image: nginx:latest
# ports:
# - name: proxy
# containerPort: 8081
# volumeMounts:
# - name: nginx-config
# readOnly: true
# mountPath: /etc/nginx
## Pod annotations
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
## Read more about kube2iam to provide access to s3 https://github.com/jtblin/kube2iam
##
podAnnotations: {}
# iam.amazonaws.com/role: role-arn
## Pod labels
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
podLabels: {}
# name: value
service:
servicename:
type: ClusterIP
externalTrafficPolicy: Local
## Uses pre-assigned IP address from cloud provider
## Only valid if service.type: LoadBalancer
loadBalancerIP:
## Limits which cidr blocks can connect to service's load balancer
## Only valid if service.type: LoadBalancer
loadBalancerSourceRanges: []
# clusterIP: None
externalPort: 8080
## targetPort of the container to use. If a sidecar should handle the
## requests first, use the named port from the sidecar. See sidecar example
## from deployment above. Leave empty to use stirling-pdf directly.
targetPort:
nodePort:
annotations: {}
labels: {}
serviceMonitor:
enabled: false
# namespace: prometheus
labels: {}
metricsPath: "/metrics"
# timeout: 60
# interval: 60
resources: {}
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 80m
# memory: 64Mi
probes:
liveness:
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 3
livenessHttpGetConfig:
scheme: HTTP
readiness:
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 3
readinessHttpGetConfig:
scheme: HTTP
serviceAccount:
create: true
name: ""
automountServiceAccountToken: false
## Annotations for the Service Account
annotations: {}
# UID/GID 1000 is the default user "stirling-pdf" used in
# the container image starting in v0.8.0 and above. This
# is required for local persistent storage. If your cluster
# does not allow this, try setting securityContext: {}
securityContext:
enabled: true
fsGroup: 1000
## Optionally, specify supplementalGroups and/or
## runAsNonRoot for security purposes
# runAsNonRoot: true
# supplementalGroups: [1000]
containerSecurityContext: {}
priorityClassName: ""
nodeSelector: {}
tolerations: []
affinity: {}
persistence:
enabled: false
accessMode: ReadWriteOnce
size: 8Gi
labels: {}
# name: value
path: /tmp
## A manually managed Persistent Volume and Claim
## Requires persistence.enabled: true
## If defined, PVC must be created manually before volume will be bound
# existingClaim:
## stirling-pdf data Persistent Volume Storage Class
## If defined, storageClassName: <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:

View File

@@ -0,0 +1,31 @@
version: '3.3'
services:
stirling-pdf:
container_name: Stirling-PDF-Lite-Security
image: frooodle/s-pdf:latest-lite
deploy:
resources:
limits:
memory: 2G
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/tesseract-ocr/5/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-Lite
image: frooodle/s-pdf:latest-lite
deploy:
resources:
limits:
memory: 2G
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-Lite
UI_HOMEDESCRIPTION: Demo site for Stirling-PDF-Lite Latest
UI_APPNAMENAVBAR: Stirling-PDF-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-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/tesseract-ocr/5/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
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/tesseract-ocr/5/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/tesseract-ocr/5/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

BIN
images/DemoGif.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 131 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,33 @@
{
"name": "split-rotate-auto-rename",
"pipeline": [
{
"operation": "/api/v1/general/split-pdf-by-sections",
"parameters": {
"horizontalDivisions": 2,
"verticalDivisions": 2,
"fileInput": "automated"
}
},
{
"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 (!file.getName().equals("messages_en_GB.properties")) {
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,37 @@
import cv2
import sys
import argparse
import numpy as np
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)
white_pixel_percentage = (white_pixels / thresholded_image.size) * 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)
# Return code 1: The image is considered blank.
# Return code 0: The image is not considered blank.
sys.exit(int(blank))

View File

@@ -0,0 +1,19 @@
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
fi
fi
fi

View File

@@ -0,0 +1,6 @@
#!/bin/sh
/scripts/download-security-jar.sh
# Run the main command
exec "$@"

26
scripts/init.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
# 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
if [ -d /usr/share/tesseract-ocr/4.00/tessdata ]; then
cp -r /usr/share/tesseract-ocr/4.00/tessdata/* /usr/share/tesseract-ocr/5/tessdata/ || true;
fi
# 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 ',' ' ')
# Install each language pack
for LANG in $LANGS; do
apt-get install -y "tesseract-ocr-$LANG"
done
fi
/scripts/download-security-jar.sh
# Run the main command
exec "$@"

116
scripts/split_photos.py Normal file
View File

@@ -0,0 +1,116 @@
import argparse
import sys
import cv2
import numpy as np
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)
mask = cv2.bitwise_not(mask)
kernel = np.ones((5,5),np.uint8)
mask = cv2.dilate(mask, kernel, iterations=2)
contours, _ = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
photo_boundaries = []
for contour in contours:
x, y, w, h = cv2.boundingRect(contour)
area = w * h
contour_area = cv2.contourArea(contour)
if area >= min_area and contour_area >= min_contour_area:
photo_boundaries.append((x, y, w, h))
return photo_boundaries
def estimate_background_color(image, sample_points=5):
h, w, _ = image.shape
points = [
(0, 0),
(w - 1, 0),
(w - 1, h - 1),
(0, h - 1),
(w // 2, h // 2),
]
colors = []
for x, y in points:
colors.append(image[y, x])
return np.median(colors, axis=0)
def auto_rotate(image, angle_threshold=1):
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
edges = cv2.Canny(gray, 50, 150, apertureSize=3)
lines = cv2.HoughLines(edges, 1, np.pi / 180, 200)
if lines is None:
return image
# compute the median angle of the lines
angles = []
for rho, theta in lines[:, 0]:
angles.append((theta * 180) / np.pi - 90)
angle = np.median(angles)
if abs(angle) < angle_threshold:
return image
(h, w) = image.shape[:2]
center = (w // 2, h // 2)
M = cv2.getRotationMatrix2D(center, angle, 1.0)
return cv2.warpAffine(image, M, (w, h), flags=cv2.INTER_CUBIC, borderMode=cv2.BORDER_REPLICATE)
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)
# Add a constant border around the image
image = cv2.copyMakeBorder(image, border_size, border_size, border_size, border_size, cv2.BORDER_CONSTANT, value=background_color)
photo_boundaries = find_photo_boundaries(image, background_color, tolerance)
if not os.path.exists(output_directory):
os.makedirs(output_directory)
# Get the input file's base name without the extension
input_file_basename = os.path.splitext(os.path.basename(input_file))[0]
for idx, (x, y, w, h) in enumerate(photo_boundaries):
cropped_image = image[y:y+h, x:x+w]
cropped_image = auto_rotate(cropped_image, angle_threshold)
# Remove the added border
cropped_image = cropped_image[border_size:-border_size, border_size:-border_size]
output_path = os.path.join(output_directory, f"{input_file_basename}_{idx+1}.png")
cv2.imwrite(output_path, cropped_image)
print(f"Saved {output_path}")
if __name__ == "__main__":
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).")
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

@@ -1,4 +1,5 @@
package stirling.software.SPDF;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
@@ -6,89 +7,90 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class LibreOfficeListener {
private static final LibreOfficeListener INSTANCE = new LibreOfficeListener();
private static final long ACTIVITY_TIMEOUT = 20 * 60 * 1000; // 20 minutes
private static final LibreOfficeListener INSTANCE = new LibreOfficeListener();
private static final int LISTENER_PORT = 2002;
private ExecutorService executorService;
private Process process;
private long lastActivityTime;
private LibreOfficeListener() {}
public static LibreOfficeListener getInstance() {
return INSTANCE;
}
public void start() throws IOException {
// Check if the listener is already running
if (process != null && process.isAlive()) {
return;
}
// Start the listener process
process = Runtime.getRuntime().exec("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;
}
}
});
// Wait for the listener to start up
long startTime = System.currentTimeMillis();
long timeout = 30000; // Timeout after 30 seconds
while (System.currentTimeMillis() - startTime < timeout) {
if (isListenerRunning()) {
lastActivityTime = System.currentTimeMillis();
return;
}
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} // Check every 1 second
}
}
private ExecutorService executorService;
private long lastActivityTime;
private Process process;
private LibreOfficeListener() {}
private boolean isListenerRunning() {
try {
System.out.println("waiting for listener to start");
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) {
return false;
}
}
public void start() throws IOException {
// Check if the listener is already running
if (process != null && process.isAlive()) {
return;
}
// Start the listener process
process = Runtime.getRuntime().exec("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;
}
}
});
// Wait for the listener to start up
long startTime = System.currentTimeMillis();
long timeout = 30000; // Timeout after 30 seconds
while (System.currentTimeMillis() - startTime < timeout) {
if (isListenerRunning()) {
lastActivityTime = System.currentTimeMillis();
return;
}
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} // Check every 1 second
}
}
public synchronized void stop() {
// Stop the activity timeout monitor thread
executorService.shutdownNow();
// Stop the listener process
if (process != null && process.isAlive()) {
process.destroy();
}
}
}

View File

@@ -1,11 +1,81 @@
package stirling.software.SPDF;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Collections;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableScheduling;
import jakarta.annotation.PostConstruct;
import stirling.software.SPDF.config.ConfigInitializer;
import stirling.software.SPDF.utils.GeneralUtils;
@SpringBootApplication
@EnableScheduling
public class SPdfApplication {
public static void main(String[] args) {
SpringApplication.run(SPdfApplication.class, args);
@Autowired private Environment env;
@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 && browserOpenEnv.equalsIgnoreCase("true");
if (browserOpen) {
try {
String url = "http://localhost:" + getPort();
String os = System.getProperty("os.name").toLowerCase();
Runtime rt = Runtime.getRuntime();
if (os.contains("win")) {
// For Windows
rt.exec("rundll32 url.dll,FileProtocolHandler " + url);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
public static void main(String[] args) {
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 {
System.out.println(
"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) {
// TODO Auto-generated catch block
e.printStackTrace();
}
GeneralUtils.createDir("customFiles/static/");
GeneralUtils.createDir("customFiles/templates/");
System.out.println("Stirling-PDF Started.");
String url = "http://localhost:" + getPort();
System.out.println("Navigate to " + url);
}
public static String getPort() {
String port = System.getProperty("local.server.port");
if (port == null || port.isEmpty()) {
port = "8080";
}
return port;
}
}

View File

@@ -1,43 +1,81 @@
package stirling.software.SPDF.config;
import java.nio.file.Files;
import java.nio.file.Paths;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import stirling.software.SPDF.model.ApplicationProperties;
@Configuration
public class AppConfig {
public class AppConfig {
@Autowired ApplicationProperties applicationProperties;
@Bean(name = "loginEnabled")
public boolean loginEnabled() {
return applicationProperties.getSecurity().getEnableLogin();
}
@Bean(name = "appName")
public String appName() {
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";
return (version != null) ? version : "0.0.0";
}
@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";
}
@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";
}
@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 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 = "bookFormatsInstalled")
public boolean bookFormatsInstalled() {
return applicationProperties.getSystem().getCustomApplications().isInstallBookFormats();
}
@Bean(name = "htmlFormatsInstalled")
public boolean htmlFormatsInstalled() {
return applicationProperties
.getSystem()
.getCustomApplications()
.isInstallAdvancedHtmlToPDF();
}
}

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,31 +11,17 @@ 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 {
@Bean
public LocaleResolver localeResolver() {
SessionLocaleResolver slr = new SessionLocaleResolver();
@Autowired ApplicationProperties applicationProperties;
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
if (appLocaleEnv != null && !appLocaleEnv.isEmpty()) {
Locale tempLocale = Locale.forLanguageTag(appLocaleEnv);
String 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;
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(localeChangeInterceptor());
registry.addInterceptor(new CleanUrlInterceptor());
}
@Bean
@@ -44,9 +31,34 @@ public class Beans implements WebMvcConfigurer {
return lci;
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(localeChangeInterceptor());
}
@Bean
public LocaleResolver localeResolver() {
SessionLocaleResolver slr = new SessionLocaleResolver();
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);
String tempLanguageTag = tempLocale.toLanguageTag();
if (appLocaleEnv.equalsIgnoreCase(tempLanguageTag)) {
defaultLocale = tempLocale;
} else {
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

@@ -0,0 +1,74 @@
package stirling.software.SPDF.config;
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;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
public class CleanUrlInterceptor implements HandlerInterceptor {
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 {
String queryString = request.getQueryString();
if (queryString != null && !queryString.isEmpty()) {
String requestURI = request.getRequestURI();
Map<String, String> parameters = new HashMap<>();
// 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]);
}
}
// 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());
}
// Redirect to the URL with only allowed query parameters
String redirectUrl = requestURI + "?" + newQueryString;
response.sendRedirect(redirectUrl);
return false;
}
}
return true;
}
@Override
public void postHandle(
HttpServletRequest request,
HttpServletResponse response,
Object handler,
ModelAndView modelAndView) {}
@Override
public void afterCompletion(
HttpServletRequest request,
HttpServletResponse response,
Object handler,
Exception ex) {}
}

View File

@@ -0,0 +1,143 @@
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() : "";
};
Set<String> userKeys = userLines.stream().map(extractKey).collect(Collectors.toSet());
for (String line : templateLines) {
String key = extractKey.apply(line);
if (line.trim().equalsIgnoreCase("AutomaticallyGenerated:")) {
insideAutoGenerated = true;
mergedLines.add(line);
continue;
} else if (insideAutoGenerated && line.trim().isEmpty()) {
insideAutoGenerated = false;
mergedLines.add(line);
continue;
}
if (beforeFirstKey && (isCommented.apply(line) || line.trim().isEmpty())) {
// Handle top comments and empty lines before the first key.
mergedLines.add(line);
continue;
}
if (!key.isEmpty()) beforeFirstKey = false;
if (userKeys.contains(key)) {
// If user has any version (commented or uncommented) of this key, skip the
// template line
Optional<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)) {
mergedLines.add(userLine);
}
}
Files.write(outputPath, mergedLines, StandardCharsets.UTF_8);
}
}

View File

@@ -0,0 +1,247 @@
package stirling.software.SPDF.config;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
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({"bookFormatsInstalled"})
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<>();
private final ApplicationProperties applicationProperties;
private boolean bookFormatsInstalled;
@Autowired
public EndpointConfiguration(
ApplicationProperties applicationProperties,
@Qualifier("bookFormatsInstalled") boolean bookFormatsInstalled) {
this.applicationProperties = applicationProperties;
this.bookFormatsInstalled = bookFormatsInstalled;
init();
processEnvironmentConfigs();
}
public void enableEndpoint(String endpoint) {
endpointStatuses.put(endpoint, true);
}
public void disableEndpoint(String endpoint) {
if (!endpointStatuses.containsKey(endpoint) || endpointStatuses.get(endpoint) != false) {
logger.info("Disabling {}", endpoint);
endpointStatuses.put(endpoint, false);
}
}
public boolean isEndpointEnabled(String endpoint) {
if (endpoint.startsWith("/")) {
endpoint = endpoint.substring(1);
}
return endpointStatuses.getOrDefault(endpoint, true);
}
public void addEndpointToGroup(String group, String endpoint) {
endpointGroups.computeIfAbsent(group, k -> new HashSet<>()).add(endpoint);
}
public void enableGroup(String group) {
Set<String> endpoints = endpointGroups.get(group);
if (endpoints != null) {
for (String endpoint : endpoints) {
enableEndpoint(endpoint);
}
}
}
public void disableGroup(String group) {
Set<String> endpoints = endpointGroups.get(group);
if (endpoints != null) {
for (String endpoint : endpoints) {
disableEndpoint(endpoint);
}
}
}
public void init() {
// Adding endpoints to "PageOps" group
addEndpointToGroup("PageOps", "remove-pages");
addEndpointToGroup("PageOps", "merge-pdfs");
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");
addEndpointToGroup("Convert", "img-to-pdf");
addEndpointToGroup("Convert", "pdf-to-pdfa");
addEndpointToGroup("Convert", "file-to-pdf");
addEndpointToGroup("Convert", "xlsx-to-pdf");
addEndpointToGroup("Convert", "pdf-to-word");
addEndpointToGroup("Convert", "pdf-to-presentation");
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");
addEndpointToGroup("Other", "add-image");
addEndpointToGroup("Other", "compress-pdf");
addEndpointToGroup("Other", "extract-images");
addEndpointToGroup("Other", "change-metadata");
addEndpointToGroup("Other", "extract-image-scans");
addEndpointToGroup("Other", "sign");
addEndpointToGroup("Other", "flatten");
addEndpointToGroup("Other", "repair");
addEndpointToGroup("Other", "remove-blanks");
addEndpointToGroup("Other", "remove-annotations");
addEndpointToGroup("Other", "compare");
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");
addEndpointToGroup("CLI", "xlsx-to-pdf");
addEndpointToGroup("CLI", "pdf-to-word");
addEndpointToGroup("CLI", "pdf-to-presentation");
addEndpointToGroup("CLI", "pdf-to-text");
addEndpointToGroup("CLI", "pdf-to-html");
addEndpointToGroup("CLI", "pdf-to-xml");
addEndpointToGroup("CLI", "ocr-pdf");
addEndpointToGroup("CLI", "html-to-pdf");
addEndpointToGroup("CLI", "url-to-pdf");
addEndpointToGroup("CLI", "book-to-pdf");
addEndpointToGroup("CLI", "pdf-to-book");
// 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");
addEndpointToGroup("LibreOffice", "pdf-to-word");
addEndpointToGroup("LibreOffice", "pdf-to-presentation");
addEndpointToGroup("LibreOffice", "pdf-to-text");
addEndpointToGroup("LibreOffice", "pdf-to-html");
addEndpointToGroup("LibreOffice", "pdf-to-xml");
// OCRmyPDF
addEndpointToGroup("OCRmyPDF", "compress-pdf");
addEndpointToGroup("OCRmyPDF", "pdf-to-pdfa");
addEndpointToGroup("OCRmyPDF", "ocr-pdf");
// Java
addEndpointToGroup("Java", "merge-pdfs");
addEndpointToGroup("Java", "remove-pages");
addEndpointToGroup("Java", "split-pdfs");
addEndpointToGroup("Java", "pdf-organizer");
addEndpointToGroup("Java", "rotate-pdf");
addEndpointToGroup("Java", "pdf-to-img");
addEndpointToGroup("Java", "img-to-pdf");
addEndpointToGroup("Java", "add-password");
addEndpointToGroup("Java", "remove-password");
addEndpointToGroup("Java", "change-permissions");
addEndpointToGroup("Java", "add-watermark");
addEndpointToGroup("Java", "add-image");
addEndpointToGroup("Java", "extract-images");
addEndpointToGroup("Java", "change-metadata");
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");
// Javascript
addEndpointToGroup("Javascript", "pdf-organizer");
addEndpointToGroup("Javascript", "sign");
addEndpointToGroup("Javascript", "compare");
addEndpointToGroup("Javascript", "adjust-contrast");
}
private void processEnvironmentConfigs() {
List<String> endpointsToRemove = applicationProperties.getEndpoints().getToRemove();
List<String> groupsToRemove = applicationProperties.getEndpoints().getGroupsToRemove();
if (!bookFormatsInstalled) {
groupsToRemove.add("Calibre");
}
if (endpointsToRemove != null) {
for (String endpoint : endpointsToRemove) {
disableEndpoint(endpoint.trim());
}
}
if (groupsToRemove != null) {
for (String group : groupsToRemove) {
disableGroup(group.trim());
}
}
}
}

View File

@@ -0,0 +1,26 @@
package stirling.software.SPDF.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
@Component
public class EndpointInterceptor implements HandlerInterceptor {
@Autowired private EndpointConfiguration endpointConfiguration;
@Override
public boolean preHandle(
HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {
String requestURI = request.getRequestURI();
if (!endpointConfiguration.isEndpointEnabled(requestURI)) {
response.sendError(HttpServletResponse.SC_FORBIDDEN, "This endpoint is disabled");
return false;
}
return true;
}
}

View File

@@ -0,0 +1,25 @@
package stirling.software.SPDF.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import io.micrometer.core.instrument.Meter;
import io.micrometer.core.instrument.config.MeterFilter;
import io.micrometer.core.instrument.config.MeterFilterReply;
@Configuration
public class MetricsConfig {
@Bean
public MeterFilter meterFilter() {
return new MeterFilter() {
@Override
public MeterFilterReply accept(Meter.Id id) {
if (id.getName().equals("http.requests")) {
return MeterFilterReply.NEUTRAL;
}
return MeterFilterReply.DENY;
}
};
}
}

View File

@@ -0,0 +1,64 @@
package stirling.software.SPDF.config;
import java.io.IOException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;
import io.micrometer.core.instrument.Counter;
import io.micrometer.core.instrument.MeterRegistry;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
@Component
public class MetricsFilter extends OncePerRequestFilter {
private final MeterRegistry meterRegistry;
@Autowired
public MetricsFilter(MeterRegistry meterRegistry) {
this.meterRegistry = meterRegistry;
}
@Override
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("/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

@@ -0,0 +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();
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,98 @@
package stirling.software.SPDF.config;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
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.stereotype.Component;
import jakarta.annotation.PostConstruct;
import stirling.software.SPDF.model.ApplicationProperties;
import stirling.software.SPDF.utils.ProcessExecutor;
import stirling.software.SPDF.utils.ProcessExecutor.ProcessExecutorResult;
@Component
public class PostStartupProcesses {
@Autowired ApplicationProperties applicationProperties;
@Autowired
@Qualifier("RunningInDocker")
private boolean runningInDocker;
@Autowired
@Qualifier("bookFormatsInstalled")
private boolean bookFormatsInstalled;
@Autowired
@Qualifier("htmlFormatsInstalled")
private boolean htmlFormatsInstalled;
private static final Logger logger = LoggerFactory.getLogger(PostStartupProcesses.class);
@PostConstruct
public void runInstallCommandBasedOnEnvironment() throws IOException, InterruptedException {
List<List<String>> commands = new ArrayList<>();
// Checking for DOCKER_INSTALL_BOOK_FORMATS environment variable
if (bookFormatsInstalled) {
List<String> tmpList = new ArrayList<>();
// Set up the timezone configuration commands
tmpList.addAll(
Arrays.asList(
"sh",
"-c",
"echo 'tzdata tzdata/Areas select Europe' | debconf-set-selections; "
+ "echo 'tzdata tzdata/Zones/Europe select Berlin' | debconf-set-selections"));
commands.add(tmpList);
// Install calibre with DEBIAN_FRONTEND set to noninteractive
tmpList = new ArrayList<>();
tmpList.addAll(
Arrays.asList(
"sh",
"-c",
"DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends calibre"));
commands.add(tmpList);
}
// Checking for DOCKER_INSTALL_HTML_FORMATS environment variable
if (htmlFormatsInstalled) {
List<String> tmpList = new ArrayList<>();
// Add -y flag for automatic yes to prompts and --no-install-recommends to reduce size
tmpList.addAll(
Arrays.asList(
"apt-get", "install", "wkhtmltopdf", "-y", "--no-install-recommends"));
commands.add(tmpList);
}
if (!commands.isEmpty()) {
// Run the command
if (runningInDocker) {
List<String> tmpList = new ArrayList<>();
tmpList.addAll(Arrays.asList("apt-get", "update"));
commands.add(0, tmpList);
for (List<String> list : commands) {
ProcessExecutorResult returnCode =
ProcessExecutor.getInstance(ProcessExecutor.Processes.INSTALL_APP, true)
.runCommandWithOutputHandling(list);
logger.info("RC for app installs {}", returnCode.getRc());
}
} else {
logger.info(
"Not running inside Docker so skipping automated install process with command.");
}
} else {
if (runningInDocker) {
logger.info("No custom apps to install.");
}
}
}
}

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

@@ -0,0 +1,26 @@
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;
@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,49 @@
package stirling.software.SPDF.config.security;
import java.io.IOException;
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;
@Component
public class CustomAuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler {
@Autowired private final LoginAttemptService loginAttemptService;
@Autowired
public CustomAuthenticationFailureHandler(LoginAttemptService loginAttemptService) {
this.loginAttemptService = loginAttemptService;
}
@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 (loginAttemptService.loginAttemptCheck(username)) {
setDefaultFailureUrl("/login?error=locked");
} else {
if (exception.getClass().isAssignableFrom(BadCredentialsException.class)) {
setDefaultFailureUrl("/login?error=badcredentials");
} else if (exception.getClass().isAssignableFrom(LockedException.class)) {
setDefaultFailureUrl("/login?error=locked");
}
}
super.onAuthenticationFailure(request, response, exception);
}
}

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,140 @@
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.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 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 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.formLogin(
formLogin ->
formLogin
.loginPage("/login")
.successHandler(
new CustomAuthenticationSuccessHandler())
.defaultSuccessUrl("/")
.failureHandler(
new CustomAuthenticationFailureHandler(
loginAttemptService))
.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"))
.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\nAlternativly 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();
}
}

View File

@@ -0,0 +1,197 @@
package stirling.software.SPDF.config.security;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
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.UsernameNotFoundException;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;
import stirling.software.SPDF.controller.api.pipeline.UserServiceInterface;
import stirling.software.SPDF.model.Authority;
import stirling.software.SPDF.model.Role;
import stirling.software.SPDF.model.User;
import stirling.software.SPDF.repository.UserRepository;
@Service
public class UserService implements UserServiceInterface {
@Autowired private UserRepository userRepository;
@Autowired private PasswordEncoder passwordEncoder;
public Authentication getAuthentication(String apiKey) {
User user = getUserByApiKey(apiKey);
if (user == null) {
throw new UsernameNotFoundException("API key is not valid");
}
// Convert the user into an Authentication object
return new UsernamePasswordAuthenticationToken(
user, // principal (typically the user)
null, // credentials (we don't expose the password or API key here)
getAuthorities(user) // user's authorities (roles/permissions)
);
}
private Collection<? extends GrantedAuthority> getAuthorities(User user) {
// Convert each Authority object into a SimpleGrantedAuthority object.
return user.getAuthorities().stream()
.map((Authority authority) -> new SimpleGrantedAuthority(authority.getAuthority()))
.collect(Collectors.toList());
}
private String generateApiKey() {
String apiKey;
do {
apiKey = UUID.randomUUID().toString();
} while (userRepository.findByApiKey(apiKey) != null); // Ensure uniqueness
return apiKey;
}
public User addApiKeyToUser(String username) {
User user =
userRepository
.findByUsername(username)
.orElseThrow(() -> new UsernameNotFoundException("User not found"));
user.setApiKey(generateApiKey());
return userRepository.save(user);
}
public User refreshApiKeyForUser(String username) {
return addApiKeyToUser(username); // reuse the add API key method for refreshing
}
public String getApiKeyForUser(String username) {
User user =
userRepository
.findByUsername(username)
.orElseThrow(() -> new UsernameNotFoundException("User not found"));
return user.getApiKey();
}
public boolean isValidApiKey(String apiKey) {
return userRepository.findByApiKey(apiKey) != null;
}
public User getUserByApiKey(String apiKey) {
return userRepository.findByApiKey(apiKey);
}
public UserDetails loadUserByApiKey(String apiKey) {
User userOptional = userRepository.findByApiKey(apiKey);
if (userOptional != null) {
User user = userOptional;
// Convert your User entity to a UserDetails object with authorities
return new org.springframework.security.core.userdetails.User(
user.getUsername(),
user.getPassword(), // you might not need this for API key auth
getAuthorities(user));
}
return null; // or throw an exception
}
public boolean validateApiKeyForUser(String username, String apiKey) {
Optional<User> userOpt = userRepository.findByUsername(username);
return userOpt.isPresent() && userOpt.get().getApiKey().equals(apiKey);
}
public void saveUser(String username, String password) {
User user = new User();
user.setUsername(username);
user.setPassword(passwordEncoder.encode(password));
user.setEnabled(true);
userRepository.save(user);
}
public void saveUser(String username, String password, String role, boolean firstLogin) {
User user = new User();
user.setUsername(username);
user.setPassword(passwordEncoder.encode(password));
user.addAuthority(new Authority(role, user));
user.setEnabled(true);
user.setFirstLogin(firstLogin);
userRepository.save(user);
}
public void saveUser(String username, String password, String role) {
User user = new User();
user.setUsername(username);
user.setPassword(passwordEncoder.encode(password));
user.addAuthority(new Authority(role, user));
user.setEnabled(true);
user.setFirstLogin(false);
userRepository.save(user);
}
public void deleteUser(String username) {
Optional<User> userOpt = userRepository.findByUsername(username);
if (userOpt.isPresent()) {
for (Authority authority : userOpt.get().getAuthorities()) {
if (authority.getAuthority().equals(Role.INTERNAL_API_USER.getRoleId())) {
return;
}
}
userRepository.delete(userOpt.get());
}
}
public boolean usernameExists(String username) {
return userRepository.findByUsername(username).isPresent();
}
public boolean hasUsers() {
return userRepository.count() > 0;
}
public void updateUserSettings(String username, Map<String, String> updates) {
Optional<User> userOpt = userRepository.findByUsername(username);
if (userOpt.isPresent()) {
User user = userOpt.get();
Map<String, String> settingsMap = user.getSettings();
if (settingsMap == null) {
settingsMap = new HashMap<String, String>();
}
settingsMap.clear();
settingsMap.putAll(updates);
user.setSettings(settingsMap);
userRepository.save(user);
}
}
public Optional<User> findByUsername(String username) {
return userRepository.findByUsername(username);
}
public void changeUsername(User user, String newUsername) {
user.setUsername(newUsername);
userRepository.save(user);
}
public void changePassword(User user, String newPassword) {
user.setPassword(passwordEncoder.encode(newPassword));
userRepository.save(user);
}
public void changeFirstUse(User user, boolean firstUse) {
user.setFirstLogin(firstUse);
userRepository.save(user);
}
public boolean isPasswordCorrect(User user, String currentPassword) {
return passwordEncoder.matches(currentPassword, user.getPassword());
}
}

View File

@@ -1,92 +0,0 @@
package stirling.software.SPDF.controller;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import stirling.software.SPDF.utils.ProcessExecutor;
@Controller
public class CompressController {
private static final Logger logger = LoggerFactory.getLogger(CompressController.class);
@GetMapping("/compress-pdf")
public String compressPdfForm(Model model) {
model.addAttribute("currentPage", "compress-pdf");
return "compress-pdf";
}
@PostMapping("/compress-pdf")
public ResponseEntity<byte[]> optimizePdf(
@RequestParam("fileInput") MultipartFile inputFile,
@RequestParam("optimizeLevel") int optimizeLevel,
@RequestParam(name = "fastWebView", required = false) Boolean fastWebView,
@RequestParam(name = "jbig2Lossy", required = false) Boolean jbig2Lossy) throws IOException, InterruptedException {
// Save the uploaded file to a temporary location
Path tempInputFile = Files.createTempFile("input_", ".pdf");
inputFile.transferTo(tempInputFile.toFile());
// Prepare the output file path
Path tempOutputFile = Files.createTempFile("output_", ".pdf");
// Prepare the OCRmyPDF command
List<String> command = new ArrayList<>();
command.add("ocrmypdf");
command.add("--skip-text");
command.add("--tesseract-timeout=0");
command.add("--optimize");
command.add(String.valueOf(optimizeLevel));
command.add("--output-type");
command.add("pdf");
if (fastWebView != null && fastWebView) {
long fileSize = inputFile.getSize();
long fastWebViewSize = (long) (fileSize * 1.25); // 25% higher than file size
command.add("--fast-web-view");
command.add(String.valueOf(fastWebViewSize));
}
if (jbig2Lossy != null && jbig2Lossy) {
command.add("--jbig2-lossy");
}
command.add(tempInputFile.toString());
command.add(tempOutputFile.toString());
int returnCode = ProcessExecutor.getInstance(ProcessExecutor.Processes.OCR_MY_PDF).runCommandWithOutputHandling(command);
// Read the optimized PDF file
byte[] pdfBytes = Files.readAllBytes(tempOutputFile);
// Clean up the temporary files
Files.delete(tempInputFile);
Files.delete(tempOutputFile);
// Return the optimized PDF as a response
String outputFilename = inputFile.getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_Optimized.pdf";
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_PDF);
headers.setContentDispositionFormData("attachment", outputFilename);
return ResponseEntity.ok().headers(headers).body(pdfBytes);
}
}

View File

@@ -1,71 +0,0 @@
package stirling.software.SPDF.controller;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDPage;
import org.apache.pdfbox.pdmodel.PDPageTree;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.InputStreamResource;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import stirling.software.SPDF.utils.PdfUtils;
@Controller
public class MergeController {
private static final Logger logger = LoggerFactory.getLogger(MergeController.class);
@GetMapping("/merge-pdfs")
public String hello(Model model) {
model.addAttribute("currentPage", "merge-pdfs");
return "merge-pdfs";
}
@PostMapping("/merge-pdfs")
public ResponseEntity<byte[]> mergePdfs(@RequestParam("fileInput") MultipartFile[] files) throws IOException {
// Read the input PDF files into PDDocument objects
List<PDDocument> documents = new ArrayList<>();
// Loop through the files array and read each file into a PDDocument
for (MultipartFile file : files) {
documents.add(PDDocument.load(file.getInputStream()));
}
PDDocument mergedDoc = mergeDocuments(documents);
// Return the merged PDF as a response
return PdfUtils.pdfDocToWebResponse(mergedDoc, files[0].getOriginalFilename().replaceFirst("[.][^.]+$", "")+ "_merged.pdf");
}
private PDDocument mergeDocuments(List<PDDocument> documents) throws IOException {
// Create a new empty document
PDDocument mergedDoc = new PDDocument();
// Iterate over the list of documents and add their pages to the merged document
for (PDDocument doc : documents) {
// Get all pages from the current document
PDPageTree pages = doc.getPages();
// Iterate over the pages and add them to the merged document
for (PDPage page : pages) {
mergedDoc.addPage(page);
}
}
// Return the merged document
return mergedDoc;
}
}

View File

@@ -1,173 +0,0 @@
package stirling.software.SPDF.controller;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import stirling.software.SPDF.utils.ProcessExecutor;
//import com.spire.pdf.*;
import java.util.concurrent.Semaphore;
@Controller
public class OCRController {
private static final Logger logger = LoggerFactory.getLogger(OCRController.class);
@GetMapping("/ocr-pdf")
public ModelAndView ocrPdfPage() {
ModelAndView modelAndView = new ModelAndView("ocr-pdf");
modelAndView.addObject("languages", getAvailableTesseractLanguages());
modelAndView.addObject("currentPage", "ocr-pdf");
return modelAndView;
}
private final Semaphore semaphore = new Semaphore(2);
@PostMapping("/ocr-pdf")
public ResponseEntity<byte[]> processPdfWithOCR(@RequestParam("fileInput") MultipartFile inputFile,
@RequestParam("languages") List<String> selectedLanguages,
@RequestParam(name = "sidecar", required = false) Boolean sidecar,
@RequestParam(name = "deskew", required = false) Boolean deskew,
@RequestParam(name = "clean", required = false) Boolean clean,
@RequestParam(name = "clean-final", required = false) Boolean cleanFinal,
@RequestParam(name = "ocrType", required = false) String ocrType) throws IOException, InterruptedException {
//--output-type pdfa
if (selectedLanguages == null || selectedLanguages.size() < 1) {
throw new IOException("Please select at least one language.");
}
// Save the uploaded file to a temporary location
Path tempInputFile = Files.createTempFile("input_", ".pdf");
inputFile.transferTo(tempInputFile.toFile());
// Prepare the output file path
Path tempOutputFile = Files.createTempFile("output_", ".pdf");
// Prepare the output file path
Path sidecarTextPath = null;
// Run OCR Command
String languageOption = String.join("+", selectedLanguages);
List<String> command = new ArrayList<>(Arrays.asList("ocrmypdf","--verbose", "2", "--output-type", "pdf"));
if (sidecar != null && sidecar) {
sidecarTextPath = Files.createTempFile("sidecar", ".txt");
command.add("--sidecar");
command.add(sidecarTextPath.toString());
}
if (deskew != null && deskew) {
command.add("--deskew");
}
if (clean != null && clean) {
command.add("--clean");
}
if (cleanFinal != null && cleanFinal) {
command.add("--clean-final");
}
if (ocrType != null && !ocrType.equals("")) {
if("skip-text".equals(ocrType)) {
command.add("--skip-text");
} else if("force-ocr".equals(ocrType)) {
command.add("--force-ocr");
} else if("Normal".equals(ocrType)) {
}
}
command.addAll(Arrays.asList("--language", languageOption,
tempInputFile.toString(), tempOutputFile.toString()));
//Run CLI command
int returnCode = ProcessExecutor.getInstance(ProcessExecutor.Processes.OCR_MY_PDF).runCommandWithOutputHandling(command);
// Read the OCR processed PDF file
byte[] pdfBytes = Files.readAllBytes(tempOutputFile);
// Clean up the temporary files
Files.delete(tempInputFile);
// Return the OCR processed PDF as a response
String outputFilename = inputFile.getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_OCR.pdf";
HttpHeaders headers = new HttpHeaders();
if (sidecar != null && sidecar) {
// Create a zip file containing both the PDF and the text file
String outputZipFilename = inputFile.getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_OCR.zip";
Path tempZipFile = Files.createTempFile("output_", ".zip");
try (ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(tempZipFile.toFile()))) {
// Add PDF file to the zip
ZipEntry pdfEntry = new ZipEntry(outputFilename);
zipOut.putNextEntry(pdfEntry);
Files.copy(tempOutputFile, zipOut);
zipOut.closeEntry();
// Add text file to the zip
ZipEntry txtEntry = new ZipEntry(outputFilename.replace(".pdf", ".txt"));
zipOut.putNextEntry(txtEntry);
Files.copy(sidecarTextPath, zipOut);
zipOut.closeEntry();
}
byte[] zipBytes = Files.readAllBytes(tempZipFile);
// Clean up the temporary zip file
Files.delete(tempZipFile);
Files.delete(tempOutputFile);
Files.delete(sidecarTextPath);
// Return the zip file containing both the PDF and the text file
headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
headers.setContentDispositionFormData("attachment", outputZipFilename);
return ResponseEntity.ok().headers(headers).body(zipBytes);
} else {
// Return the OCR processed PDF as a response
Files.delete(tempOutputFile);
headers.setContentType(MediaType.APPLICATION_PDF);
headers.setContentDispositionFormData("attachment", outputFilename);
return ResponseEntity.ok().headers(headers).body(pdfBytes);
}
}
public List<String> getAvailableTesseractLanguages() {
String tessdataDir = "/usr/share/tesseract-ocr/4.00/tessdata";
File[] files = new File(tessdataDir).listFiles();
if (files == null) {
return Collections.emptyList();
}
return Arrays.stream(files)
.filter(file -> file.getName().endsWith(".traineddata"))
.map(file -> file.getName().replace(".traineddata", ""))
.filter(lang -> !lang.equalsIgnoreCase("osd"))
.collect(Collectors.toList());
}
}

View File

@@ -1,43 +0,0 @@
package stirling.software.SPDF.controller;
import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import stirling.software.SPDF.utils.PdfUtils;
@Controller
public class OverlayImageController {
private static final Logger logger = LoggerFactory.getLogger(OverlayImageController.class);
@GetMapping("/add-image")
public String overlayImage(Model model) {
model.addAttribute("currentPage", "add-image");
return "add-image";
}
@PostMapping("/add-image")
public ResponseEntity<byte[]> overlayImage(@RequestParam("fileInput") MultipartFile pdfFile, @RequestParam("fileInput2") MultipartFile imageFile, @RequestParam("x") float x,
@RequestParam("y") float y) {
try {
byte[] pdfBytes = pdfFile.getBytes();
byte[] imageBytes = imageFile.getBytes();
byte[] result = PdfUtils.overlayImage(pdfBytes, imageBytes, x, y);
return PdfUtils.bytesToWebResponse(result, pdfFile.getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_overlayed.pdf");
} catch (IOException e) {
logger.error("Failed to add image to PDF", e);
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
}
}
}

View File

@@ -1,27 +0,0 @@
package stirling.software.SPDF.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class PdfController {
private static final Logger logger = LoggerFactory.getLogger(PdfController.class);
@GetMapping("/home")
public String root(Model model) {
return "redirect:/";
}
@GetMapping("/")
public String home(Model model) {
model.addAttribute("currentPage", "home");
return "home";
}
}

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