|curl -u URL | grep Content-Type|
The behavior of the DjVu browser plugin can be specified by augmenting the URL using a syntax similar to that used by the CGI programs. This syntax is described by the following template:
The DjVu browser plugin only recognizes keywords that appear after the word djvuopts. The keywords recognized by each viewer are listed in the corresponding man page. Unrecognized keywords are ignored. The most common keywords are:
page=pagename Specify which page is displayed by name or by ordinal number. zoom=zoomfactor Set the zoom factor. Legal values for zoomfactor are:
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.
The DjVu browser plugin has been tested with several popular web browsers: Netscape 4 and 6; Gecko based browsers such as Mozilla, Galeon and Firefox; KHTML based browsers such as Konqueror; and Opera. Please read the browser documentation to find out where the plugin library should be installed.
You can integrate DjVu content on an HTML web page with either the <embed> or the <object> tag. This method will work even if your web server does not support the DjVu MIME type. The CGI style flags can be directly used as attributes of the embedding tag. The following example shows the W3C standard syntax with the OBJECT tag:
And this is the customary syntax with the EMBED tag:
<object data= myfile.djvu type= image/vnd.djvu
width= 100% height= 100% >
<param name= page value= iii >
<param name= zoom value= stretch >
This browser cannot render djvu data.
<embed src= myfile.djvu type= image/vnd.djvu
width= 100% height= 100%
page= iii zoom= stretch ></embed>
pluginobject.setdjvuopt(key,value) Set the value of the djvu option key to the character string value. This achieves the same effect as specifying option key=value among the CGI-style flags. For instance, values of the key page can be page IDs, page titles, page numbers, or page names. pluginobject.getdjvuopt(key) Return the value of the djvu option key as a string. The returned value is always a character string, even when the return is logically a number. Boolean values are returned as strings yes or no. Besides the usual CGI-style flags, this function recognizes the additional key pages and returns the total number of pages in the DjVu document. An empty string is returned when the key is not recognized. pluginobject.onchange=code; Ensure that string code is evaluated in the context of the plugin object whenever something changes in the djview graphical user interface. For instance, this evaluation happens when progressive refinements are painted, and when the user manipulates the image interactively. pluginobject.version Return a string describing the plugin version. This property can be used to test whether the djview plugin is scriptable in this browser.
This program was written by Andrei Erofeev <firstname.lastname@example.org> and was then improved by Bill Riemers <email@example.com> and L146;eon Bottou <firstname.lastname@example.org>.