Release v1.5.0
Release v1.5.0
Changelog
Added
- Guides and grid: Form options
show_grid(defaultfalse) andgrid_step(e.g.5in form unit). Whenshow_gridis 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(defaultfalse). Whentrue, 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(defaulttrue) mergessubmitted_at,ip,user_agentinto the model before dispatch.AuditMetadataclass with recommended keys (tsa_token,user_id, etc.). Config placeholderstsa_urlandsigning_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_enabledshows a “Sign all” button; your listener subscribes toBATCH_SIGN_REQUESTEDto perform the actual signing.
- Audit: Config
- Single inclusion of CSS and JS per request: When multiple
SignatureCoordinatesTypewidgets are rendered on the same page, the form theme includes the PDF viewer CSS (pdf-signable.css), PDF.js, andpdf-signable.jsonly once. A new Twig extension (NowoPdfSignableTwigExtension) exposesnowo_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:
NowoPdfSignableTwigExtensionTestcoversnowo_pdf_signable_include_assets()(true once per request, then false; no request → always true).BatchSignRequestedEventTestandPdfSignRequestEventTestadded;PdfSignableEventsTestextended withBATCH_SIGN_REQUESTEDandPDF_SIGN_REQUESTconstants. - 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.phpexcluded 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)