This library provides a document viewer to render documents in any browser including Google Chrome, Firefox, Safari and Edge.
import './App.css';
import DocumentViewer from '@txtextcontrol/tx-react-ds-document-viewer'
function App() {
return (
<DocumentViewer
width="1024px"
height="1024px"
serviceURL="https://yourdomain.com/DocumentServices"
clientId="dsserver.ry4jDzsbXEk0lYqZdY7r5ZxfpMFuor2H"
clientSecret="41fk3UJGb5fgKwQ5kcf82ak5fcHV8Dr8"
userNames={['user1', 'user2']}>
</DocumentViewer>
);
}
export default App;
<DocumentViewer
width = "800px"
height = "800px"
serviceURL="https://yourdomain.com/DocumentServices"
clientID="txtextcontrol.ry4jDzsbXEk0lYqZdY7r5ZxfpMFuor2H"
clientSecret="41fk3UJGb5fgKwQ5kcf82ak5fcHV8Dr8"
[signatureSettings] = "{
showSignatureBar: true,
signatureBoxName: 'txsign',
redirectUrlAfterSignature: 'https://www.textcontrol.com',
ownerName: 'Paul', signerName: 'Jacob',
signerInitials: 'PK' }">
</DocumentViewer>
The DocumentEditor provides a fully-featured JavaScript API that gives access to all document elements to manipulate documents programmatically. The JavaScript API is separately explained in the Reference Guide: