Signing workflow
Sign the required fields
Use Next in the signature bar to complete the signature and initials fields. Submit becomes available when every required field is signed.
Required fieldsComplete and submit
The viewer controls field navigation; the application handles the completed PDF.
2 FIELDS
1Sign in the viewer
Complete the signature and initials fields using the signature bar.
2Submit the PDF
This action unlocks after all required fields are complete.
Signing round trip
From the viewer to a certificate-backed PDF
1 · Browser
Sign hereTim Typer
Capture signatures
The signer completes the named signature and initials boxes in the viewer.
HTTP POST
SignatureData
2 · Server
CertificateX.509
Apply digital signatures
RedirectUrlAfterSignature receives the document. The endpoint uses the PFX certificate to sign its fields.
RESPONSE
Signed PDF
3 · Application
PDFDigitally signed
Receive the result
The submit callback receives the protected PDF and hands it back to the application for download or storage.
Electronic signatureThe visible signature or initials supplied by the signer.
Digital signatureThe certificate-backed protection that makes later document changes detectable.
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Complete an electronic signing workflow
The viewer guides a signer through required signature and initials fields. The application then posts the acquired signature data to its own ASP.NET Core endpoint, where the corresponding PDF fields are digitally signed with an X.509 certificate.
Signing members
Signing endpoint
SignatureSettings.RedirectUrlAfterSignature
Certificate-backed field
DigitalSignature
Receive the result
TXDocumentViewer.signatures.setSubmitCallback
Key members
The Razor configuration names the required fields and sends the completed SignatureData payload to an application-owned endpoint for certificate-backed processing.
settings.SignatureSettings = new SignatureSettings
{
RedirectUrlAfterSignature = $"{Model.Demo.Route}/submit",
SignatureBoxes =
[
new SignatureBox("txsign") { SigningRequired = true },
new SignatureBox("txsign_init") { SigningRequired = true }
]
};
How it works
1. Define the signing envelope
SignatureSettings identifies the signer and maps the logical signature boxes to named fields in the document. Setting SigningRequired keeps submission unavailable until the signer has completed those fields.
2. Post to the application endpoint
RedirectUrlAfterSignature is the server-side destination for the completed signing payload. After TXDocumentViewer.signatures.submit is called, the viewer sends an HTTP POST containing SignatureData to this URL. In this workflow it is a processing endpoint, not simply a link to another browser page.
3. Add cryptographic protection
The visible signature is electronic evidence of the signing action. The controller additionally loads an X.509 certificate from a PFX file and creates a DigitalSignature for each named field. This certificate-backed layer protects document integrity and enables compatible PDF readers to validate the signature.
using var certificate = X509CertificateLoader.LoadPkcs12(
certificateBytes,
password,
X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.Exportable);
var saveSettings = new SaveSettings
{
SignatureFields =
[
new DigitalSignature(certificate, null, "txsign"),
new DigitalSignature(certificate, null, "txsign_init")
]
};
4. Return the final PDF
The endpoint returns the digitally signed PDF. TXDocumentViewer.signatures.setSubmitCallback receives that response, allowing the application to download it, store it, or continue a larger business workflow.
Production note: The bundled certificate exists only for this technical demo. Production systems should use a trusted certificate, protect its private key in an appropriate secret or key store, and apply their own signer authentication and audit policy.
NuGet packages
Displays supported document and PDF formats in the browser.
dotnet add package TXTextControl.Web.DocumentViewer --version 34.2.0