You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added tests for PDF.js loader, improving coverage for worker URL handling and fallback mechanisms.
- Changed default PDF.js worker asset to `pdf.worker.min.js` for correct MIME type handling.
- Updated worker URL resolution to support absolute paths and fallback for lazy-loaded scripts.
- Fixed missing AcroForm editor modal keys in 10 locales and corrected Turkish YAML parsing issues.
- Updated documentation to reflect changes in worker handling and upgrade steps from 2.0.0.
Copy file name to clipboardExpand all lines: docs/CHANGELOG.md
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
21
21
22
22
---
23
23
24
+
## [2.0.1] - 2026-02-16
25
+
26
+
### Added
27
+
28
+
-**Tests:** More coverage for PDF.js loader (`getWorkerUrl` absolute URL conversion, protocol-relative and empty-string handling, `querySelector` fallback when `currentScript` is null; `getPdfJsLib` CDN path). PHP test for default `pdfjs_worker_url` null in `SignatureCoordinatesType`. Extra `url-and-scale` tests (empty proxy, `getScaleForFitPage` with null container).
29
+
30
+
### Changed
31
+
32
+
-**PDF.js worker:** Default worker asset is now **`pdf.worker.min.js`** (was `pdf.worker.min.mjs`) so typical servers serve it with `Content-Type: application/javascript`, avoiding “Failed to fetch dynamically imported module” and “Setting up fake worker” in development. Theme and loader default to `bundles/nowopdfsignable/js/pdf.worker.min.js`. Vite build copies the worker from `node_modules/pdfjs-dist/build` to the output dir; `copy-worker` script and `postinstall` still output the same file for installs without a full build.
33
+
-**Worker URL resolution:** Relative worker URLs are converted to absolute (using `window.location.origin`) so the worker loads correctly in SPAs and when the script is served from a different base. Fallback: when `document.currentScript` has no `src` (e.g. lazy-loaded script), the loader looks for a script tag with `src` containing `pdf-signable.js` or `acroform-editor.js` and derives the worker path from it.
Copy file name to clipboardExpand all lines: docs/UPGRADING.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,6 +142,23 @@ For the full list of options in the new structure, see [CONFIGURATION.md](CONFIG
142
142
143
143
---
144
144
145
+
### Upgrading to 2.0.1 (2026-02-16)
146
+
147
+
**Release date:** 2026-02-16
148
+
149
+
**Patch release:** No breaking changes. Fixes translations (missing AcroForm modal keys in 10 locales, Turkish YAML), PDF.js worker loading (default worker is now `.js` for correct MIME type; absolute URL resolution and script fallback), and adds tests.
150
+
151
+
#### Upgrade steps (from 2.0.0)
152
+
153
+
1. Run `composer update nowo-tech/pdf-signable-bundle`.
154
+
2. Rebuild assets if you use the bundle’s JS so the default worker `pdf.worker.min.js` is emitted: `pnpm run build`in the bundle repo, or `php bin/console assets:install` in your app to copy updated public files.
155
+
3. Optional: run `make validate-translations` in the bundle repo.
156
+
4. Clear cache: `php bin/console cache:clear`.
157
+
158
+
If you override `pdfjs_worker_url`, you can point it to `bundles/nowopdfsignable/js/pdf.worker.min.js` or leave it null for the theme default. See [CHANGELOG.md](CHANGELOG.md) for the full list of changes.
159
+
160
+
---
161
+
145
162
### Upgrading to 1.5.4
146
163
147
164
**Release date**: 2026-02-11
@@ -412,7 +429,7 @@ Always read [CHANGELOG.md](CHANGELOG.md) for the target version before upgrading
412
429
413
430
| Bundle version | Symfony | PHP | Notes |
414
431
|----------------|-------------|-------|-------|
415
-
| 2.0.x | 6.1+, 7.x, 8.x | 8.1+ | **Breaking:** Signature config under `signature` node (global + configs by alias). AcroForm config under single `acroform` node (was `acroform_editor` + `acroform_configs`). See upgrade steps above. |
0 commit comments