Releases: nowo-tech/PdfSignableBundle
Releases · nowo-tech/PdfSignableBundle
Release v1.4.1
Release v1.4.1
Changelog
Fixed
- Translations: Added
signing.consent_labelandsigning.consent_requiredto all locales (CA, CS, DE, FR, IT, NL, PL, PT, RU, TR). Fixed YAML escaping in Catalan, French and Italian (single quotes in single-quoted strings). - Tests:
SignatureCoordinatesTypeTest::testEnableSignatureCaptureAndDisclaimerPassedToViewno longer submits the same form twice; uses a separate form instance for the null-consent assertion to avoidAlreadySubmittedException.
Commits
Release v1.4.0
Release v1.4.0
Changelog
Added
- Signing in boxes: Draw or upload a signature image per box. Options
enable_signature_capture(draw pad) andenable_signature_upload(file input); image stored inSignatureBoxModel::signatureDataand shown in the PDF overlay. See USAGE. - Legal disclaimer:
signing_legal_disclaimerandsigning_legal_disclaimer_urlform options to show a notice above the viewer (e.g. “simple signature, not qualified”). See USAGE. - Consent checkbox:
signing_require_consent(defaultfalse) andsigning_consent_label. Whentrue, a required checkbox is shown; value inSignatureCoordinatesModel::getSigningConsent(). Translations:signing.consent_label,signing.consent_required(EN, ES). - Timestamp per box:
SignatureBoxModel::getSignedAt()/setSignedAt()(ISO 8601). Set by the frontend when the user draws or uploads; backend can overwrite with server time for stronger evidence. Exported intoArray()/fromArray()assigned_at. - Audit metadata:
SignatureCoordinatesModel::getAuditMetadata()/setAuditMetadata()(e.g.signed_at,ip,user_agent) for evidence; included intoArray(). See USAGE. - Signing-only mode (
signing_only): Whentrue, each box row shows only the box name (read-only) and the signature capture (draw/upload); coordinate fields and unit/origin are hidden (values still submitted). Use for predefined boxes where the user only signs. See USAGE. - Signature pad improvements: Canvas resized to display size with
devicePixelRatiofor sharp rendering; smooth strokes viaquadraticCurveTo; pressure-sensitive line width (1–6 px) on touch (Touch.force) and mouse (MouseEvent.pressure) when supported. Signature capture row uses full form width. - Demo: “Signing options (AutoFirma, legal)” info page with links to AutoFirma, bundle roadmap (eIDAS/qualified), and USAGE; all demo texts in English.
- Demo layout: Burger menu replaced by a sidebar (aside) with all demo links (By configuration, Define areas, Signing, Bundle route); on small screens a “Demos” button opens an offcanvas with the same nav.
Changed
- Demo: All demo UI copy is in English. Sidebar and offcanvas list all demo pages; predefined sign-only demo uses
signing_only: true(name + signature only, no coordinate fields).
Fixed
- TypeScript:
MouseEvent.pressureaccess fixed for strict DOM types (cast toMouseEvent & { pressure?: number }).
Developer
- Tests:
SignatureCoordinatesTypeTestassertssigning_onlydefault and when true; consent checkbox submit uses'1'/null.SignatureBoxModelTestandSignatureCoordinatesModelTestcoversignedAt,signingConsent,auditMetadataand toArray/fromArray.
For upgrade steps from 1.3.x, see UPGRADING.
Commits
- Merge branch 'master' of github.com:nowo-tech/PdfSignableBundle (e68d4c4)
- Update repository links and enhance demo navigation (4a4e2f3)
- Refactor PdfSignableExtension to extend Symfony's DependencyInjection\Extension (97cf98c)
- Apply PHP CS Fixer fixes [skip ci] (282b039)
- Update RELEASE.md for version 1.3.0 readiness (e6da49b)
Release v1.3.0
Release v1.3.0
Changelog
Added
- PDF viewer zoom: Toolbar with zoom out (−), zoom in (+) and fit width (translated). PDF loads by default at fit-to-width; zoom range 0.5×–3×. Toolbar appears in the top-right of the viewer when a PDF is loaded. See USAGE.
- Debug option (
nowo_pdf_signable.debug): Whentrue, the frontend emitsconsole.log/console.warnin the browser (e.g. PDF load, add/remove box). Defaultfalse. See CONFIGURATION. - Translations: Zoom toolbar labels (
js.zoom_in,js.zoom_out,js.zoom_fit) in all supported languages (EN, ES, FR, DE, IT, PT, TR, CA, CS, NL, PL, RU).
Changed
- Viewer: Initial PDF scale is always fit-to-width (unchanged behaviour; ResizeObserver also uses fit-to-width on resize).
Fixed
- (None in this release.)
Developer
- Tests:
ConfigurationTestnow coversdebugdefault and override.
For upgrade steps from 1.2.x, see UPGRADING.
Commits
- Update documentation and release notes for version 1.3.0 (d481484)
- Enhance PDF signature bundle with zoom functionality and improved rendering (e30cc6f)
- Add debug logging option to PDF signature bundle (2b82699)
- Enhance PDF signature bundle with thumbnail navigation and accessibility improvements (f05065d)
- Implement snap-to-grid and touch support features in PDF signature bundle (be40192)
- Enhance PDF signature functionality with loading overlay and keyboard shortcuts (aed8545)
Release v1.2.0
Release v1.2.0
Changelog
Added
- Optional rotation (
enable_rotation): form option (defaultfalse). Whentrue, each box has an angle field (degrees) and the viewer shows a rotate handle above each overlay; whenfalse, the angle field is not rendered and boxes are not rotatable. See USAGE. - Default values per box name (
box_defaults_by_name): form option to pre-fill width, height, x, y, angle when the user selects a name (dropdown or input). See USAGE and ROADMAP. - Demos: added rotation, defaults-by-name, and allow-overlap demo pages (16 demo pages in total for Symfony 7 and 8).
Fixed
- CI: translation validation step now runs after
composer installsovendor/autoload.phpexists (fixes failure in GitHub Actions).
For upgrade steps from 1.1.x, see UPGRADING.
Commits
- Fix CI workflow to ensure translation validation runs after composer install, preventing failures in GitHub Actions. (49151d7)
- Refactor CI workflow to validate translation YAML files (0ec3240)
- Merge branch 'master' of github.com:nowo-tech/PdfSignableBundle (3e428f2)
- Update documentation and enhance PDF signature bundle features (611d795)
- Apply PHP CS Fixer fixes [skip ci] (a7eb18e)
- Update README and enhance tests for PdfSignable Bundle (42c46a6)
- Enhance PDF signature bundle with new features and updates (31c8971)
Release v1.1.0
Release v1.1.0
Changelog
Added
- Page restriction (
allowed_pages): form option to limit which pages boxes can be placed on; page field becomes a dropdown. See USAGE. - Proxy URL allowlist (
proxy_url_allowlist): bundle config to restrict which URLs the proxy can fetch (substring or regex). See CONFIGURATION and SECURITY. - Box order (
sort_boxes): form option to sort boxes by page, then Y, then X on submit. - Non-overlapping boxes (
prevent_box_overlap): default is nowtrue; validation on submit and frontend enforcement (drag/resize that would overlap is reverted and a translated message is shown). Set tofalseto allow overlapping boxes. - Translations: added CA, CS, NL, PL, RU (12 languages total: EN, ES, FR, DE, IT, PT, TR, CA, CS, NL, PL, RU).
- Translation validation:
scripts/validate-translations-yaml.phpnow checks that all translation files have the same keys as the reference (English) file;composer validate-translationsruns it. - Demos: added page restriction, sorted boxes, and no-overlap demos (12 demo pages in total for Symfony 7 and 8).
Changed
- SECURITY: Proxy no longer leaks exception messages to the client on 502/errors; SSRF mitigation blocks private/local URLs before fetch. Flash messages in demos use plain text (no
|raw). See SECURITY. prevent_box_overlapdefault changed fromfalsetotrue. If you relied on overlapping boxes being allowed by default, set'prevent_box_overlap' => falsewhen adding the form type. See UPGRADING.
Compatibility
- PHP 8.1+
- Symfony 6.1+, 7.x, 8.x.
Commits
Release v1.0.0
Release v1.0.0
Changelog
First stable release.
Added
- Form types
SignatureCoordinatesType: form field that renders a PDF viewer and lets users define signature boxes by click; submitsSignatureCoordinatesModel(pdfUrl, unit, origin, signatureBoxes).SignatureBoxType: child type for a single signature box; submitsSignatureBoxModel(name, page, x, y, width, height). Name as text or dropdown (name_mode: choice); first choice pre-selected when empty.
- Models
SignatureCoordinatesModel: pdfUrl, unit (mm, cm, pt, px, in), origin (corners), signatureBoxes collection.SignatureBoxModel: name, page, x, y, width, height.
- PDF viewer
- Browser-based viewer using PDF.js with overlays for each signature box. Click on the PDF to add a box; drag to move; drag corners to resize.
- Overlay color by box name (deterministic); disambiguator label when same name on multiple boxes (e.g.
signer_1 (1),signer_1 (2)). - ResizeObserver loop fix:
scrollbar-gutter: stableandisReRenderingflag to prevent layout oscillation.
- Configuration
nowo_pdf_signable:proxy_enabledfor external PDFs (avoids CORS),example_pdf_urlfor form preload, optionalconfigs(named presets).
- Named configurations
- Define preset options in
nowo_pdf_signable.configsand reference with form optionconfig: 'name'. See CONFIGURATION.md and USAGE.md.
- Define preset options in
- Optional proxy
- Route and controller to proxy external PDFs (
/pdf-signable/proxy). Events:PdfProxyRequestEvent,PdfProxyResponseEvent. See EVENTS.md.
- Route and controller to proxy external PDFs (
- Form theme
- Twig form theme for the signature coordinates widget (full widget: PDF + boxes). Reusable
SignatureBoxTypelayout.
- Twig form theme for the signature coordinates widget (full widget: PDF + boxes). Reusable
- Frontend assets
- Vite + TypeScript entry (
assets/pdf-signable.ts). Built file atResources/public/js/pdf-signable.js. Form submits as normal POST; JS re-indexes collection before submit.
- Vite + TypeScript entry (
- Validation
- Required box name (
NotBlankonSignatureBoxType).unique_box_names:true(all unique),false(no check), or array (e.g.['signer_1', 'witness']) for per-name uniqueness. See USAGE.md.
- Required box name (
- Events
SignatureCoordinatesSubmittedEvent(after valid form submit),PdfProxyRequestEvent(before proxy fetch),PdfProxyResponseEvent(after proxy fetch). See EVENTS.md.
- Translation
- EN, ES, FR, DE, IT, PT (e.g.
signature_box_type.name.required,signature_boxes.unique_names_message,js.alert_submit_error). Scriptscripts/validate-translations-yaml.phpfor CI.
- EN, ES, FR, DE, IT, PT (e.g.
- Demos
- Dockerized demos for Symfony 7 and 8 (Bootstrap, Vite, TypeScript). Nine demo pages: no config, default, fixed_url, overridden, URL as dropdown, limited boxes, same signer multiple, unique per name, predefined boxes. Home and burger menu list all; each page shows configuration in bullets. Flash message with coordinates in bullets (name first).
- Documentation
- README, INSTALLATION.md, CONFIGURATION.md, USAGE.md, EVENTS.md, UPGRADING.md, ROADMAP.md, CONTRIBUTING.md, SECURITY.md (all in
docs/, English). “Same signer, multiple locations” and backend grouping example in USAGE.
- README, INSTALLATION.md, CONFIGURATION.md, USAGE.md, EVENTS.md, UPGRADING.md, ROADMAP.md, CONTRIBUTING.md, SECURITY.md (all in
Changed
- NotBlank: Uses named argument
message:(array form no longer supported in recent Symfony Validator). - Makefile:
make install,make assets,make validate-translationsrun via Docker for consistency.
Compatibility
- PHP 8.1+
- Symfony 6.1+, 7.x, 8.x.