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
Welcome to the Apryse installation guide for the WebViewer Component in Mendix. This guide will help you install a free trial of WebViewer into Mendix. It will WebViewer Widget and When your evaluation is done, you can purchase a license key to remove the watermark from all documents and deploy to a production environment.
Your free trial includes unlimited trial usage and support from solution engineers.
The trial of Apryse SDK requires a trial license key, which is provided in the box titled "License Key". A commercial license key is required for use in a production environment. Please contact sales to purchase a commercial key or if you need any other license key assistance.
License keys are uniquely generated. Please make sure that it is not publicly available (e.g. in your public GitHub).
Before you begin, make sure you have installed Node.js in your development environment.
Note: If you have downloaded the WebViewer widget from Mendix MarketPlace, you can just download the latest version of the /lib/
folder and copy it into the widgets
folder.
Open Mendix Studio Pro and create a new project by selecting File > New Project from the top menu bar, and choose the Blank app.
After creating a new app or inside of the existing app, navigate to the root directory and create a new folder called CustomWidgets/WebViewer
and checkout the contents from this sample inside.
By default, Mendix projects are stored in:
In the terminal or command line, navigate to CustomWidgets/WebViewer
and run:
After the command completes, run:
This will contiuously make a build of the Mendix Web Widget with WebViewer as the code changes and copy it into the app widget folder. It will be complete when you see something like this in your terminal:
Next, we must copy the static lib assets required for WebViewer to run. The files are located in CustomWidgets/WebViewer/node_modules/@pdftron/webviewer/public
and must be moved into a location that will be served and publicly accessible.
We can place it into theme/resources
. Create a new folder called lib
and place the contents from node_modules/@pdftron/webviewer/public
there.
theme/resources should have a directory structure like so:
Beginning with Mendix 9, the theme/resources
path is no longer valid. As such, please move the resources to respective folders for web and mobile. For example, for web it will look like this:
In your Mendix toolbox, you should see the WebViewer widget near the very bottom.
We can bind WebViewer to an attribute to dynamically change documents. In the following example, we will add widgets to allow users to provide a document URL which make WebViewer load the new document.
WebViewer can now load the URL that is passed through the text box! When the URL and Attribute are used, Attribute takes priority. How does it work on the WebViewer side?
In the code snippet, we are listening for any of the changes in props and then calling loadDocument API to load a new document. You can connect it with your existing flows or pass URLs from your file storage. Make sure you have the CORS configured in case you run into any errors.
You can now customize the widget by checking out other guides we have available. Perform your customizations inside of src/components/PDFViewer.tsx. Do not forget to run npm run dev within the Widget's console or terminal and update the files in your App by pressing F4, or from the top menu bar selecting Project > Synchronize Project Directory.
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales