Document Viewer
Document portals, reviews, forms and e-signing are the kind of processes you build on the Document Viewer once it runs in your application. You learn how the viewer works at runtime, how your code loads documents and gets them back and how it controls annotations, form fields and signatures through the JavaScript API.
If you haven't added the viewer yet, start with Getting Started: Document Viewer. The Document Viewer page in the Overview explains what the viewer is and how it differs from the Document Editor.
How You Work With the Viewer
Users read, search, annotate, fill out and sign documents in the viewer, but they can't change the content. Your code works with the viewer in two places:
- On the server, your ASP.NET Core application passes documents to the viewer, renders their pages with the TX Text Control engine and receives what users submit, such as signed documents.
- In the browser, the JavaScript API, the
TXDocumentViewerobject, loads and saves documents and gives access to annotations, form fields, tracked changes, signatures and the user interface. Its events tell your code what users do.
The same JavaScript API works in the ASP.NET Core view, Angular, React and a plain JavaScript page. The examples of this section use the ASP.NET Core application of the Getting Started tutorial.
Find the Right Page
| If you want to | Read |
|---|---|
| Understand the frontend, the controller of the backend, render modes and how to protect the endpoints | Architecture |
| Show documents from files, your database or your Web API | Loading Documents |
| Get a document back with the values and annotations of the user, or download it as PDF | Saving Documents |
| Scroll to pages, search the document or change the zoom | Navigation, Search, Zooming |
| Print documents | Printing |
| Adapt the toolbar, the mobile view or the texts of the viewer | User Interface |
| Let users comment on and mark documents, and store their annotations | Annotations |
| Let users review tracked changes | Tracked Changes |
| Let users fill out forms and process the values | Form Fields |
| Collect signatures and sign documents with certificates | Digital Signatures, Signature Fields |
Learn when TXDocumentViewer is available and which methods return promises | JavaScript API |
| React to what users do in the viewer | Events |
Where to Start
- Architecture: what happens between the browser and the server.
- JavaScript API: how your code talks to the viewer.
- Loading Documents: get real documents into the viewer.
- The page of the feature you need, from the table above.