Skip to content

Commit 091507c

Browse files
1015083: Updated the Review Changes for Digital Signature
1 parent 672aaca commit 091507c

9 files changed

Lines changed: 316 additions & 425 deletions

Document-Processing-toc.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,14 +1108,6 @@
11081108
<li><a href="/document-processing/pdf/pdf-viewer/react/forms/import-export-form-fields/import-export-events">Import/Export events</a></li>
11091109
</ul>
11101110
</li>
1111-
<li>Signature
1112-
<ul>
1113-
<li><a href="/document-processing/pdf/pdf-viewer/react/forms/signature/add-handwritten-or-electronic-signature">Add Handwritten or Electronic Signature</a></li>
1114-
<li><a href="/document-processing/pdf/pdf-viewer/react/forms/signature/add-digital-signature-react">Add Digital Signature</a></li>
1115-
<li><a href="/document-processing/pdf/pdf-viewer/react/forms/signature/customize-signature-appearance">Customize Signature Appearance</a></li>
1116-
<li><a href="/document-processing/pdf/pdf-viewer/react/forms/signature/validate-digital-signatures">Validate Digital Signature/a></li>
1117-
</ul>
1118-
</li>
11191111
<li><a href="/document-processing/pdf/pdf-viewer/react/forms/custom-data">Add custom data in form fields</a></li>
11201112
<li><a href="/document-processing/pdf/pdf-viewer/react/forms/group-form-fields">Grouping form fields</a></li>
11211113
<li><a href="/document-processing/pdf/pdf-viewer/react/forms/form-constrain">Form Field Flags</a></li>
@@ -1128,6 +1120,14 @@
11281120
<li><a href="/document-processing/pdf/pdf-viewer/react/forms/submit-form-data">Submit form data</a></li>
11291121
</ul>
11301122
</li>
1123+
<li>Digital Signature
1124+
<ul>
1125+
<li><a href="/document-processing/pdf/pdf-viewer/react/digital-signature/add-digital-signature-react">Add Digital Signature</a></li>
1126+
<li><a href="/document-processing/pdf/pdf-viewer/react/digital-signature/customize-signature-appearance">Customize Signature Appearance</a></li>
1127+
<li><a href="/document-processing/pdf/pdf-viewer/react/digital-signature/validate-digital-signatures">Validate Digital Signature</a></li>
1128+
<li><a href="/document-processing/pdf/pdf-viewer/react/digital-signature/signature-workflow">Signature Workflow</a></li>
1129+
</ul>
1130+
</li>
11311131
<li><a href="/document-processing/pdf/pdf-viewer/react/organize-pages/overview">Organize Pages</a>
11321132
<ul>
11331133
<li><a href="/document-processing/pdf/pdf-viewer/react/organize-pages/copy-pages">Copy pages</a></li>

Document-Processing/PDF/PDF-Viewer/react/forms/signature/add-digital-signature-react.md renamed to Document-Processing/PDF/PDF-Viewer/react/digital-signature/add-digital-signature-react.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ A **digital signature** provides:
2121
- **Non‑repudiation** – signer cannot deny signing.
2222

