Link
Skip to main content

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.


Get started with BuildVu in 3 steps

  1. Fill in the form to download the trial jar →
  2. Copy the code snippets as instructed on the next page
  3. Build your solution using our docs

Learn more about BuildVu

Start Your Free Trial

Trial License Type