Render signed signatures and initials with a wrapped credibility treatment#663
Open
jmkritt wants to merge 1 commit into
Open
Render signed signatures and initials with a wrapped credibility treatment#663jmkritt wants to merge 1 commit into
jmkritt wants to merge 1 commit into
Conversation
…tment
Adds a "wrap" visual treatment to signed signature and initials fields
in the result PDF, the live signing UI, and the post-sign view, so
recipients see a consistent bracketed layout matching industry-standard
signed-document conventions (DocuSign / Adobe Sign etc.).
Motivation
----------
Built for a residential real-estate signing workflow where
clients and title companies are accustomed to the bracketed signature
visual format. The current DocuSeal output is a centered signature image
with optional plain-text caption beside or below it; signed initials are
a bare image with no caption. This change closes the visual gap as an
opt-in style — only renders when with_signature_id is enabled (existing
config flag, default false). Sharing in case useful upstream; happy to
iterate on the design or split into smaller commits.
Change
------
- HexaPDF rendering rewrite in lib/submissions/generate_result_attachments.rb:
- Left-side amber bracket via path drawing, height matched to image
- Centered signature image
- Helvetica-Bold header ("Digitally signed by:" / "Initials:")
- Optional caption (name + timestamp) and truncated document ID
- Adaptive layout: drops ID line, then caption line, before crushing
the image when field is small
- Page-derived font sizing so signatures and initials match
- Mirrored layout in the live signing UI (app/javascript/submission_form/area.vue)
and the post-sign view (app/views/submissions/_value.html.erb) so the
signer's review and the completed-submission page match the PDF
- Typed initials font alias in lib/submitters/generate_font_image.rb
switched from Go Noto Bold to Dancing Script — matches the typed
signature font, fixing the visual inconsistency where typed signatures
rendered cursive but typed initials rendered sans-serif
Trade-offs
----------
- Helvetica vs Go Noto for header/caption: Helvetica is one of the 14
standard PDF fonts, keeps the credibility text crisp. Non-Latin
scripts in the bracket text fall back to Helvetica's coverage.
The signature image itself still renders correctly using Go Noto.
- No data-model change. Pure rendering layer.
- Default behavior unchanged for existing users (with_signature_id
is still false by default in upstream).
Out of scope
------------
- Strikethrough field unhide (separate PR)
- Default-flag flips for with_signature_id, with_disclosure (opinionated)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The current rendering of signed signatures in the result PDF places the signature image with an optional plain-text "ID + Digitally signed by NAME + timestamp" caption beside or below it depending on field aspect ratio. Signed initials get no caption — just a bare image. There's no consistent visual framing.
Compared to industry-standard outputs (DocuSign, Adobe Sign), recipients of DocuSeal-signed PDFs see a plainer rendering that doesn't match the bracketed signature visual conventions they're accustomed to. In real-estate transactions specifically, where title companies, lenders, and counterparties have learned what a "properly signed contract" looks like through years of DocuSign exposure, the plainer style can read as less polished — even when the underlying validity is identical.
Motivation
Built for a residential real-estate signing workflow where clients and title companies are accustomed to the bracketed signature visual format. Sharing upstream in case it's useful — happy to iterate on the design, split into smaller commits, or close the PR if it doesn't fit DocuSeal's design preferences. No demonstrated upstream demand for this — just one user's contribution from real-world use.
Change
Adds a "wrap" credibility treatment for signed signature and initials fields:
generate_result_attachments.rb, height matched to the signature image, asymmetric bottom-stub flourish.Digitally signed by:for signatures,Initials:for initials.area.vue) and the post-sign view (_value.html.erb) so what the signer sees during review matches the generated PDF.generate_font_image.rb: switched from Go Noto Bold to Dancing Script. Matches the typed signature font (which is already Dancing Script), fixing the visual inconsistency where typed signatures rendered cursive but typed initials rendered sans-serif.Trade-offs and decisions
with_signature_idis enabled (existing config flag, defaultfalse). Existing users who haven't opted in see no change.Diff size
4 files, +210 −151 lines (most of it the HexaPDF drawing in the result-attachments generator).
Notes
Happy to provide screenshots if helpful — the visual is hard to convey from the diff alone.