2323
Syncfusion supports a hybrid workflow:
24-
- Viewer → **[Design signature fields](../manage-form-fields/create-form-fields#signature-field)**, capture Draw/Type/Upload electronic signature.
24+
- Viewer → **[Design signature fields](../forms/manage-form-fields/create-form-fields#signature-field)**, capture Draw/Type/Upload electronic signature.
2525
- PDF Library → **[Apply PKCS#7/CMS digital signature](https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/digitalsignature)** using a certificate (PFX/P12).
2626

2727
## Add a Signature Field (How-to)
@@ -32,18 +32,22 @@ Syncfusion supports a hybrid workflow:
3232
3. Click on the document to place the field.
3333
4. Configure Name, Tooltip, Required, etc.
3434

35-
![Signature annotation toolbar](../../../javascript-es6/images/add_sign.png)
35+
![Signature annotation toolbar](../../javascript-es6/images/add_sign.png)
3636

3737
### Using the API
38-
```tsx
38+
{% tabs %}
39+
{% highlight js tabtitle="Standalone" %}
40+
{% raw %}
3941
viewerRef.current?.formDesignerModule.addFormField('SignatureField', {
4042
name: 'ApproverSignature',
4143
pageNumber: 1,
4244
bounds: { X: 72, Y: 640, Width: 220, Height: 48 },
4345
isRequired: true,
4446
tooltip: 'Sign here'
4547
});
46-
```
48+
{% endraw %}
49+
{% endhighlight %}
50+
{% endtabs %}
4751

4852
## Capture Electronic Signature (Draw / Type / Upload)
4953
Users click the field → dialog appears → they can **Draw**, **Type**, or **Upload** a handwritten signature.
@@ -82,6 +86,8 @@ const signedBytes = await document.save();
8286
document.destroy();
8387
```
8488

89+
N> See the PDF Library [Digital signature](https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/digitalsignature) to know more about Digital Signature in PDF Documents.
90+
8591
## Important Notes
8692
- **Do all form edits first. Sign last.** Any PDF modification *after signing* invalidates the signature.
8793
- Self‑signed PFX will show **Unknown / Untrusted** until added to Trusted Certificates.
@@ -90,9 +96,9 @@ document.destroy();
9096
- Place signature fields via Viewer for accurate layout.
9197
- Apply PKI signature using PDF Library only.
9298
- Use CMS + SHA‑256 for compatibility.
93-
- Avoid flattening **after** signing.
99+
- Avoid flattening after signing.
94100

95101
## See Also
96-
- Add Handwritten or Electronic Signature
97-
- Validate Digital Signatures
98-
- Customize Signature Appearance
102+
- [Validate Digital Signatures](./validate-digital-signatures)
103+
- [Custom fonts for Signature fields](../../how-to/custom-font-signature-field)
104+
- [Signature workflows](./signature-workflow)
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
layout: post
3+
title: Customize Signature Appearance in React PDF Viewer | Syncfusion
4+
description: Learn how to customize visible PKI digital signature appearances using the Syncfusion PDF Library.
5+
platform: document-processing
6+
control: PdfViewer
7+
documentation: ug
8+
---
9+
10+
# Customize Signature Appearance
11+
12+
This page explains how to customize the visual appearance of PKI [digital signature](https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/digitalsignature) (visible signature appearance) produced with the Syncfusion PDF Library.
13+
14+
## Overview
15+
16+
When applying a PKI [digital signature](https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/digitalsignature) you can create a visible appearance that includes text, images (logo/seal), fonts, and layout. Appearance rendering is done by composing signature appearance graphics with the PDF Library and embedding that appearance into the signature field.
17+
18+
For implementation details and exact API usage, check the Syncfusion PDF Library references:
19+
20+
- .NET PDF Library — [Drawing text/image in the signature appearance]( https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-digitalsignature#drawing-textimage-in-the-signature-appearance)
21+
- JavaScript PDF Library — [Drawing text/image in the signature appearance](https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/digitalsignature#drawing-textimage-in-the-signature-appearance)
22+
23+
## What you can customize
24+
25+
- Text (signer name, signing reason, date, descriptive labels)
26+
- Fonts, sizes, and styles
27+
- Images (company logo, seal, signature image)
28+
- Layout and bounding box for the visible appearance
29+
- Visible vs invisible signatures
30+
31+
## Guidance
32+
33+
- Use the [PDF Library](https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/digitalsignature) APIs to draw strings and images into the signature appearance graphics; attach the resulting appearance to the signature field before finalizing the PKI signature.
34+
- Prefer embedding high‑quality logo/seal images and use readable fonts for accessibility.
35+
- Keep the appearance compact to avoid overlapping form content and to preserve signature validation data.
36+
- Test appearances across typical page sizes and DPI settings to ensure consistent rendering.
37+
38+
## Best Practices
39+
40+
- Use consistent branding for signature visuals.
41+
- Keep appearance elements minimal and readable.
42+
- Avoid including data that might change after signing (dates shown should reflect signing time provided by the TSA when used).
43+
- When producing legally binding signatures, ensure the PKI signing process and appearance comply with your legal/operational requirements.
44+
45+
## See Also
46+
47+
- [Add Digital Signature](./add-digital-signature-react)
48+
- [Validate Digital Signatures](./validate-digital-signatures)
49+
- [Custom fonts for Signature fields](../../how-to/custom-font-signature-field)
50+
- [Signature workflows](./signature-workflow)
Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
---
2+
layout: post
3+
title: Digital Signature Workflows in React PDF Viewer | Syncfusion
4+
description: Learn how to add signature fields and apply digital (PKI) signatures in the Syncfusion React PDF Viewer.
5+
platform: document-processing
6+
control: PdfViewer
7+
documentation: ug
8+
---
9+
10+
# Digital Signature Workflows
11+
12+
This guide shows how to design signature fields, collect handwritten/typed e‑signatures in the browser, and apply **digital certificate (PKI) signatures** to PDF forms using the Syncfusion React PDF Viewer and the JavaScript PDF Library. Digital signatures provide **authenticity** and **tamper detection**, making them suitable for legally binding scenarios.
13+
14+
## Overview
15+
16+
A **digital signature** is a cryptographic proof attached to a PDF that verifies the signer’s identity and flags any post‑sign changes. It differs from a simple electronic signature (handwritten image/typed name) by providing **tamper‑evidence** and compliance with standards like CMS/PKCS#7. The Syncfusion **JavaScript PDF Library** exposes APIs to create and validate digital signatures programmatically, while the **React PDF Viewer** lets you design signature fields and capture handwritten/typed signatures in the browser.
17+
18+
## Quick Start
19+
20+
Follow these steps to add a **visible digital signature** to an existing PDF and finalize it.
21+
22+
1. **Render the React PDF Viewer with form services**
23+
24+
{% tabs %}
25+
{% highlight js tabtitle="Standalone" %}
26+
{% raw %}
27+
import * as ReactDOM from 'react-dom/client';
28+
import * as React from 'react';
29+
import {
30+
PdfViewerComponent, Inject, Toolbar, Magnification, Navigation,
31+
LinkAnnotation, BookmarkView, ThumbnailView, Print, TextSelection, TextSearch,
32+
Annotation, FormFields, FormDesigner
33+
} from '@syncfusion/ej2-react-pdfviewer';
34+
35+
function App() {
36+
return (
37+
<div className='control-section'>
38+
<PdfViewerComponent
39+
id="container"
40+
documentPath="https://cdn.syncfusion.com/content/pdf/form-filling-document.pdf"
41+
resourceUrl="https://cdn.syncfusion.com/ej2/31.2.2/dist/ej2-pdfviewer-lib"
42+
style={{ height: '640px' }}>
43+
<Inject services={[Toolbar, Magnification, Navigation, Annotation, LinkAnnotation, BookmarkView, ThumbnailView, Print, TextSelection, TextSearch, FormFields, FormDesigner]} />
44+
</PdfViewerComponent>
45+
</div>
46+
);
47+
}
48+
49+
ReactDOM.createRoot(document.getElementById('sample')!).render(<App />);
50+
{% endraw %}
51+
{% endhighlight %}
52+
{% endtabs %}
53+
54+
The Viewer requires **FormFields** and **FormDesigner** services for form interaction and design, and `resourceUrl` for proper asset loading in modern setups.
55+
56+
2. **Place a signature field (UI or API)**
57+
- **UI:** Open **Form Designer** → choose **Signature Field** → click to place → configure properties like required, tooltip, and thickness.
58+
![Signature Field](../../javascript-es6/images/ui-signature-edit.png)
59+
- **API:** Use `addFormField('SignatureField', options)` to create a signature field programmatically.
60+
61+
{% tabs %}
62+
{% highlight js tabtitle="Standalone" %}
63+
{% raw %}
64+
const viewerRef = React.useRef<PdfViewerComponent>(null);
65+
66+
const onDocumentLoad = () => {
67+
viewerRef.current?.formDesignerModule.addFormField('SignatureField', {
68+
name: 'ApproverSignature',
69+
pageNumber: 1,
70+
bounds: { X: 72, Y: 640, Width: 220, Height: 48 },
71+
isRequired: true,
72+
tooltip: 'Sign here'
73+
});
74+
};
75+
{% endraw %}
76+
{% endhighlight %}
77+
{% endtabs %}
78+
79+
3. **Apply a PKI digital signature (JavaScript PDF Library)**
80+
81+
The library provides `PdfSignatureField` and `PdfSignature.create(...)` for PKI signing with algorithms such as **SHA‑256**.
82+
83+
```ts
84+
import {
85+
PdfDocument, PdfSignatureField, PdfSignature,
86+
CryptographicStandard, DigestAlgorithm
87+
} from '@syncfusion/ej2-pdf';
88+
89+
// Load existing PDF bytes (base64/ArrayBuffer)
90+
const document = new PdfDocument(data);
91+
const page = document.getPage(0);
92+
93+
// Create a visible signature field if needed
94+
const field = new PdfSignatureField(page, 'ApproverSignature', {
95+
x: 72, y: 640, width: 220, height: 48
96+
});
97+
98+
// Create a CMS signature using a PFX (certificate + private key)
99+
const signature = PdfSignature.create(
100+
{ cryptographicStandard: CryptographicStandard.cms, digestAlgorithm: DigestAlgorithm.sha256 },
101+
certData,
102+
password
103+
);
104+
105+
field.setSignature(signature);
106+
document.form.add(field);
107+
108+
const signedBytes = await document.save('signed.pdf');
109+
document.destroy();
110+
```
111+
112+
4. **Finalize by flattening**
113+
Set `PdfDocument.flatten = true` to make annotations and form fields permanent. (The Viewer UI itself does not flatten; use the PDF Library in your pipeline.)
114+
115+
```ts
116+
import { PdfDocument } from '@syncfusion/ej2-pdf';
117+
118+
const doc = new PdfDocument(signedBytes);
119+
doc.flatten = true; // flattens annotations and form fields
120+
const finalBytes = await doc.save('final.pdf');
121+
doc.destroy();
122+
```
123+
124+
N> For sequential or multi‑user flows and digital signature appearances, see these live demos: [eSigning PDF Form](https://document.syncfusion.com/demos/pdf-viewer/react/#/bootstrap5/pdfviewer/esigning-pdf-forms), [Invisible Signature](https://document.syncfusion.com/demos/pdf-viewer/react/#/bootstrap5/pdfviewer/invisible-digital-signature) and [Visible Signature](https://document.syncfusion.com/demos/pdf-viewer/react/#/bootstrap5/pdfviewer/visible-digital-signature) in the React Sample Browser.
125+
126+
## How‑to guides
127+
128+
### Add a signature field (UI)
129+
Use the Form Designer toolbar to place a **Signature Field** where signing is required. Configure indicator text, required state, and tooltip in the properties pane.
130+
131+
![Signature Field](../../javascript-es6/images/ui-signature.png)
132+
133+
### Add a signature field (API)
134+
135+
Adds a signature field programmatically at the given bounds.
136+
137+
{% tabs %}
138+
{% highlight js tabtitle="Standalone" %}
139+
{% raw %}
140+
viewerRef.current?.formDesignerModule.addFormField('SignatureField', {
141+
name: 'CustomerSign',
142+
pageNumber: 1,
143+
bounds: { X: 56, Y: 700, Width: 200, Height: 44 },
144+
isRequired: true
145+
});
146+
{% endraw %}
147+
{% endhighlight %}
148+
{% endtabs %}
149+
150+
### Capture handwritten/typed signature in the browser
151+
152+
When users click a signature field at runtime, the Viewer’s dialog lets them **draw**, **type**, or **upload** a handwritten signature image—no plugin required—making it ideal for quick approvals.
153+
154+
![Signature Image](../images/handwritten-sign.png)
155+
156+
N> For a ready‑to‑try flow that routes two users to sign their own fields and then finalize, open [eSigning PDF Form](https://document.syncfusion.com/demos/pdf-viewer/react/#/bootstrap5/pdfviewer/esigning-pdf-forms) in the sample browser.
157+
158+
### Apply a PKI digital signature
159+
160+
Use the **JavaScript PDF Library** to apply a cryptographic signature on a field, with or without a visible appearance. See the **Digital Signature** documentation for additional options (external signing callbacks, digest algorithms, etc.).
161+
162+
N> To preview visual differences, check the [Invisible Signature](https://document.syncfusion.com/demos/pdf-viewer/react/#/bootstrap5/pdfviewer/invisible-digital-signature) and [Visible Signature](https://document.syncfusion.com/demos/pdf-viewer/react/#/bootstrap5/pdfviewer/visible-digital-signature) in our Sample Browser. Digital Signature samples in the React sample browser.
163+
164+
### Finalize a signed document (flatten/lock)
165+
166+
After collecting all signatures and passing validations, **flatten** the PDF (and optionally restrict permissions) to prevent further edits. Use `PdfDocument.flatten` when saving the file.
167+
168+
## Signature Workflow Best Practices (Explanation)
169+
170+
Designing a well‑structured signature workflow ensures clarity, security, and efficiency when working with PDF documents. Signature workflows typically involve multiple participants—reviewers and approvers each interacting with the document at different stages.
171+
172+
### Why structured signature workflows matter
173+
174+
A clear signature workflow prevents improper edits, guarantees document authenticity, and reduces bottlenecks during review cycles. When multiple stakeholders sign or comment on a document, maintaining order is crucial for compliance, traceability, and preventing accidental overwrites.
175+
176+
### Choosing the appropriate signature type
177+
178+
Different business scenarios require different signature types. Consider the purpose, regulatory requirements, and level of trust demanded by the workflow.
179+
180+
- **Handwritten/typed (electronic) signature** – Best for informal approvals, acknowledgments, and internal flows. (Captured via the Viewer’s signature dialog.)
181+
182+
![Handwritten Signature](../images/handwritten-sign.png)
183+
184+
- **Digital certificate signature (PKI)** – Required for legally binding contracts and tamper detection with a verifiable signer identity. (Created with the JavaScript PDF Library.)
185+
186+
N> You can explore and try out live demos for [Invisible Signature](https://document.syncfusion.com/demos/pdf-viewer/react/#/bootstrap5/pdfviewer/invisible-digital-signature) and [Visible Signature](https://document.syncfusion.com/demos/pdf-viewer/react/#/bootstrap5/pdfviewer/visible-digital-signature) in our Sample Browser.
187+
188+
### Pre‑signing validation checklist
189+
190+
To prevent rework, validate the PDF before enabling signatures:
191+
- Confirm all **required form fields** are completed (names, dates, totals). (See [Form Validation](../forms/form-validation).)
192+
- Re‑validate key values (financial totals, tax calculations, contract amounts).
193+
- Lock or restrict editing during review to prevent unauthorized changes.
194+
- Use [annotations](../annotation/overview) and [comments](../annotation/comments) for clarifications before signing.
195+
196+
### Role‑based authorization flow
197+
198+
- **Reviewer** – Reviews the document and adds [comments/markups](../annotation/comments). Avoid placing signatures until issues are resolved.
199+
![Reviewer using highlights and comments](../images/highlight-comments.png)
200+
- **Approver** – Ensures feedback is addressed and signs when finalized.
201+
![Signature Image](../images/handwritten-sign.png)
202+
- **Final Approver** – Verifies requirements, then [flattens](../document-handling/preprocess-pdf#flatten-form-fields--annotations) or [Lock Signature](https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/digitalsignature#lock-signature) to make signatures permanent and may restrict further edits.
203+
204+
N> **Implementation tip:** Use the PDF Library’s `flatten` when saving to make annotations and form fields permanent after the last signature.
205+
206+
### Multi‑signer patterns and iterative approvals
207+
- Route the document through a defined **sequence of signers**.
208+
- Use [comments and replies](../annotation/comments#add-comments-and-replies) for feedback without altering document content.
209+
- For external participants, share only annotation data (XFDF/JSON) when appropriate instead of the full PDF.
210+
- After all signatures, **flatten** to lock the file.
211+
212+
N> Refer to [eSigning PDF Forms](https://document.syncfusion.com/demos/pdf-viewer/react/#/bootstrap5/pdfviewer/esigning-pdf-forms) sample that shows two signers filling only their designated fields and finalizing the document.
213+
214+
### Security, deployment, and audit considerations
215+
216+
- **Restrict access:** Enforce authentication and role‑based permissions.
217+
- **Secure endpoints:** Protect PDF endpoints with token‑based access and authorization checks.
218+
- **Audit and traceability:** Log signature placements, edits, and finalization events for compliance and audits.
219+
- **Data protection:** Avoid storing sensitive PDFs on client devices; prefer secure server storage and transmission.
220+
- **Finalize:** After collecting all signatures, flatten or lock to prevent edits.
221+
222+
## See also
223+
- [Create and Modify Annotation](../annotation/create-modify-annotation)
224+
- [Customize Annotation](../annotation/customize-annotation)
225+
- [Digital Signature - JavaScript PDF Library](https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/digitalsignature)
226+
- [Handwritten Signature](../annotation/signature-annotation)
227+
- [Form Fields API](../form-fields-api)
228+
- [Add Digital Signature](./add-digital-signature-react)
229+
- [Customize Signature Appearance](./customize-signature-appearance)
230+
- [Signature workflows](./signature-workflow)

0 commit comments

Comments
 (0)