Skip to content

Releases: nowo-tech/PdfSignableBundle

Release v2.0.4

02 Mar 11:14

Choose a tag to compare

Release v2.0.4

Changelog

Changed

  • PHP-CS-Fixer: Refined rules to align with PSR-12 and Symfony coding standards.
  • Docker: Root and demo Dockerfiles updated to PHP 8.2 Alpine; added dependencies for development and testing.
  • Demos: Symfony 7 and 8 demos now serve over HTTP by default (Caddyfile updated) to simplify local development; Makefiles enhanced with commands for restarting containers, building images, and running tests; added README files with quick start instructions for each demo.
  • CI: Simplified GitHub Actions workflow (ci.yml).

Developer

  • CHANGELOG, UPGRADING, and RELEASE checklist updated for 2.0.4.

For upgrade steps from 2.0.3, see UPGRADING.


Commits

  • Prepare v2.0.4 release (1fdabe7)
  • Update PHP-CS-Fixer configuration, Docker setup, and demo Makefiles (cc6bb53)

Release v2.0.3

17 Feb 12:01

Choose a tag to compare

Release v2.0.3

Changelog

Changed

  • Packagist: Removed repository from composer.json so composer validate --strict passes when publishing the package. No impact on installs; Packagist uses the repo URL from package registration.

For upgrade steps from 2.0.2, see UPGRADING.


Commits

  • Prepare v2.0.3 release (ecee6fc)
  • Prepare v2.0.2 release (f309900)
  • Remove repository section from composer.json to streamline configuration (0475493)
  • Adjust z-index in pdf-signable.scss for improved layout consistency (e551f6c)

Release v2.0.2

17 Feb 09:40

Choose a tag to compare

Release v2.0.2

Changelog

