Persist values
Save and reload the completed form
Update the partner onboarding fields, then merge their current values into a TX document and reload that result in the viewer.
Round tripPersist the completed form
Save the current values into a TX document and load that result back into the same viewer.
TX
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Persist completed form fields
Save the current document with form values merged into its content and reload the resulting TX document in the viewer.
API used
TXDocumentViewer.saveDocument
Key members
Saving the internal document format preserves the current form values so the viewer can reload the completed document.
TXDocumentViewer.saveDocument(
TXDocumentViewer.StreamType.InternalUnicodeFormat,
true,
data => TXDocumentViewer.loadDocument(data, "completed-form.tx")
);
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.
NuGet packages
Displays supported document and PDF formats in the browser.
dotnet add package TXTextControl.Web.DocumentViewer --version 34.2.0
Source files
See the implementation
The view, browser behavior, assets, and controller are encapsulated in Demos/DocumentViewer/FormFields/Saving.