NAME
nsdejavu - DjVu browser plugin
SYNOPSIS
/var/tmp/djvulibre-3.5.17-2.fc6-root/usr/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 official MIME type for DjVu documents is
image/vnd.djvu. For compatibility with ancient versions of
the DjVu viewer, it is common to use instead the experimental MIME
type image/x-djvu or image/x.djvu. Web servers should
be configured to send the proper MIME type for DjVu documents. See
the DjVu tutorial for more information (
). Most web browsers also recognize files ending with .djvu
or .djv as DjVu files.
An easy way to check if an http server is giving an appropriate
content-type is to invoke the following command with a URL
corresponding to a DjVu file on the server, such as .
- wget --debug --output-document=/dev/null URL
2>&1 | grep Content-Type
The result should be one of the following, preferably the first.
- Content-Type: image/vnd.djvu
Content-Type: image/x.djvu
Content-Type: image/x-djvu
Any other MIME type indicates a server misconfiguration.
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
- 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.
- 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.
- page=pagenum
- Specify the initial page to be displayed. Page numbers are
numbered from 1.
- 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:
| number
| Magnification factor in range 10% to 999%.
|
| 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:
| color
| Display the color image.
|
| bw
| Display the foreground mask only.
|
| fore
| Display the foreground only.
|
| back
| Display the background only. | |
- hor_align=keyword
- Specify the horizontal position of the page in the viewer
window. (This does not specify what part of the page will be shown,
but rather how margins will be laid out around the page in the
plugin window.) Argument keyword must be left,
center, or right.
- ver_align=keyword
- Specify the vertical position of the page in the viewer window.
(This does not specify what part of the page will be shown, but
rather how margins will be laid out around the page in the plugin
window.) Argument keyword must be top, center,
or bottom.
-
toolbar=keyword{(,|+|-)keyword}
- Controls the appearance and the contents of the toolbar. The
argument of option toolbar is composed of a number of
keywords separated by characters comma, plus or minus. The
appearance of the toolbar is controlled by keywords placed before
the first occurrence of a character plus or minus. The following
keywords are recognized in this context:
| no
| Disable toolbar.
|
| always
| Disable toolbar "autohide" mode.
|
| auto
| Enable toolbar "autohide" mode.
|
| top
| Place toolbar along top edge (not implemented).
|
| bottom
| Place toolbar along bottom edge. | |
- The contents of the toolbar is controlled by keywords placed
after the first occurrence of a character plus or minus. Each
keyword adds (after a plus) or remove (after a minus) a particular
toolbar button or group of buttons. The initial content of the
toolbar is determined by the first occurrence of a character plus
or minus. When this is a plus the toolbar is initially empty. When
this is a minus the toolbar is initially full. The following
keywords are recognized:
| fore,back,color,bw
| for the display mode selection tool.
|
| rescombo
| for the zoom selection tool.
|
| zoom
| for the zoom buttons.
|
| pan
| for the panning mode button.
|
| zoomsel
| for the zooming mode button.
|
| textsel
| for the text selection mode button.
|
| rotate
| for the image rotation buttons.
|
| search
| for the text search button.
|
| save
| for the save button.
|
| print
| for the print button.
|
| pagecombo
| for the page selection tool.
|
| firstlast
| for the first-page and last-page buttons.
|
| prevnext
| for the previous- and next-page buttons.
|
| backforw | |
-
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.
- rotate=(0|90|180|270)
- Rotate the djvu image by the specified angle expressed in
degrees counter-clockwise.
- print=(yes|no)
- Enable or disable printing the djvu image. Printing is enabled
by default.
- 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
/var/tmp/djvulibre-3.5.17-2.fc6-root/usr/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
/var/tmp/djvulibre-3.5.17-2.fc6-root/usr/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/lib/mozilla-1.1:
- cd /usr/lib/mozilla-1.1/plugins
ln -s
/var/tmp/djvulibre-3.5.17-2.fc6-root/usr/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.
Mozilla Firebird
The DjVu plugin works nicely with Mozilla Firebird 0.6.1 or
better. You must establish a link from the Firebird plugin
directory. Assuming that Mozilla is installed under
/usr/lib/mozilla-firebird:
- cd /usr/lib/mozilla-firebird/plugins
ln -s
/var/tmp/djvulibre-3.5.17-2.fc6-root/usr/lib/netscape/plugins/nsdejavu.so
.
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
/var/tmp/djvulibre-3.5.17-2.fc6-root/usr/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 <docbill@sourceforge.net>
and L'eon Bottou <leonb@users.sourceforge.net>.
SEE ALSO
djvu(1),
ddjvu(1),
djview(1)