# Document Viewer Examples

> Online demos and GitHub samples of the Document Viewer: loading documents, annotations, form fields, electronic signatures, PDF.js, Blazor, Angular and React.

- **Product:** TX Text Control .NET Server
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET Server > Examples > Document Viewer Examples
- **2496 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/examples/document-viewer/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/examples/document-viewer/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/examples/document-viewer/llms-full.txt

---

Displaying documents, collecting form data and electronic signatures, adding annotations: each task of the Document Viewer has an online demo that shows its code. The sample projects on GitHub combine the viewer with an ASP.NET Core backend in complete workflows, such as forms that users fill out and sign. Most of them were written for version 33.0 or earlier; the version is named with each sample, and [GitHub Examples](https://docs.textcontrol.com/tx-text-control-dotnet-server/examples/github/#update-an-older-sample) describes how to update one.

### Online Demos

All demos run on the current version and show their view, controller and JavaScript on the **Code** tab:

| Example | What it shows | Where |
|---|---|---|
| Concept | The Document Viewer in an ASP.NET Core view | [Concept](https://demos.textcontrol.com/demos/document-viewer/concept) |
| Loading from a file | A document loaded from a file on the server | [From File](https://demos.textcontrol.com/demos/document-viewer/loading/from-file) |
| Loading from data | A document passed as base64-encoded data from the memory of the server | [From Data](https://demos.textcontrol.com/demos/document-viewer/loading/from-data) |
| Loading from JavaScript | A document loaded with the JavaScript API | [From JavaScript](https://demos.textcontrol.com/demos/document-viewer/loading/from-javascript) |
| Electronic signatures | A complete signing process: the user signs the signature and initials boxes, and the server receives the signed document | [Electronic Signatures](https://demos.textcontrol.com/demos/document-viewer/e-sign/electronic-signatures) |
| Raw signature data | The strokes of a signature captured, inspected and replayed | [Raw Signature Data](https://demos.textcontrol.com/demos/document-viewer/e-sign/raw-signature-data) |
| PDF.js | PDF documents rendered in the browser with a locally hosted PDF.js | [PDF.js Renderer](https://demos.textcontrol.com/demos/document-viewer/pdf/pdfjs-renderer) |
| Uploading PDF documents | A local PDF file opened in the viewer with PDF.js | [Uploading PDFs](https://demos.textcontrol.com/demos/document-viewer/pdf/uploading-pdfs) |
| Flattened PDF forms | Completed form fields of a PDF flattened into a download | [Saving Form Fields](https://demos.textcontrol.com/demos/document-viewer/pdf/saving-form-fields) |
| Form values | Form field values exported as JSON or PDF | [Export Form Values](https://demos.textcontrol.com/demos/document-viewer/form-fields/export-values) |
| Saved form documents | A form saved with its values and loaded again | [Saving Form Fields](https://demos.textcontrol.com/demos/document-viewer/form-fields/saving) |
| Conditional instructions | Form fields that validate and depend on each other | [Conditional Instructions](https://demos.textcontrol.com/demos/document-viewer/form-fields/conditional-instructions) |
| Annotations | Highlights, comments, ink, text and stamps, and their JSON layer loaded and saved | [Annotation Types](https://demos.textcontrol.com/demos/document-viewer/annotations/annotation-types), [Loading and Saving](https://demos.textcontrol.com/demos/document-viewer/annotations/loading-saving) |
| Signature annotations | A signature annotation merged into the document on the server | [Signature Annotations](https://demos.textcontrol.com/demos/document-viewer/annotations/signature-annotations) |
| Custom stamps | Stamps of your own as annotations | [Custom Stamps](https://demos.textcontrol.com/demos/document-viewer/annotations/custom-stamps) |
| Word comments | Comments of a Word document shown as annotations | [Importing Comments](https://demos.textcontrol.com/demos/document-viewer/annotations/importing-comments) |
| Tracked changes | Reviewing, navigating and exporting tracked changes | [Review Tracked Changes](https://demos.textcontrol.com/demos/document-viewer/advanced/track-changes) |
| Events | Events of annotations and signatures | [Event Handling](https://demos.textcontrol.com/demos/document-viewer/advanced/events) |
| User interface | Thumbnails, toolbar and full screen | [Visual Elements](https://demos.textcontrol.com/demos/document-viewer/advanced/visual-elements) |
| Search and navigation | Finding text and scrolling to a page | [Find Text](https://demos.textcontrol.com/demos/document-viewer/advanced/find-text), [Scroll to Page](https://demos.textcontrol.com/demos/document-viewer/advanced/scroll-to-page) |

### ASP.NET Core Samples

| Example | What it shows | Where |
|---|---|---|
| Custom signing | A signature request handled by a controller of your application instead of JavaScript, as described in [Handling Signature Requests in ASP.NET Core](https://www.textcontrol.com/blog/2022/02/04/handling-signature-requests-in-aspnet-core/). Version 33.0 | [TextControl.Web.MVC.CustomSigning](https://github.com/TextControl/TextControl.Web.MVC.CustomSigning) |
| Signature hashes | A hash of the raw signature data stored as evidence and checked later, as described in [E-Sign: Validating Signature Hashes Generated from Vector Data in ASP.NET Core C#](https://www.textcontrol.com/blog/2023/10/30/esign-validating-signature-hashes-generated-from-vector-data-in-aspnet-core-csharp/). Version 33.0 | [TXTextControl.MVC.Core.Viewer.SignatureHash](https://github.com/TextControl/TXTextControl.MVC.Core.Viewer.SignatureHash) |
| Healthcare forms | A digital forms workflow with electronic signatures, as described in [Healthcare Use Case: Digital Forms Workflow with Electronic Signatures](https://www.textcontrol.com/blog/2023/03/15/healthcare-use-case-digital-forms-workflow-with-electronic-signatures/). Version 33.0 | [TX.TextControl.Web.MVC.Core.SignWorkflow](https://github.com/TextControl/TX.TextControl.Web.MVC.Core.SignWorkflow) |
| Financial forms | Prefilled forms that users complete and sign, as described in [Transforming Financial Documents into Smart and Secure Forms in ASP.NET Core C#](https://www.textcontrol.com/blog/2024/05/01/transforming-financial-documents-into-smart-and-secure-forms-in-asp-net-core-c-sharp/). Version 33.0 | [TXTextControl.Web.MVC.Financial](https://github.com/TextControl/TXTextControl.Web.MVC.Financial) |
| Insurance claims | Claim forms created, deployed, filled out, signed and processed, as described in [Use Case: Create, Deploy and Process Insurance Claim Forms](https://www.textcontrol.com/blog/2023/06/09/use-case-create-deploy-and-process-insurance-claim-forms/). Version 33.0 | [TextControl.Web.MVC.InsuranceClaim](https://github.com/TextControl/TextControl.Web.MVC.InsuranceClaim) |
| Shared annotations | Annotations shared live between users with SignalR, as described in [DocumentViewer Collaboration: Live Share Document Annotations](https://www.textcontrol.com/blog/2021/06/08/documentviewer-collaboration-live-share-document-annotations/). Version 33.0 | [TextControl.Web.MVC.DocumentViewer.Collaboration](https://github.com/TextControl/TextControl.Web.MVC.DocumentViewer.Collaboration) |

The sample that shows the Document Editor and the Document Viewer in one view is listed in [Document Editor Examples](https://docs.textcontrol.com/tx-text-control-dotnet-server/examples/document-editor/#asp-net-core-samples), and the samples that sign documents with a certificate after users signed them in the viewer are in [Digital Signature Examples](https://docs.textcontrol.com/tx-text-control-dotnet-server/examples/digital-signatures/llms-full.txt).

### Blazor and Angular Samples

| Example | What it shows | Where |
|---|---|---|
| Blazor: signing with the viewer component | Electronic signatures with the `DocumentViewer` component of `TXTextControl.Web.Blazor.DocumentViewer`, signed with a certificate on the server, as described in [E-Sign Comes to Blazor: Document Viewer 33.0.1 Released](https://www.textcontrol.com/blog/2025/04/24/e-sign-comes-to-blazor-document-viewer-33-0-1-released/). Version 33.0 | [TXTextControl.Blazor.Esign](https://github.com/TextControl/TXTextControl.Blazor.Esign) |
| Blazor Web App: signature workflow | The viewer in a Blazor Web App on .NET 8 that loads a document with `SignatureSettings`, receives the signed document in a controller and signs its signature field with a PFX certificate as PDF, as described in [Handling Electronic Signatures in a Blazor Web App using .NET 8](https://www.textcontrol.com/blog/2024/02/06/handling-electronic-signatures-in-a-blazor-web-app-using-net-8/). Version 32.0 | [TXTextControl.Server.Blazor.Viewer.Signature](https://github.com/TextControl/TXTextControl.Server.Blazor.Viewer.Signature) |
| Blazor Server with JavaScript interop | The viewer in a Blazor Server application on .NET 8 through JavaScript interop, as described in [Using the Document Viewer in a Blazor Server App with .NET 8](https://www.textcontrol.com/blog/2024/01/29/using-the-document-viewer-in-a-blazor-server-app-with-net-8/). Version 33.0 | [TXTextControl.Server.Blazor.Viewer.DotNet8](https://github.com/TextControl/TXTextControl.Server.Blazor.Viewer.DotNet8) |
| Angular: preparing forms | Forms prepared for the viewer and a custom signing process in Angular and ASP.NET Core, as described in [Preparing Forms for the Document Viewer and Customizing the Signing Process in Angular and ASP.NET Core](https://www.textcontrol.com/blog/2024/03/25/preparing-forms-for-the-document-viewer-and-customizing-the-signing-process-in-angular-and-asp-net-core/). Version 32.0 | [TXTextControl.Core.Angular.Forms.Prepare](https://github.com/TextControl/TXTextControl.Core.Angular.Forms.Prepare) |

[Blazor](https://docs.textcontrol.com/tx-text-control-dotnet-server/integration/blazor/llms-full.txt) and [Angular](https://docs.textcontrol.com/tx-text-control-dotnet-server/integration/angular/llms-full.txt) in the Integration Guide describe the current setup.

### React and JavaScript Articles

For React and plain JavaScript, the articles below hold their code in the article itself, without a repository to clone:

| Example | What it shows | Where |
|---|---|---|
| React | The viewer in a React application with the React package | [Using the TX Text Control Document Viewer in a React Application](https://www.textcontrol.com/blog/2024/02/29/using-the-tx-text-control-document-viewer-in-a-react-application/) |
| Loading documents in React | Documents loaded from base64 data and from a URL | [Loading Documents into the Document Viewer in React](https://www.textcontrol.com/blog/2024/03/12/loading-documents-into-the-document-viewer-in-react/) |
| Form field values | Saving the values of form fields in the document | [Document Viewer: Save the Values of Form Fields in Documents](https://www.textcontrol.com/blog/2023/12/19/document-viewer-save-the-values-of-form-fields-in-documents/) |
| Annotations across document types | Adding annotations and sharing them between document formats | [Adding and Sharing Annotations across Document Types using the Document Viewer in ASP.NET Core C#](https://www.textcontrol.com/blog/2024/04/19/adding-and-sharing-annotations-across-document-types-using-the-document-viewer-in-asp-net-core-c-sharp/) |
| Rendering mode | Choosing how the viewer renders pages | [Document Viewer: Setting the Rendering Mode](https://www.textcontrol.com/blog/2024/08/22/document-viewer-setting-the-rendering-mode/) |

[React](https://docs.textcontrol.com/tx-text-control-dotnet-server/integration/react/llms-full.txt) and [JavaScript](https://docs.textcontrol.com/tx-text-control-dotnet-server/integration/javascript/llms-full.txt) in the Integration Guide describe the current setup.

### Next Steps

- [Digital Signature Examples](https://docs.textcontrol.com/tx-text-control-dotnet-server/examples/digital-signatures/llms-full.txt): sign the documents that users signed in the viewer.
- [Document Editor Examples](https://docs.textcontrol.com/tx-text-control-dotnet-server/examples/document-editor/llms-full.txt): demos and samples of the Document Editor.
- [Getting Started](https://docs.textcontrol.com/tx-text-control-dotnet-server/getting-started/document-viewer/llms-full.txt): a first application with the Document Viewer.
- [Document Viewer](https://docs.textcontrol.com/tx-text-control-dotnet-server/document-viewer/llms-full.txt): the features of the viewer in detail.

---

## Nearby

- **Previous:** [Document Editor Examples](https://docs.textcontrol.com/tx-text-control-dotnet-server/examples/document-editor/llms-full.txt)
- **Next:** [Document Processing Examples](https://docs.textcontrol.com/tx-text-control-dotnet-server/examples/document-processing/llms-full.txt)
