NSDEJAVU(1)

NAME
nsdejavu - DjVu browser plugin

SYNOPSIS
/usr/X11R6/lib/netscape/plugins/nsdejavu.so

DESCRIPTION
The shared library nsdejavu.so uses the Netscape browser plugin API to display DjVu images in in a number of popular web browsers. Different web browsers provide various level of support for Netscape plugins. Please check section "Browser Compatibility" for instructions on how to enable the DjVu browser plugin. Both the standalone viewer djview and the DjVu browser plugin nsdejavu.so offer similar features. The DjVu browser plugin in fact is wrapper that invokes the standalone viewer program in remote control mode. This man pages describes those features that are specific to the browser plugin. Additional information can be found in the djview(1) man page.

MIME TYPES AND EXTENSIONS
Typing the URL of a recognized DjVu document in your web browser should automatically invoke the DjVu browser plugin. Each browser uses different methods to determine that a particular URL is in fact a DjVu document. Web server normally provide a MIME type to web browsers. The MIME type for DjVu documents is image/x-djvu. Web servers should be configured to send the proper information for DjVu documents. See the DjVu tutorial for more information ( http://www.djvuzone.org/support/tutorial/ ). Most web browsers also recognize files ending with .djvu or .djv as DjVu files.

CGI-STYLE FLAGS
The behavior of the DjVu browser plugin can be specified by by augmenting the URL using a syntax similar to that used by the CGI programs. This syntax is described by the following template:

    http://server/dir/file.djvu?djvuopts&keyword=value&keyword=value&...

The DjVu browser plugin only recognizes keywords that appear after the word djvuopts. Unrecognized keywords are silently ignored. The following keywords are recognized:

passive=yes/no
    Cause the image to be displayed in a manner similar to an ordinary web image. The default zoom factor is changed to "Fit Page". The toolbar, the pop-up menu, the scroll bar, and the keyboard shortcuts are disabled. The default is no.

toolbar=yes/no
    Enable or disable the toolbar. The default is defined by the preferences dialog.

scrollbars=yes/no
    Enable or disable the presence of scroll bars when the full image size exceeds the plugin window size. The default is yes.

menu=yes/no
    Enable or disable the pop-up menu. The pop-up menu is enabled by default.

keyboard=yes/no
    Enable or disable the DjVu plugin keyboard shortcuts. The default is yes (enabled).

frame=yes/no
    Enable or disable the display of a thin gray frame around the DjVu image. Keyboard shortcuts are enabled by default.

links=yes/no
    Enable or disable hyper-links in the DjVu image. Hyper-links are enabled by default.

logo=yes/no
    Enable or disable the display of the DjVu log while the plug-in is downloading data. This is enabled by default.

zoom=zoomfactor
    Specify the initial zoom factor. Unless the toolbar, pop-up menu and keyboard are disabled, the user will be able to change the zoom factor. Legal values for zoomfactor are shown in the below:
    one2one | Select the "one-to-one" mode.
    width | Select the "fit width" mode.
    page | Select the "fit page" mode.
    stretch | Stretch the image to the plugin window size.

mode=modespec
    Specify the initial display mode. Unless the toolbar and pop-up menu are disabled, the user will be able to change it. Legal values for modespec are shown in the below:
    bw | Display the foreground mask only.
    fore | Display the foreground only.
    back | Display the background only.

page=pagenum
    Specify the initial page to be displayed. Page numbers are numbered from 1.

highlight=x,y,w,h[,color]
    Display a highlighted rectangle at the specified coordinates and with the specified color. Coordinates x, y, w, and h are measured in document image coordinates (not screen coordinates). The origin is set at the bottom left corner of the image. The color color must be given in hexadecimal RRGGBB format. Omitting the color argument means to use XOR highlighting. Multiple highlighted zone can be specified.

cache=yes/no
    Enable or disable the caching of fully decoded pages of the document. Caching is on by default. Caching of documents whose URL does not contain extension is off by default.

EMBEDDING DJVU IMAGES
A good way to integrate DjVu content on your web page is to use the EMBED directive of the HTML language. An advantage of this method is that it will work even if your web server does not support the DjVu MIME type. Furthermore, the CGI style flags can be directly used as attributes of the EMBED tag. Here is an example:

    <embed src="myfile.djvu" type="image/x-djvu"
    width="100%" height="100%"
    passive=yes zoom=stretch > </embed>

BROWSER COMPATIBILITY
The DjVu browser plugin has been tested with several popular web browsers:

  Netscape 4

The DjVu browser plugin is normally installed in directory /usr/local/lib/netscape/plugins. This is sufficient to enable the DjVu browser plugin because Netscape 4 always searches this directory for plugins.

You might have to first remove previous version of the DjVu plugin. Selecting menu Help->About Plugins in netscape displays the current list of plugins. Previous versions of the plugin might be installed in one of the following locations:

    $HOME/.netscape/plugins/nsdejavu.so
    /usr/lib/netscape/plugins/nsdejavu.so
    /opt/netscape/plugins/nsdejavu.so

More complicated cases can be solved by creating a symbolic link into your personal plugin directory:

    cd $HOME/.netscape/plugins
    ln -s /usr/X11R6/lib/netscape/plugins/nsdejavu.so .

You must not copy nsdejavu.so but create a symbolic link. This is necessary because nsdejavu.so first locates its normal installation directory by following the symbolic link. The Netscape plugin search rules are explained in the README file that comes with the Netscape distribution. Also check option -fix of program djview.

  Netscape 6

The DjVu plugin works nicely with Netscape 6.1 or better. It seems that Netscape 6 only recognize plugins installed inside its own plugin directory. This can be done using a symbolic link. Let us assume that Netscape 6 is installed in /usr/local/netscape6. The following commands should do the trick:

    cd /usr/local/netscape6/plugins
    ln -s /usr/X11R6/lib/netscape/plugins/nsdejavu.so .

  Mozilla

The DjVu plugin works nicely with Mozilla 0.9.5 or better. You must establish a link from the Mozilla plugin directory. Assuming that Mozilla is installed under /usr:

    cd /usr/lib/mozilla/plugins
    ln -s /usr/X11R6/lib/netscape/plugins/nsdejavu.so .

You can then restart mozilla and select menu Help->About Plugins to check whether the DjVu plugin is properly recognized.

  Galeon

Galeon internally uses the Mozilla rendering engine. Install the plugin for Mozilla and it should also work for Galeon.

  Konqueror

The DjVu plugin works with KDE-2.2 or better. Some problems have been reported with DjVu images embedded in web pages.

You must first make sure that konqueror recognizes the DjVU plugin. In Konqueror, select Settings->Configure Konqueror. When the dialog appears, select the icon Netscape Plugins. Make sure that directory /usr/X11R6/lib/netscape/plugins appears in the list of plugin directories. Then press button Scan for new plugins. Clicking the Plugins tab button should display a list of recognized plugins. Check that nsdejavu.so appears there.

  Opera

The DjVu plugin works with Opera-6 or better. As explained in the Opera software support pages, you must have the OpenMotif libraries installed.

CREDITS
This program was written by Andrei Erofeev <andrew_erofeev@yahoo.com> and was then improved by Bill Riemers <bcr@lizardtech.com> and Léon Bottou <leonb@users.sourceforge.net>.

SEE ALSO
djvu(1), ddjvu(1), djview(1)