Added

  • Routes: Comment in Resources/config/routes.yaml with a copy-paste example for the app’s config/routes.yaml (resource + prefix), reducing friction on first install.
  • Proxy URL allowlist validation (dev): ProxyUrlAllowlistValidationPass runs at container compile when kernel.debug is true; validates regex patterns (entries starting with #) in proxy_url_allowlist and triggers E_USER_WARNING if a pattern is invalid. Does not run in production.
  • Tests: Broader coverage: ProxyUrlValidator (SSRF: empty host, private ranges 10.x/192.168.x/169.254.x, IPv6 link-local/loopback; allowlist: empty pattern skip, no-match returns false, invalid regex with/without logger). DependencyCheckListener cache (reuses request attribute, does not call checker again). NowoPdfSignableBundle::build() registers the compiler pass. CheckDependenciesCommand output with warnings when not strict. SignatureCoordinatesModel::fromArray skips non-array box items. Configuration acroform label_mode, font_sizes, font_families defaults and overrides. New ProxyUrlAllowlistValidationPassTest for the compiler pass.
  • Test groups: DependencyCheckerTest::testCheckWhenBundlePublicDirMissingAddsWarning and testCheckRequiredExtensionsInFailureMessageWhenMissing marked with @group integration so CI can exclude them with --exclude-group integration if needed.

Changed

  • (None.)

Fixed

  • ProxyUrlValidator (SSRF): When parse_url($url, PHP_URL_HOST) returns false (e.g. malformed URL like http:///path), the validator no longer passes it to strtolower(); invalid or missing host is now treated as blocked. IPv6 literal hosts in URLs (e.g. http://[::1]/ or http://[fe80::1]/) are normalized (brackets stripped) and link-local (fe80:) is blocked via an early string check so SSRF blocking works in all environments.

Documentation

  • Documentation: Added “Estado de las mejoras (seguimiento)” table tracking implementation of review suggestions (routes, allowlist validation, integration group).

For upgrade steps from 2.0.1, see UPGRADING.


Commits

  • Prepare v2.0.2 release (4739288)
  • Refactor code for consistency and readability (82a1ed0)
  • Refactor getWorkerUrl to return default bundle worker path (45d54ba)
  • Merge branch 'master' of github.com:nowo-tech/PdfSignableBundle (eee1146)
  • Refactor test for SignatureCoordinatesTypeExtension to handle non-array types (08bc696)
  • Apply PHP CS Fixer fixes [skip ci] (d6548cc)
  • Implement minimum coverage check in CI workflow and add new tests for JSON response handling (4454b7c)
  • Update tests for error handling and response codes (b5f5501)
  • Enhance AcroFormFieldEdit and update translations for field management (55c9469)
  • Merge branch 'master' of github.com:nowo-tech/PdfSignableBundle (6d1e724)
  • Update AcroForm documentation to clarify Python dependencies and backend requirements (2cb4174)
  • Update documentation for AcroForm backend extension and installation requirements (1e014c2)
  • Apply PHP CS Fixer fixes [skip ci] (1dc658c)

Release v2.0.1

16 Feb 15:52

Choose a tag to compare

Release v2.0.1

Changelog

Added

  • 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).

Changed

  • 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.
  • 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.

Fixed

  • Translations: Added missing AcroForm editor modal keys to 10 locales (ca, cs, de, fr, it, nl, pl, pt, ru, tr): acroform_editor.modal_create_if_missing, modal_field_name, modal_field_name_placeholder, modal_hidden, modal_max_len, modal_max_len_placeholder. Ensures make validate-translations passes.
  • Turkish (tr) YAML: Fixed invalid escape in single-quoted strings (PDF\'deki"PDF'deki alan adı") so the file parses correctly.

Documentation

  • USAGE: Default worker asset and MIME-type note for “Setting up fake worker” / “Failed to fetch dynamically imported module”.

For upgrade steps from 2.0.0, see UPGRADING.


Commits

  • Release version 2.0.1 with enhancements and fixes (df73ccc)
  • Enhance PDF.js worker URL handling and add new tests (5f4b145)
  • Merge branch 'master' of github.com:nowo-tech/PdfSignableBundle (e5c5616)
  • Refactor AcroForm editor and enhance PDF worker integration (4bbaf30)
  • Apply PHP CS Fixer fixes [skip ci] (81ee1fb)

Release v2.0.0

16 Feb 14:53

Choose a tag to compare

Release v2.0.0

Changelog

Breaking

  • Configuration structure: Signature config must be under the signature node (global box options + configs by alias). AcroForm config must be under a single acroform node (replacing acroform_editor and acroform_configs). Container parameters are renamed: nowo_pdf_signable.default_box_*, .configsnowo_pdf_signable.signature.*; nowo_pdf_signable.acroform_editor.*, nowo_pdf_signable.acroform_configsnowo_pdf_signable.acroform.*, nowo_pdf_signable.acroform.configs. See UPGRADING for migration steps and examples.

Added

  • Signature config under signature node: Global box defaults and named configs by alias (default alias default). Use form option config: 'alias' to apply. Container parameters: nowo_pdf_signable.signature.* and nowo_pdf_signable.signature.configs. See UPGRADING.
  • AcroForm config under single acroform node: Replaces acroform_editor and acroform_configs. Platform options, editor defaults, default_config_alias, and configs by alias. Container parameters: nowo_pdf_signable.acroform.* and nowo_pdf_signable.acroform.configs. See UPGRADING.
  • AcroForm editor translations: All UI strings in the AcroForm editor panel (demo templates) are now translatable. New translation keys under acroform_editor.* (domain nowo_pdf_signable): page title, config header, form errors intro, close aria, panel title, draft intro (with HTML), document key label/placeholder, fields label, fields from PDF, refresh button, draft label/placeholder/title, load/save/clear buttons. Translations added for all 12 locales (EN, ES, FR, DE, CA, IT, NL, PT, CS, PL, RU, TR). Demo templates acroform_editor.html.twig (Symfony 7 and 8) use |trans({}, 'nowo_pdf_signable') for every user-facing string.
  • AcroForm editor config (Type): New options under the acroform node to control the edit-field modal from the bundle config:
    • label_mode ('input' | 'choice'): label as free text or select with predefined options plus "Other".
    • label_choices (string[]): list of label options when label_mode is 'choice' (each entry: string or "value|Label").
    • label_other_text (string): text for the "Other" option in the label select (default 'Other').
    • show_field_rect (bool, default true): when false, the coordinates (rect) input is hidden in the edit-field modal.
    • font_sizes (int[]): allowed font sizes in pt; empty = number input (1–72); non-empty = select with these values.
    • font_families (string[]): allowed font families; empty = built-in list; non-empty = select with these options (each entry: string or "value|Label").
      See CONFIGURATION and ACROFORM.
  • Demo — AcroForm section: New dedicated "AcroForm" section in the demo nav and home index (Symfony 7 and 8) with six demos: AcroForm editor (default), AcroForm editor — Label as dropdown, AcroForm editor — Coordinates hidden, AcroForm editor — Custom font options, AcroForm editor — All options, AcroForm editor (min field size 24 pt).
  • AcroForm apply — font family in PDF: The edit-field modal allows editing font size and font family for text/textarea fields. These values are now sent in the patch payload when applying to the PDF; AcroFormFieldPatch includes fontFamily; the Python apply script (apply_acroform_patches.py) sets the default appearance (/DA) with both font size and family, mapping common names (Arial, Helvetica, Times New Roman, Courier New, sans-serif, serif, monospace) to standard PDF fonts. See ACROFORM_BACKEND_EXTENSION and ACROFORM.

Changed

  • (None.)

Fixed

  • (None.)

Documentation

  • Unified AcroForm docs: Single ACROFORM guide; ACROFORM_FLOWS for flow diagrams; ACROFORM_BACKEND_EXTENSION for backend. Removed redundant ACROFORM_EDITOR.md and ACROFORM_EDITOR_UX.md.
  • Documentation in English: README, ACROFORM, ACROFORM_FLOWS, and EVENTS frontend section translated to English; ROADMAP updated with AcroForm section and doc links.
  • Code comments in English: Spanish comments in assets/acroform-editor.ts, assets/pdf-signable.scss, and scripts/PoC/run_poc.py translated to English.

For upgrade steps from 1.5.x, see UPGRADING.


Commits

  • Update RELEASE.md for version 2.0.0 preparation (9663c1f)
  • Update dependencies and enhance Docker setup for improved development experience (c25fc21)

Release v1.5.3

12 Feb 23:17

Choose a tag to compare

Release v1.5.3

Changelog

Added

  • Extended debug logging: When nowo_pdf_signable.debug is true, the viewer script now logs more detail to the browser console to help detect template/override issues: DOM resolution (widget, boxes list, prototype, key elements), overlay updates (box item count, missing page/coordinate fields, missing overlay container per page), add box (empty prototype, missing root or page/coordinate inputs), remove box (index and remaining count; warning if clicked item is not a direct box-item), signature pads init (canvas count; warnings when box item or signature-data input is missing), and PDF DOM built (pages and overlay containers). See CONFIGURATION for the debug option.

Fixed

  • Box item fallback: The script finds box rows by [data-pdf-signable="box-item"] with fallback to .signature-box-item, so overridden themes that only use the class (e.g. .signature-box-item) without the attribute still work and overlays are drawn correctly. USAGE notes the fallback.

Developer

  • CHANGELOG, UPGRADING, and RELEASE checklist updated for 1.5.3.

For upgrade steps from 1.5.2, see UPGRADING.


Commits

  • Release version 1.5.3 with new features and improvements (0963d87)
  • Enhance pdf-signable functionality with improved error handling and logging (1e69010)

Release v1.5.2

12 Feb 23:02

Choose a tag to compare

Release v1.5.2

Changelog

Added

  • Workflow documentation: WORKFLOW.md with Mermaid diagrams for architecture, page load and init, load PDF, add signature box, drag/resize overlay, coordinate sync, and form submit. Linked from USAGE and README.
  • Data attributes for overrides: The viewer script finds elements by data-pdf-signable attributes (e.g. data-pdf-signable="widget", "page", "x") instead of CSS classes, so you can change or remove classes in overridden templates for styling without breaking the JS. Form types and theme add these attributes; USAGE documents the full table and override notes.
  • Recipe: .symfony/recipe config file is a complete example with all options commented and explained in English.

Changed

  • Override form theme: USAGE now explains that if the overridden form theme is not applied (form fields still from bundle), add the theme explicitly in config/packages/twig.yaml under form_themes so Twig uses your overridden template.

Fixed

  • Widget init: Script finds the widget by [data-pdf-signable="widget"] with fallback to .nowo-pdf-signable-widget, so overridden themes that do not add the attribute still work.
  • Page field on add box: When the page field is an input and the template override omits the expected class, the script now finds it by [data-pdf-signable="page"] or by input/select whose name ends with [page], so the page number is set correctly when clicking on the PDF.
  • Mermaid diagrams: WORKFLOW.md sequence diagram labels simplified (no commas or special characters in arrow text) so Mermaid parsers accept them.

Developer

  • CHANGELOG, UPGRADING, and RELEASE checklist updated for 1.5.2.

For upgrade steps from 1.5.1, see UPGRADING.


Commits

  • Release version 1.5.2 with new features and improvements (bccc25f)
  • Enhance PdfSignable bundle with data attributes for improved element targeting (2298a81)
  • Update NowoPdfSignable bundle configuration with additional options and improved comments (8c724ae)
  • Update documentation for template overriding in NowoPdfSignable bundle (7f71d73)
  • Enhance documentation with template overriding instructions (53296b5)

Release v1.5.1

11 Feb 17:31

Choose a tag to compare

Release v1.5.1

Changelog

Fixed

  • Named config merge order: When using a named config (e.g. config: 'fixed_url'), the named config now overrides the form type’s resolver defaults. Previously the merge order was reversed, so options like url_field: false, show_load_pdf_button: false, unit_field: false, and origin_field: false from the YAML config were overwritten by the defaults and had no effect. If you use a named config with these options set to false, they now apply correctly (URL row, Load PDF button, and unit/origin selectors are hidden).
  • Form theme visibility: The Twig form theme now evaluates url_field, show_load_pdf_button, unit_field, and origin_field so that when they are false (or the string 'false'), the corresponding UI is hidden. View options are passed as strict booleans from buildView for consistent behaviour.

Changed

  • Demo: The Symfony 7 and 8 demos’ Makefile forces vendor/nowo-tech/pdf-signable-bundle to be a symlink to the mounted repo (/var/pdf-signable-bundle) after composer install, so the container always uses the live bundle code. Path repository in the demos’ composer.json has "options": {"symlink": true}.

Developer

  • Tests: New test SignatureCoordinatesTypeTest::testNamedConfigWithHiddenFieldsOverridesDefaults ensures that a named config with url_field, show_load_pdf_button, unit_field, and origin_field set to false overrides resolver defaults in both form building and view options. Preset fixed_url added to the test form factory. TESTING updated (121 tests, coverage note for named config merge).

For upgrade steps from 1.5.0, see UPGRADING.


Commits

  • Update demo configurations and enhance README for HTTPS support (b15328c)

Release v1.5.0

10 Feb 12:24

Choose a tag to compare

Release v1.5.0

Changelog

Added

  • Guides and grid: Form options show_grid (default false) and grid_step (e.g. 5 in form unit). When show_grid is true, a grid overlay is drawn on each page in the viewer (canvas above PDF, below signature overlays) to help align boxes; coordinates are unchanged. See USAGE and STYLES (.pdf-grid-overlay).
  • Viewer lazy load: Form option viewer_lazy_load (default false). When true, PDF.js and the signable script are not loaded at page bottom; a small inline script uses IntersectionObserver and loads them when the widget enters the viewport. Useful for long pages with multiple widgets. See USAGE.
  • Advanced signing (structure and extension points): Bundle now provides structures and events for PKI/PAdES, timestamp, audit trail, and batch signing without adding third-party dependencies. Your app adds keys, TSA URL, and signing service. See SIGNING_ADVANCED.
    • Audit: Config audit.fill_from_request (default true) merges submitted_at, ip, user_agent into the model before dispatch. AuditMetadata class with recommended keys (tsa_token, user_id, etc.). Config placeholders tsa_url and signing_service_id (bundle does not call them; use in listeners).
    • Events: BATCH_SIGN_REQUESTED (when form is submitted with “Sign all”, batch_sign=1); PDF_SIGN_REQUEST (when your code requests a digital signature; listener can set response). See EVENTS.
    • Batch signing: Form option batch_sign_enabled shows a “Sign all” button; your listener subscribes to BATCH_SIGN_REQUESTED to perform the actual signing.
  • Single inclusion of CSS and JS per request: When multiple SignatureCoordinatesType widgets are rendered on the same page, the form theme includes the PDF viewer CSS (pdf-signable.css), PDF.js, and pdf-signable.js only once. A new Twig extension (NowoPdfSignableTwigExtension) exposes nowo_pdf_signable_include_assets() used by the theme. See USAGE and STYLES.
  • Demo: "Guides and grid" and "Viewer lazy load" demo pages (19 demos in total); sidebar and offcanvas highlight the current route; home index lists all demos including the new two.

Changed

  • Larger resize and rotate handles: Corner resize handles on signature box overlays are now 12×12 px (was 8×8 px); the rotation handle is 16×16 px (was 12×12 px) for easier grabbing. See STYLES.

Fixed

  • Rotated signature boxes: Drag constraints now use the axis-aligned bounding box of the rotated rectangle, so boxes can be moved flush to all page edges (left, right, top, bottom) at any rotation angle (e.g. -90°, 45°). Previously, rotated boxes could not be placed against the left (and sometimes top) edge.

Developer

  • Tests: NowoPdfSignableTwigExtensionTest covers nowo_pdf_signable_include_assets() (true once per request, then false; no request → always true). BatchSignRequestedEventTest and PdfSignRequestEventTest added; PdfSignableEventsTest extended with BATCH_SIGN_REQUESTED and PDF_SIGN_REQUEST constants.
  • Documentation: CONTRIBUTING documents form theme assets and the Twig function for overriders. TESTING updated with current coverage summary (120 tests) and exclusion of PdfSignableEvents.php.
  • Coverage: PdfSignableEvents.php excluded from coverage (constants only); phpunit.xml.dist and TESTING.md updated.

For upgrade steps from 1.4.x, see UPGRADING.


Commits

  • Update documentation and prepare for version 1.5.0 release (cb00e8a)
  • Enhance PdfSignable Bundle with new features and improvements (23c389a)
  • Update RELEASE.md to reflect changes for version 1.4.1, including the correct upgrading instructions and checklist adjustments. (90550ea)
  • Merge branch 'master' of github.com:nowo-tech/PdfSignableBundle (295f99c)
  • Apply PHP CS Fixer fixes [skip ci] (1130b99)

Release v1.4.1

09 Feb 20:32

Choose a tag to compare

Release v1.4.1

Changelog

Fixed

  • Translations: Added signing.consent_label and signing.consent_required to 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::testEnableSignatureCaptureAndDisclaimerPassedToView no longer submits the same form twice; uses a separate form instance for the null-consent assertion to avoid AlreadySubmittedException.

Commits

  • Update CHANGELOG, RELEASE, and UPGRADING documentation for version 1.4.1 (cb22c59)
  • Update translations for consent labels and requirements in multiple languages (e2cebf7)