diff --git a/.github/scripts/requirements_pre_commit.txt b/.github/scripts/requirements_pre_commit.txt index ea034f5d1..4e2d2c2b6 100644 --- a/.github/scripts/requirements_pre_commit.txt +++ b/.github/scripts/requirements_pre_commit.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile --generate-hashes --output-file='.github\scripts\requirements_pre_commit.txt' '.github\scripts\requirements_pre_commit.in' +# pip-compile --generate-hashes --output-file='.github\scripts\requirements_pre_commit.txt' --strip-extras '.github\scripts\requirements_pre_commit.in' # cfgv==3.4.0 \ --hash=sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9 \ @@ -12,25 +12,25 @@ distlib==0.3.9 \ --hash=sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87 \ --hash=sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403 # via virtualenv -filelock==3.16.1 \ - --hash=sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0 \ - --hash=sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435 +filelock==3.18.0 \ + --hash=sha256:adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2 \ + --hash=sha256:c401f4f8377c4464e6db25fff06205fd89bdd83b65eb0488ed1b160f780e21de # via virtualenv -identify==2.6.5 \ - --hash=sha256:14181a47091eb75b337af4c23078c9d09225cd4c48929f521f3bf16b09d02566 \ - --hash=sha256:c10b33f250e5bba374fae86fb57f3adcebf1161bce7cdf92031915fd480c13bc +identify==2.6.12 \ + --hash=sha256:ad9672d5a72e0d2ff7c5c8809b62dfa60458626352fb0eb7b55e69bdc45334a2 \ + --hash=sha256:d8de45749f1efb108badef65ee8386f0f7bb19a7f26185f74de6367bffbaf0e6 # via pre-commit nodeenv==1.9.1 \ --hash=sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f \ --hash=sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9 # via pre-commit -platformdirs==4.3.6 \ - --hash=sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907 \ - --hash=sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb +platformdirs==4.3.8 \ + --hash=sha256:3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc \ + --hash=sha256:ff7059bb7eb1179e2685604f4aaf157cfd9535242bd23742eadc3c13542139b4 # via virtualenv -pre-commit==4.0.1 \ - --hash=sha256:80905ac375958c0444c65e9cebebd948b3cdb518f335a091a670a89d652139d2 \ - --hash=sha256:efde913840816312445dc98787724647c65473daefe420785f885e8ed9a06878 +pre-commit==4.2.0 \ + --hash=sha256:601283b9757afd87d40c4c4a9b2b5de9637a8ea02eaff7adc2d0fb4e04841146 \ + --hash=sha256:a009ca7205f1eb497d10b845e52c838a98b6cdd2102a6c8e4540e94ee75c58bd # via -r .github\scripts\requirements_pre_commit.in pyyaml==6.0.2 \ --hash=sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff \ @@ -87,7 +87,7 @@ pyyaml==6.0.2 \ --hash=sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12 \ --hash=sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4 # via pre-commit -virtualenv==20.28.1 \ - --hash=sha256:412773c85d4dab0409b83ec36f7a6499e72eaf08c80e81e9576bca61831c71cb \ - --hash=sha256:5d34ab240fdb5d21549b76f9e8ff3af28252f5499fb6d6f031adac4e5a8c5329 +virtualenv==20.31.2 \ + --hash=sha256:36efd0d9650ee985f0cad72065001e66d49a6f24eb44d98980f630686243cf11 \ + --hash=sha256:e10c0a9d02835e592521be48b332b6caee6887f332c111aa79a09b9e79efc2af # via pre-commit diff --git a/.github/scripts/requirements_sync_readme.txt b/.github/scripts/requirements_sync_readme.txt index 6b72d4086..e72486ab2 100644 --- a/.github/scripts/requirements_sync_readme.txt +++ b/.github/scripts/requirements_sync_readme.txt @@ -2,9 +2,9 @@ # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile --generate-hashes --output-file='.github\scripts\requirements_sync_readme.txt' '.github\scripts\requirements_sync_readme.in' +# pip-compile --generate-hashes --output-file='.github\scripts\requirements_sync_readme.txt' --strip-extras '.github\scripts\requirements_sync_readme.in' # -tomlkit==0.13.2 \ - --hash=sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde \ - --hash=sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79 +tomlkit==0.13.3 \ + --hash=sha256:430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1 \ + --hash=sha256:c89c649d79ee40629a9fda55f8ace8c6a1b42deb912b2a8fd8d942ddadb606b0 # via -r .github\scripts\requirements_sync_readme.in diff --git a/scripts/generate_requirements.bat b/scripts/generate_requirements.bat new file mode 100644 index 000000000..6e263cb0a --- /dev/null +++ b/scripts/generate_requirements.bat @@ -0,0 +1,48 @@ +@echo off +REM -------------------------------------------------- +REM Batch script to (re-)generate all requirements +REM with check for pip-compile and user confirmation +REM -------------------------------------------------- + +REM Check if pip-compile is available +pip-compile --version >nul 2>&1 +if %ERRORLEVEL% neq 0 ( + echo ERROR: pip-compile was not found. + echo Please install pip-tools: + echo pip install pip-tools + echo and ensure that pip-compile is in your PATH. + pause + exit /b 1 +) + +echo pip-compile detected. + +REM Prompt user for confirmation (default = Yes on ENTER) +set /p confirm="Do you want to generate all requirements? [Y/n] " +if /I "%confirm%"=="" set confirm=Y + +if /I not "%confirm%"=="Y" ( + echo Generation cancelled by user. + pause + exit /b 0 +) + +echo Starting generation... + +echo Generating .github\scripts\requirements_pre_commit.txt +pip-compile --generate-hashes --upgrade --strip-extras ^ + --output-file=".github\scripts\requirements_pre_commit.txt" ^ + ".github\scripts\requirements_pre_commit.in" + +echo Generating .github\scripts\requirements_sync_readme.txt +pip-compile --generate-hashes --upgrade --strip-extras ^ + --output-file=".github\scripts\requirements_sync_readme.txt" ^ + ".github\scripts\requirements_sync_readme.in" + +echo Generating testing\cucumber\requirements.txt +pip-compile --generate-hashes --upgrade --strip-extras ^ + --output-file="testing\cucumber\requirements.txt" ^ + "testing\cucumber\requirements.in" + +echo All done! +pause diff --git a/stirling-pdf/src/main/resources/static/css/navbar.css b/stirling-pdf/src/main/resources/static/css/navbar.css index 018727776..4e562bc3b 100644 --- a/stirling-pdf/src/main/resources/static/css/navbar.css +++ b/stirling-pdf/src/main/resources/static/css/navbar.css @@ -86,7 +86,8 @@ .scalable-languages-container { display: grid; - grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Auto-fill columns, with a minimum width of 180px */ + /* Auto-fill columns, with a minimum width of 180px */ + grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } .scalable-languages-container:not(:has(> :nth-child(4))) .lang-dropdown-item-wrapper:last-child { @@ -106,15 +107,15 @@ } html[dir="ltr"] .lang-dropdown-item-wrapper { - border-right: 2px solid var(--md-nav-color-on-seperator); + border-right: 2px solid var(--md-nav-color-on-separator); } html[dir="rtl"] .lang-dropdown-item-wrapper { - border-left: 2px solid var(--md-nav-color-on-seperator); + border-left: 2px solid var(--md-nav-color-on-separator); } /* Responsive adjustments */ -@media (min-width: 1200px){ +@media (min-width: 1200px) { .lang-dropdown-item-wrapper .dropdown-item { min-width: 200px } @@ -124,9 +125,11 @@ html[dir="rtl"] .lang-dropdown-item-wrapper { .scalable-languages-container { grid-template-columns: repeat(2, 1fr); } - .scalable-languages-container:not(:has(> :nth-child(2))){ + + .scalable-languages-container:not(:has(> :nth-child(2))) { grid-template-columns: repeat(var(--count), 1fr) !important; } + .scalable-languages-container .lang-dropdown-item-wrapper:nth-child(2n) { border: 0px } @@ -136,9 +139,11 @@ html[dir="rtl"] .lang-dropdown-item-wrapper { .scalable-languages-container { grid-template-columns: repeat(3, 1fr); } - .scalable-languages-container:not(:has(> :nth-child(3))){ + + .scalable-languages-container:not(:has(> :nth-child(3))) { grid-template-columns: repeat(var(--count), 1fr) !important; } + .scalable-languages-container .lang-dropdown-item-wrapper:nth-child(3n) { border: 0px } @@ -149,12 +154,12 @@ html[dir="rtl"] .lang-dropdown-item-wrapper { grid-template-columns: repeat(4, 1fr); } - .scalable-languages-container:not(:has(> :nth-child(4))){ + .scalable-languages-container:not(:has(> :nth-child(4))) { grid-template-columns: repeat(var(--count), 1fr) !important; } .scalable-languages-container .lang-dropdown-item-wrapper:nth-child(4n) { - border: 0px + border: 0px } } diff --git a/stirling-pdf/src/main/resources/static/css/theme/theme.dark.css b/stirling-pdf/src/main/resources/static/css/theme/theme.dark.css index be1a1431e..411c8f14c 100644 --- a/stirling-pdf/src/main/resources/static/css/theme/theme.dark.css +++ b/stirling-pdf/src/main/resources/static/css/theme/theme.dark.css @@ -1,79 +1,79 @@ :root { - /* Colors */ - --md-sys-color-primary: rgb(162 201 255); - --md-sys-color-surface-tint: rgb(162 201 255); - --md-sys-color-on-primary: rgb(0 49 92); - --md-sys-color-primary-container: rgb(0 118 208); - --md-sys-color-on-primary-container: rgb(255 255 255); - --md-sys-color-secondary: rgb(169 201 246); - --md-sys-color-on-secondary: rgb(12 49 87); - --md-sys-color-secondary-container: rgb(29 62 100); - --md-sys-color-on-secondary-container: rgb(180 210 255); - --md-sys-color-tertiary: rgb(193 194 248); - --md-sys-color-on-tertiary: rgb(42 44 88); - --md-sys-color-tertiary-container: rgb(110 112 161); - --md-sys-color-on-tertiary-container: rgb(255 255 255); - --md-sys-color-error: rgb(255 180 171); - --md-sys-color-on-error: rgb(105 0 5); - --md-sys-color-error-container: rgb(147 0 10); - --md-sys-color-on-error-container: rgb(255 218 214); - --md-sys-color-background: rgb(15 20 26); - --md-sys-color-on-background: rgb(223 226 235); - --md-sys-color-surface: rgb(15 20 26); - --md-sys-color-on-surface: rgb(223 226 235); - --md-sys-color-surface-variant: rgb(64 71 83); - --md-sys-color-on-surface-variant: rgb(192 199 213); - --md-sys-color-outline: rgb(138 145 158); - --md-sys-color-outline-variant: rgb(64 71 83); - --md-sys-color-shadow: rgb(0 0 0); - --md-sys-color-scrim: rgb(0 0 0); - --md-sys-color-inverse-surface: rgb(223 226 235); - --md-sys-color-inverse-on-surface: rgb(45 49 55); - --md-sys-color-inverse-primary: rgb(0 96 170); - --md-sys-color-primary-fixed: rgb(211 228 255); - --md-sys-color-on-primary-fixed: rgb(0 28 56); - --md-sys-color-primary-fixed-dim: rgb(162 201 255); - --md-sys-color-on-primary-fixed-variant: rgb(0 72 130); - --md-sys-color-secondary-fixed: rgb(211 228 255); - --md-sys-color-on-secondary-fixed: rgb(0 28 56); - --md-sys-color-secondary-fixed-dim: rgb(169 201 246); - --md-sys-color-on-secondary-fixed-variant: rgb(40 72 111); - --md-sys-color-tertiary-fixed: rgb(225 224 255); - --md-sys-color-on-tertiary-fixed: rgb(20 22 66); - --md-sys-color-tertiary-fixed-dim: rgb(193 194 248); - --md-sys-color-on-tertiary-fixed-variant: rgb(64 67 112); - --md-sys-color-surface-dim: rgb(15 20 26); - --md-sys-color-surface-bright: rgb(53 57 64); - --md-sys-color-surface-container-lowest: rgb(10 14 20); - --md-sys-color-surface-container-low: rgb(24 28 34); - --md-sys-color-surface-container: rgb(28 32 38); - --md-sys-color-surface-container-high: rgb(38 42 49); - --md-sys-color-surface-container-highest: rgb(49 53 60); - /* Tools Color */ - --md-nav-section-color-opacity: 1; - --md-nav-on-section-color-opacity: 1; - --md-nav-section-color-sign: rgba(25, 101, 212, var(--md-nav-section-color-opacity)); - --md-nav-on-section-color-sign: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); - --md-nav-section-color-organize: rgba(120, 130, 255, var(--md-nav-section-color-opacity)); - --md-nav-on-section-color-organize: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); - --md-nav-section-color-convert: rgba(25, 177, 212, var(--md-nav-section-color-opacity)); - --md-nav-on-section-color-convert: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); - --md-nav-section-color-convertto: rgba(104, 220, 149, var(--md-nav-section-color-opacity)); - --md-nav-on-section-color-convertto: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); - --md-nav-section-color-security: rgba(255, 120, 146, var(--md-nav-section-color-opacity)); - --md-nav-on-section-color-security: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); - --md-nav-section-color-other: rgba(72, 189, 84, var(--md-nav-section-color-opacity)); - --md-nav-on-section-color-other: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); - --md-nav-section-color-advance: rgba(245, 84, 84, var(--md-nav-section-color-opacity)); - --md-nav-on-section-color-advance: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); - --md-nav-section-color-image: rgba(212, 172, 25, var(--md-nav-section-color-opacity)); - --md-nav-on-section-color-image: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); - --md-nav-section-color-word: rgba(61, 153, 245, var(--md-nav-section-color-opacity)); - --md-nav-on-section-color-word: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); - --md-nav-section-color-ppt: rgba(255, 128, 0, var(--md-nav-section-color-opacity)); - --md-nav-on-section-color-ppt: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); - --md-nav-color-on-seperator: rgb(24 28 34); - --md-nav-background: rgb(15 20 26); - --favourite-add: #9ed18c; - --favourite-remove: palevioletred; -} + /* Colors */ + --md-sys-color-primary: rgb(162 201 255); + --md-sys-color-surface-tint: rgb(162 201 255); + --md-sys-color-on-primary: rgb(0 49 92); + --md-sys-color-primary-container: rgb(0 118 208); + --md-sys-color-on-primary-container: rgb(255 255 255); + --md-sys-color-secondary: rgb(169 201 246); + --md-sys-color-on-secondary: rgb(12 49 87); + --md-sys-color-secondary-container: rgb(29 62 100); + --md-sys-color-on-secondary-container: rgb(180 210 255); + --md-sys-color-tertiary: rgb(193 194 248); + --md-sys-color-on-tertiary: rgb(42 44 88); + --md-sys-color-tertiary-container: rgb(110 112 161); + --md-sys-color-on-tertiary-container: rgb(255 255 255); + --md-sys-color-error: rgb(255 180 171); + --md-sys-color-on-error: rgb(105 0 5); + --md-sys-color-error-container: rgb(147 0 10); + --md-sys-color-on-error-container: rgb(255 218 214); + --md-sys-color-background: rgb(15 20 26); + --md-sys-color-on-background: rgb(223 226 235); + --md-sys-color-surface: rgb(15 20 26); + --md-sys-color-on-surface: rgb(223 226 235); + --md-sys-color-surface-variant: rgb(64 71 83); + --md-sys-color-on-surface-variant: rgb(192 199 213); + --md-sys-color-outline: rgb(138 145 158); + --md-sys-color-outline-variant: rgb(64 71 83); + --md-sys-color-shadow: rgb(0 0 0); + --md-sys-color-scrim: rgb(0 0 0); + --md-sys-color-inverse-surface: rgb(223 226 235); + --md-sys-color-inverse-on-surface: rgb(45 49 55); + --md-sys-color-inverse-primary: rgb(0 96 170); + --md-sys-color-primary-fixed: rgb(211 228 255); + --md-sys-color-on-primary-fixed: rgb(0 28 56); + --md-sys-color-primary-fixed-dim: rgb(162 201 255); + --md-sys-color-on-primary-fixed-variant: rgb(0 72 130); + --md-sys-color-secondary-fixed: rgb(211 228 255); + --md-sys-color-on-secondary-fixed: rgb(0 28 56); + --md-sys-color-secondary-fixed-dim: rgb(169 201 246); + --md-sys-color-on-secondary-fixed-variant: rgb(40 72 111); + --md-sys-color-tertiary-fixed: rgb(225 224 255); + --md-sys-color-on-tertiary-fixed: rgb(20 22 66); + --md-sys-color-tertiary-fixed-dim: rgb(193 194 248); + --md-sys-color-on-tertiary-fixed-variant: rgb(64 67 112); + --md-sys-color-surface-dim: rgb(15 20 26); + --md-sys-color-surface-bright: rgb(53 57 64); + --md-sys-color-surface-container-lowest: rgb(10 14 20); + --md-sys-color-surface-container-low: rgb(24 28 34); + --md-sys-color-surface-container: rgb(28 32 38); + --md-sys-color-surface-container-high: rgb(38 42 49); + --md-sys-color-surface-container-highest: rgb(49 53 60); + /* Tools Color */ + --md-nav-section-color-opacity: 1; + --md-nav-on-section-color-opacity: 1; + --md-nav-section-color-sign: rgba(25, 101, 212, var(--md-nav-section-color-opacity)); + --md-nav-on-section-color-sign: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); + --md-nav-section-color-organize: rgba(120, 130, 255, var(--md-nav-section-color-opacity)); + --md-nav-on-section-color-organize: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); + --md-nav-section-color-convert: rgba(25, 177, 212, var(--md-nav-section-color-opacity)); + --md-nav-on-section-color-convert: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); + --md-nav-section-color-convertto: rgba(104, 220, 149, var(--md-nav-section-color-opacity)); + --md-nav-on-section-color-convertto: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); + --md-nav-section-color-security: rgba(255, 120, 146, var(--md-nav-section-color-opacity)); + --md-nav-on-section-color-security: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); + --md-nav-section-color-other: rgba(72, 189, 84, var(--md-nav-section-color-opacity)); + --md-nav-on-section-color-other: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); + --md-nav-section-color-advance: rgba(245, 84, 84, var(--md-nav-section-color-opacity)); + --md-nav-on-section-color-advance: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); + --md-nav-section-color-image: rgba(212, 172, 25, var(--md-nav-section-color-opacity)); + --md-nav-on-section-color-image: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); + --md-nav-section-color-word: rgba(61, 153, 245, var(--md-nav-section-color-opacity)); + --md-nav-on-section-color-word: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); + --md-nav-section-color-ppt: rgba(255, 128, 0, var(--md-nav-section-color-opacity)); + --md-nav-on-section-color-ppt: rgba(28, 27, 31, var(--md-nav-on-section-color-opacity)); + --md-nav-color-on-separator: rgb(24 28 34); + --md-nav-background: rgb(15 20 26); + --favourite-add: #9ed18c; + --favourite-remove: palevioletred; +} \ No newline at end of file diff --git a/stirling-pdf/src/main/resources/static/css/theme/theme.light.css b/stirling-pdf/src/main/resources/static/css/theme/theme.light.css index 269ccd68b..f4bfc4065 100644 --- a/stirling-pdf/src/main/resources/static/css/theme/theme.light.css +++ b/stirling-pdf/src/main/resources/static/css/theme/theme.light.css @@ -72,8 +72,8 @@ --md-nav-on-section-color-word: rgba(255, 251, 254, var(--md-nav-on-section-color-opacity)); --md-nav-section-color-ppt: rgba(255, 128, 0, var(--md-nav-section-color-opacity)); --md-nav-on-section-color-ppt: rgba(255, 251, 254, var(--md-nav-on-section-color-opacity)); - --md-nav-color-on-seperator: rgb(174, 178, 179); + --md-nav-color-on-separator: rgb(174, 178, 179); --md-nav-background: rgb(248 249 255); --favourite-add: #25ab6c; --favourite-remove: rgb(222, 94, 137); -} +} \ No newline at end of file diff --git a/stirling-pdf/src/main/resources/static/js/DecryptFiles.js b/stirling-pdf/src/main/resources/static/js/DecryptFiles.js index 340773cb7..67349a012 100644 --- a/stirling-pdf/src/main/resources/static/js/DecryptFiles.js +++ b/stirling-pdf/src/main/resources/static/js/DecryptFiles.js @@ -125,7 +125,7 @@ export class DecryptFile { } else if (error.code === pdfjsLib.PasswordResponses.INCORRECT_PASSWORD) { return {isEncrypted: true, requiresPassword: false}; } - } else if (error.name === 'InvalidPDFException' || + } else if (error.name === 'InvalidPDFException' || (error.message && error.message.includes('Invalid PDF structure'))) { // Handle corrupted PDF files console.error('Corrupted PDF detected:', error); diff --git a/stirling-pdf/src/main/resources/static/js/downloader.js b/stirling-pdf/src/main/resources/static/js/downloader.js index c5a1a91db..301b0411b 100644 --- a/stirling-pdf/src/main/resources/static/js/downloader.js +++ b/stirling-pdf/src/main/resources/static/js/downloader.js @@ -238,7 +238,7 @@ ); throw decryptError; } - } else if (error.name === 'InvalidPDFException' || + } else if (error.name === 'InvalidPDFException' || (error.message && error.message.includes('Invalid PDF structure'))) { // Handle corrupted PDF files console.log(`Corrupted PDF detected: ${file.name}`, error); diff --git a/stirling-pdf/src/main/resources/static/js/fileInput.js b/stirling-pdf/src/main/resources/static/js/fileInput.js index b728792f1..71b6a1ebf 100644 --- a/stirling-pdf/src/main/resources/static/js/fileInput.js +++ b/stirling-pdf/src/main/resources/static/js/fileInput.js @@ -226,7 +226,7 @@ function setupFileInput(chooser) { try { const { isEncrypted, requiresPassword } = await decryptFile.checkFileEncrypted(file); - if (file.type === 'application/pdf' && isEncrypted && + if (file.type === 'application/pdf' && isEncrypted && !window.location.pathname.includes('remove-password')) { decryptedFile = await decryptFile.decryptFile(file, requiresPassword); if (!decryptedFile) throw new Error('File decryption failed.'); @@ -236,13 +236,13 @@ function setupFileInput(chooser) { } catch (error) { console.error(`Error decrypting file: ${file.name}`, error); - + // Check if this is a PDF corruption error if (error.message && error.message.includes('PDF file is corrupted')) { // The error banner is already shown by DecryptFiles.js, just continue with the file console.warn(`Continuing with corrupted PDF file: ${file.name}`); } - + if (!file.uniqueId) file.uniqueId = UUID.uuidv4(); return file; } diff --git a/stirling-pdf/src/main/resources/templates/fragments/navbar.html b/stirling-pdf/src/main/resources/templates/fragments/navbar.html index bf7d3707e..f6f707211 100644 --- a/stirling-pdf/src/main/resources/templates/fragments/navbar.html +++ b/stirling-pdf/src/main/resources/templates/fragments/navbar.html @@ -22,7 +22,7 @@ background: var(--md-nav-background); border-bottom-style: solid; border-bottom-width: 1px; - border-color: var(--md-nav-color-on-seperator)"> + border-color: var(--md-nav-color-on-separator)">