Document loading
Please refer Formats for information about what file-types can be displayed.
Drag & Drop
Documents can simply be display by dragging them from your computer and dropping them in the according area of the jadice web viewer.
When you start dragging, the file-open-dialog will be automatically opened.
Open File
URL
When you open the viewer and pass a request-param named u
, the document will be loaded directly.
The u
-param accepts a URL-encoded Source
that looks like that:
{
"uri": "https://any.web.site/test.pdf"
}
The URL to open that document will look as follows:
https://web-viewer.jadice.com/?u=%7B%22uri%22%3A%22https%3A%2F%2Fany.web.site%2Ftest.pdf%22%7D
JavaScript API
It is possible to load documents via the JavaScript API.
const collection = {
pageSequences: [{
mediaType: "application/pdf",
pageIndices: null,
annotationData: null,
bookmarks: [],
renderSettingsData: null,
privateViewerProperties: null,
properties: null,
contentURI: "http://digbib.org/Franz_Kafka_1883/Die_Verwandlung_.pdf"
}],
annotationData: undefined,
type: "compositePaged"
}
window.viewerApi.collectionApi.showCompositePaged(collection)