You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Document-Processing/PDF/PDF-Library/javascript/DigitalSignature.md
+63Lines changed: 63 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -521,6 +521,69 @@ ldocument.destroy();
521
521
{% endhighlight %}
522
522
{% endtabs %}
523
523
524
+
## Adding a timestamp in digital signature
525
+
526
+
This example shows how to apply a digital signature with a trusted timestamp, ensuring the signature remains valid even after the certificate expires. A timestamp callback contacts a Time Stamping Authority (TSA) to add an official time record to the signature. This provides long‑term proof of when the document was signed.
This example demonstrates how to create a visible signature field, apply a CMS (SHA-256) digital signature with signer information, customize the signature appearance using a base64-encoded image, and save the signed PDF document.
N> Use PdfRedactor.redact(callback) when you need to redact images along with other PDF content. In contrast, PdfRedactor.redactSync() is faster because it runs synchronously, but it cannot redact images—only text and other non‑image elements.
69
+
57
70
## Fill color on the redacted area
58
71
59
72
You can apply a solid fill color to cover the redacted content. This is the most common approach for redaction.
60
73
61
74
{% tabs %}
62
75
{% highlight typescript tabtitle="TypeScript" %}
63
76
import { PdfDocument } from '@syncfusion/ej2-pdf';
64
-
import { PdfRedactor, PdfRedactionRegion} from '@syncfusion/ej2-pdf-data-extract';
77
+
import { PdfRedactor, PdfRedactionRegion, ApplicationPlatform } from '@syncfusion/ej2-pdf-data-extract';
65
78
66
79
// Load an existing PDF document
67
80
let document: PdfDocument = new PdfDocument(data);
0 commit comments