Signature annotation
Capture and merge a signature
Choose the signature annotation tool, place a signature, then merge it into the document on the server.
Two-step workflowCommit a drawn signature
Place the annotation first, then merge its image into the source document.
SERVER
1Merge annotation
Export the annotation layer and embed every signature image.
2Download result
Download becomes available after the merged document is loaded.
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Merge signature annotations
Capture a signature as an annotation, merge it into the document on the server, and download the resulting PDF.
API used
TXDocumentViewer.annotations.export
Key members
A signature annotation can be exported, sent to the server, merged into the source document, and returned as a PDF.
const annotationData = TXDocumentViewer.annotations.export();
const response = await fetch(`${location.pathname}/merge`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: annotationData
});
const base64 = await response.text();
How it works
The Razor helper prepares the browser viewer and its document. Demo-specific JavaScript uses the public TXDocumentViewer API and remains encapsulated with this demo.
Source files
See the implementation
The view, browser behavior, assets, and controller are encapsulated in Demos/DocumentViewer/Annotations/SignatureAnnotations.