Specify Document Location
The default behaviour of the IDRViewer is to load the document from the current directory. It is also possible to specify where the document is located in order to load documents from an alternative location.
This can be achieved by setting the config.url
value to your alternate document location before setup
is called at the bottom of the index.html
file.
Example
<script src="config.js"></script>
<script>IDRViewer.setup();</script>
// ↑↑↑ is replaced with ↓↓↓
<script src="https://www.example.com/bucket/document-id/config.js"></script>
<script>
IDRViewer.config.url = "https://www.example.com/bucket/document-id/";
IDRViewer.setup();
</script>
Please note: There is currently a bug in Chromium-based browsers (Chrome, Edge, Opera, etc) where the document background may become blurry when zooming in if the document is located cross-origin (on a different domain). Chromium issue #145345 tracks this bug.