Skip to content

Release v1.5.0

Choose a tag to compare

@github-actions github-actions released this 10 Feb 12:24
· 147 commits to master since this release

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)