Link

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.


What's included in your BuildVu trial?

  • Access to download the SDK and run it locally.
  • Access to the cloud trial to convert documents in the IDR cloud.
  • Access to the Docker image to set up your own trial server in the cloud.
  • Communicate with IDR developers to ask questions & get expert advice.
  • Plenty of time to experiment and build a proof of concept.
  • Over 100 articles to help you get started and learn about BuildVu.
  • An exceptional PDF to HTML converter that took over 20 years to build!

Start Your Free Trial