Client-Configuration
The client configuration is done in the application.yml file.
All properties defined there are sent to the client and applied accordingly.
How to apply a custom application.yml file is described in the capter Customization.
Configuration
webtoolkit:
clientConfiguration:
maxUploadFileSize: 50000000 # in bytes
qualityEnhancement: 100 # in percent
internalCustomProperties:
hideThumnailSidebarAtStartup: true
annotationProfileId: "JWT-Demo-Profile"
annotationSaveActionEnabled: false
displayOpenFileAtStartup: "true"
initialSidebarActionAfterOpen: "attachments"
allowedOriginPostMessages: "http://localhost:4200"
hideFileOpenInMenu: true
Upload Size Limits
The value maxUploadFileSize defines the maximum file size that can be uploaded. The client will reject uploads larger than this value.
Beware, that the backend needs to be configured accordingly, as it would have other limits if not configured accordingly.
spring:
servlet:
multipart:
max-file-size: 50MB
max-request-size: 50MB
Annotation Profile
When you want to use a custom annotation profile, you need to define the annotationProfileId in the client configuration first.
The backend needs to be configured accordingly:
webtoolkit:
annotationProfiles: /jwt-annotation-profile.xml, /jwt-demo-profile.xml
defaultAnnotationProfile: JWT-Demo-Profile
Quality Enhancement
By default, the client will respect HiDPI screens and will use a higher quality for the images automatically.
If you want to increase the quality, you can set the qualityEnhancement property to a higher value.
It defaults to 0 and can be set up to 100.
The value is in percent, so 100 means tiles will be rendered twice as large as the original image.
Larger images will consume more memory and CPU resources as they are rendered twice as large.
Saving Annotations
More information can be found in the chapter Annotations.
The property annotationSaveActionEnabled can be used to display the save button in the toolbar, but
it only makes sense if the backend can actually save annotations (you need to provide an
implementation for that).
Open File Dialog
If you want to show/hide the open file dialog at startup, you can set the displayOpenFileAtStartup property to true or false.
Disable file upload
For disabling the file upload, configure the hideFileOpenInMenu property to true.
Show/hide Thumbnail Sidebar initially
If you want to show/hide the thumbnail sidebar after loading the viewer, you can set the hideThumnailSidebarAtStartup property to true or false.
Initial Sidebar Action After Open
To define, which right sidebar should be displayed initially, you can set the initialSidebarActionAfterOpen property to one of the following values:
docs: Sidebar to navigate between multiple documentsadvancedSearch: Search-Panelbookmarks: Bookmarks-Panelanno: Annotation-Panelattachments: Document-Attachments
Allowed Origin for Post Messages
If you display the viewer in an iframe, you can send post messages to the viewer from the parent window.
To allow this, you need to define the allowedOriginPostMessages property. Only messages from this origin will be accepted.