path |
string
|
|
|
Path to the WebViewer lib folder |
annotationUser |
string
|
<optional>
|
Guest
|
Name of the user for annotations |
config |
string
|
<optional>
|
|
URL path to a custom JavaScript for customizations |
custom |
string
|
<optional>
|
|
A serialized data object that will be passed into the iframe. The data can be accessed in the config file after deserializing. https://docs.apryse.com/documentation/web/guides/config-files/#passing-custom-data |
css |
string
|
<optional>
|
|
URL path to a custom CSS file for customizations |
disabledElements |
Array.<string>
|
<optional>
|
|
List of data-elements to be disabled in UI |
autoFocusNoteOnAnnotationSelection |
boolean
|
<optional>
|
true
|
Enables auto focus of input in notes panel on selection of annotation |
accessibleMode |
boolean
|
<optional>
|
false
|
Enable accessibility features. E.g tab page selection and page text in the DOM |
enableAnnotations |
boolean
|
<optional>
|
true
|
Enable annotations feature |
enableAzureWorkaround |
boolean
|
<optional>
|
false
|
Enable workaround of the issue in Azure related to range requests |
enableOptimizedWorkers |
boolean
|
<optional>
|
true
|
If true, WebViewer will use optimized workers if possible. Otherwise, it will use regular workers |
enableFilePicker |
boolean
|
<optional>
|
false
|
Enable file picker feature |
enableMeasurement |
boolean
|
<optional>
|
false
|
Enable measurement tools |
enableRedaction |
boolean
|
<optional>
|
false
|
Enable redaction tool |
disableVirtualDisplayMode |
boolean
|
<optional>
|
false
|
Disable virtual display mode for pages. The virtual display mode allows documents with many pages to be loaded efficiently in continuous scrolling mode. If disabled then single page mode will be used for documents with many pages. |
hideDetachedReplies |
boolean
|
<optional>
|
true
|
Whether to hide detached replies. These are replies that reference a parent annotation which no longer exists. |
extension |
string
|
Array.<string>
|
<optional>
|
|
Extension of the document to be loaded. **Multi-tab** must be an array of documents ex: Webviewer({ initialDoc: ['pdf_doc', 'word_doc'], extension: ['pdf', 'docx'] }) OR Webviewer({ initialDoc: ['pdf_doc1', 'pdf_doc2'], extension: ['pdf'] }) |
filename |
string
|
<optional>
|
|
The name of the file that will be used when downloading the document. The extension in the filename will be used as the document type to be loaded (e.g. myfile.docx will treat the file as docx) if no extension option is passed. |
forceClientSideInit |
boolean
|
<optional>
|
false
|
If set to true then when loading a document using WebViewer Server the document will always switch to client only rendering allowing page manipulation and the full API to be used. |
loadAsPDF |
boolean
|
<optional>
|
false
|
If set to true then when loading an office document, it'll be converted to a PDF file. This allow page manipulation and other features to be used |
fullAPI |
boolean
|
<optional>
|
false
|
Enable PDFNet.js library functions |
initialDoc |
string
|
Array.<string>
|
<optional>
|
|
URL path to a document to load on startup. If an array of 2 or more documents is passed, webviewer will enable multi-tab mode. |
isAdminUser |
boolean
|
<optional>
|
false
|
Set user permission to admin |
isReadOnly |
boolean
|
<optional>
|
false
|
Set user permission to read-only |
licenseKey |
string
|
<optional>
|
|
License key for viewing documents. If not set then WebViewer will be in demo mode. |
mobileRedirect |
boolean
|
<optional>
|
false
|
Whether the viewer should redirect to a new window or not when loaded on a mobile device |
preloadWorker |
string
|
<optional>
|
|
Type of workers to be preloaded. See WorkerTypes to see all available options. You can also include multiple types comma separated e.g. `${Webviewer.WorkerTypes.PDF},${Webviewer.WorkerTypes.OFFICE}` |
backendType |
string
|
<optional>
|
|
A string representing the "backend type" for rendering PDF and Office documents. Pass "asm" to force the use of the ASM.js worker, "ems" to force the use of the WebAssembly worker (or ASM.js on non-wasm browsers) or "wasm-threads" to use threaded WebAssembly. |
useDownloader |
boolean
|
<optional>
|
|
A boolean indicating whether Downloader should be used on urls (PDF only). https://docs.apryse.com/documentation/web/guides/usedownloader-option/. |
workerTransportPromise |
object
|
<optional>
|
|
Properties
Name |
Type |
Argument |
Description |
pdf |
function
|
<optional>
|
Promise that resolves to a PDF worker |
office |
function
|
<optional>
|
Promise that resolves to an office worker |
|
webviewerServerURL |
string
|
<optional>
|
|
The URL path to the hosted WebViewer Server |
singleServerMode |
boolean
|
<optional>
|
false
|
Set server to ignore health failures. For usage with setups using a single server |
disableLogs |
boolean
|
<optional>
|
false
|
Disables console logs coming from WebViewer, including the version and build numbers |
enableViewStateAnnotations |
boolean
|
<optional>
|
false
|
Enables view state annotations (double clicking a sticky annotation will reset the viewer to the state it was in when the annotation was created) |
uiPath |
string
|
<optional>
|
|
Path to UI folder to use a different UI or customized UI. Default is'./ui/index.html'. |
notesInLeftPanel |
boolean
|
<optional>
|
false
|
If true then it moves the notes panel into a tab inside the left panel |
selectAnnotationOnCreation |
boolean
|
<optional>
|
false
|
If true then newly added annotations will be selected automatically |
highContrastMode |
boolean
|
<optional>
|
false
|
If true then the UI will use high contrast colors to help with accessibility. |
documentXFDFRetriever |
Core.DocumentViewer.DocumentXFDFRetriever
|
<optional>
|
null
|
The XFDF retriever that will be called when a document is being loaded. The retriever should return a Promise which should resolve to the XFDF string that is going to merged into the document |
streaming |
boolean
|
<optional>
|
|
A boolean indicating whether to use http or streaming PartRetriever, it is recommended to keep streaming false for better performance. https://docs.apryse.com/documentation/web/guides/streaming-option/. |
additionalTranslations |
object
|
<optional>
|
|
An object to add/edit additional translations data for a specific language
Properties
Name |
Type |
Description |
language |
string
|
The language code for which you want to add/edit translation data |
translations |
object
|
A key/value object with the new/updated translations
Properties
Name |
Type |
Description |
key |
string
|
A key value for the new/updated translation.
Refer to the lib/ui/i18n folder to find the existing keys in the translation files |
value |
string
|
A value of the new/updated translation |
|
|
disableIndexedDB |
boolean
|
<optional>
|
false
|
If true than the usage of indexedDB will be disabled for webviewer **Multi-tab Only**. |
autoExpandOutlines |
boolean
|
<optional>
|
|
If set to true, will expand outlines by default. |
enableAnnotationNumbering |
boolean
|
<optional>
|
|
If set to true, as annotations are imported/created they will each be numbered. Starting at 1, each annotation will be assigned the next greatest available number. |
enableOfficeEditing |
boolean
|
<optional>
|
|
If true, will load docx files with editing capabilities. |
disableMultiViewerComparison |
boolean
|
<optional>
|
false
|
If true then MultiViewerMode will not show compare overlay annotations. |
disableObjectURLBlobs |
boolean
|
<optional>
|
false
|
If true, then uncompressed JavaScript files will be loaded without instantiating a Blob. If false, then the URL.createObjectUrl API will be used to instantiate an uncompressed Blob instance of the appropriate PDF worker file (Note that this goes against the Content-Security-Policy (CSP) rule "script-src blob:"). |
ui |
string
|
<optional>
|
default
|
Type of UI to be used. Accepts `default`|`beta`. Toggle the beta UI to check out the new modular UI. |