
loadDocument(buffer, name = "***", config = null) - accepts.Programmatic APIįurthermore, the viewer has an API, which allows to open djvu files programmatically: Then just open and you will see the viewer. In order to start the local server (you may change the port as you wish). To install the serve package globally and then head to the directory, where our files are kept, and run serve -p 5000 Run the following commands in your shell. Any static web server will do.įor example, if you have Node.js installed, you can just use the serve package to run a simple static web server. To start a local web server in order to make everything work as it works on the Internet. It's concerned with that theĭjVu.js uses the Web Workers API of the web browsers and Chrome doesn't allow the script to create a Worker, when the file is loaded from the file system directly. But if you use Google Chrome or Opera, you won't see anything except for some errors in the console. If you use Mozilla Firefox web browser, then you can just open the index.html and you will see the DjVu.js viewer, which will work absolutely the same wayĪs it does on the main page of this website. Window.ViewerInstance = new DjVu.Viewer() html file (let's say index.html) with the following content. How to use itĬreate a folder with files that you downloaded from here ( djvu.js, djvu_viewer.js).

You can download the previous versions here. So no separate djvu_viewer.css is provided. Note that since the version 0.5.0 all viewer's CSS is inside the js file. Here you can download the library and the viewer.
