Frameworks
Integrations
Mendix
SharePoint
Default UI
Modular UI
AnnotationManager
Annotation Types
Customize
Version 11
Version 10
v10.12
v10.11
v10.10
v10.9
v10.8
v10.7
v10.6
v10.5
v10.4
v10.3
v10.2
v10.1
v10.0
Version 8
v8.12
v8.11
v8.10
v8.9
v8.8
v8.7
v8.6
v8.5
v8.4
v8.3
v8.2
v8.1
v8.0
Version 7
Version 6
v6.3
v6.2
v6.1
v6.0
Version 5
Version 4
Version 3
Version 2
WebViewer Server
WebViewer BIM
This guide will show you how to integrate WebViewer Document Viewer & Editor into a React application.
You can watch a step-by-step video to help you get started.
You can also download a ready-to-go sample on GitHub.
Apryse also provides a TypeScript declaration file automatically when you install WebViewer from npm. You can easily use it with your projects to reap the benefits of static type checking and autocomplete to improve the speed of your development process.
Prior to starting, you should have already installed Node and npm.
Get your Apryse trial key.
Clone the webviewer-typescript-sample
repository:
Enter the directory and run npm install:
This will automatically download and extract the Apryse WebViewer Package and other dependencies.
Use the following command to watch for changes in .ts
files present in the src
folder. If you make changes, it will automatically recompile the index.ts
file again to produce a matching index.js
file which the browser will use.
You may get some errors regarding 'object' and 'Promise' types but they can be safely ignored. The watch
command will occupy a process.
Run the application by executing the following in a new shell service provider window (while the previous one is still running):
Your app should look like this:
Note: If your browser does not open automatically to open the WebViewer, navigate to localhost:3000
to see the project.
To call more WebViewer APIs, open index.ts
in your favorite text editor and add the API calls to the callback for the WebViewer instantiation. Add your own license key in place of 'YOUR_LICENSE_KEY':
For example, if you want to change the theme of the WebViewer to dark mode, you would add the following with the help of autocomplete and type intellisense in your IDE:
Execute npm start
if it isn't already running, and the theme of the viewer will change. Refresh your browser page if the server is already running to see your changes.
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales