The following keyboard shortcuts allow you to quickly navigate through a DjVu document. They work when you type them while the plug-in window has keyboard focus (click on the DjVu document anywhere except within a hyperlink to gain keyboard focus).
Key | Action |
---|---|
Up, Down, Left, Right | Scroll the image in the given direction |
Home | View the First page of the document |
End | View the Last page of the document |
Page Up | Go to the top of the page or to the previous page if already there |
Page Down | Go to the bottom of the page or to the next page if already there |
Space, Enter | Go to the next page |
Backspace | Go to the previous page |
+, - | Zoom In and Zoom Out |
W | Fit Width |
P | Fit Page |
G | Display the "Goto page" dialog, allowing you to switch to a particular page. |
F | Search (if textual information is available) |
1 | Set zoom to 100% |
2 | Set zoom to 150% |
3 | Set zoom to 300% |
? | Display the DjVu Help page. |
Pause/Windows App key | Display the DjVu Pop Up Menu. |
EMBED flags are flags that can be specified in the EMBED or OBJECT tags of the HTML document and whose purpose is to customize the behavior of the plug-in. The previous version of the DjVu plug-in had support for some of the flags listed below. Unfortunately, due to some problems with Microsoft Internet Explorer, we had to make those flags obsolete and replace them with new ones. Some additional flags have also been added. All flags and values are case insensitive. Values can be either yes or no or true or false.
EMBED flag | Description |
---|---|
PASSIVE=yes/no | This flag is useful to display a DjVu image in a manner similar to how a GIF or JPEG image is displayed. If you specify this flag, it:
The previous version of the DjVu plug-in supported the PASSIVE flag without a yes/no argument. This was causing problems for the Windows port of the DjVu plug-in running under Microsoft Internet Explorer since MS IE always expects a value to be present. In this release we are advising you to add "=yes" after PASSIVE to stay compatible with the Windows platform. We also have to declare that "=yes" and "=no" have the same effect for this flag to stay compatible with the previous version of the plug-in. Thus, please remember to always supply a value for PASSIVE flag, and no matter what that value will be, the plug-in will treat it as "yes" |
PASSIVESTRETCH (obsolete) |
This obsolete flag can now be replaced with "PASSIVE=yes ZOOM=stretch" |
NOTOOLBAR (obsolete) |
Use TOOLBAR=no instead |
NOSCROLLBARS (obsolete) |
Use SCROLLBARS=no instead |
NOMENU (obsolete) |
Use MENU=no instead |
TOOLBAR=yes/no | If "no" is specified, disables the popup toolbar (at the bottom of the plug-in's window). The user will still be able to enable the toolbar using Preferences dialog (provided that popup menu is enabled) |
SCROLLBARS= yes/no |
If "no" is specified, disables scrollbars |
MENU=yes/no | If "no" is specified, disables the popup menu |
KEYBOARD=yes/no | If "no" is specified, disables keyboard input (for the plug-in, of course, not for the browser or the whole system) |
FRAME=yes/no | If "no" is specified, disables the gray frame, which usually surrounds a DjVu image |
LINKS=yes/no | If "no" is specified, disables hyperlinks |
LOGO=yes/no | If "no" is specified, disables the DjVu logo, which is displayed while the plug-in is downloading data |
ZOOM=number
ZOOM=one2one ZOOM=width ZOOM=page ZOOM=stretch |
Sets the initial zoom to be either number%, "One to one", "Fit Width", "Fit Page", or "Stretch". Unless the toolbar, popup menu and keyboard are disabled, the user will be able to change it. |
MODE=color
MODE=bw MODE=fore MODE=back |
Sets the initial display mode to be either "Color", "Black and White", "Foreground", or "Background". Unless the toolbar, popup menu and keyboard are disabled, the user will be able to change it. |
PAGE=number |
Displays the specified page, which may be any valid page number in the DjVu document referred by the embed tag. Example: PAGE=5 |
HIGHLIGHT= x,y,w,h[,c] |
Creates rectangular highlighted area with given coordinates and given color. The meaning of the parameters is as follows:
You can specify more than one highlight=... flag. In a multipage documents, all flags will be applied to the first page displayed. To control what page should be displayed first use page= flag. Note, that all the coordinates are internal document coordinates, not screen coordinates. Example: HIGHLIGHT=10,10,300,400,FF00FF |
CACHE=yes/no | Disables or enables caching of fully decoded pages of the document. As described in the Preferences, the plugin can cache fully decoded DjVu pages and reuse them later. Normally, the size of the cache is set by the user. With this option, web developers can disable the cache if they need to. Note, that caching of documents with extension different from .djvu and .djv is off by default. You can still turn the cache on using this option. |
FLAGS="..." | Can be assigned any valid combination of the above tags in double quotes(") separated by spaces. E.g., FLAGS="menu=false frame=true logo=yes zoom=134 mode=color". |
The following table contains examples of how the EMBED flags can be used to customize the plug-in's behavior:
Examples of using EMBED flags | Results |
---|---|
<EMBED SRC="image.djvu" TYPE="image/x.djvu" WIDTH=100% HEIGHT=100% MENU=false TOOLBAR=false SCROLLBARS=false KEYBOARD=false> | No popup menu, no toolbar, no scrollbars and no keyboard input. |
<EMBED SRC="image.djvu" TYPE="image/x.djvu" WIDTH=100% HEIGHT=100% PASSIVE=yes> | Passive mode: no toolbar, scrollbars, popup menu and keyboard input. |
<EMBED SRC="image.djvu" TYPE="image/x.djvu" WIDTH=100% HEIGHT=100% PASSIVE=yes MENU=yes> | Additional MENU=yes flag enables popup menu. |
<EMBED SRC="image.djvu" TYPE="image/x.djvu" WIDTH=100% HEIGHT=100% MENU=yes PASSIVE=yes> | PASSIVE=yes overrides MENU=yes because it is specified after the MENU flag, and the popup menu is disabled. |
<EMBED SRC="myimage.djvu" TYPE="image/x.djvu" WIDTH=100% HEIGHT=100% ZOOM=Stretch MENU=false TOOLBAR=false SCROLLBARS=false KEYBOARD=false> | The DjVu image is stretched to fill the DjVu Plug-In display area, no menu, no toolbar, no scrollbars and no keyboard input. |
<EMBED SRC="picture.djvu" TYPE="image/x.djvu" WIDTH=100% HEIGHT=100% TOOLBAR=no> | No toolbar. |
<EMBED SRC="foo.djvu" TYPE="image/x.djvu" WIDTH=100% HEIGHT=100% TOOLBAR=no MENU=no> | No toolbar and no menu. |
<EMBED SRC="mydog.djvu" TYPE="image/x.djvu" WIDTH=100% HEIGHT=100% TOOLBAR=no MENU=no SCROLLBARS=no> | No toolbar, no menu and no scrollbars. |
<EMBED SRC="bar.djvu" TYPE="image/x.djvu" WIDTH=100% HEIGHT=100% FLAGS="MENU=false TOOLBAR=false SCROLLBARS=false KEYBOARD=false"> | No menubar, no toolbar, no scrollbars and no keyboard input. |
CGI-style arguments is yet another way to control the plugin's behavior. They work the same way as the EMBED flags, they have the same names and same values. The only difference is the place where they are specified. EMBED flags have to be listed inside an EMBED tag. The CGI-style arguments are appended to the document's URL after the '?' sign and are separated with the '&' signs. In order to separate the DjVu arguments from other CGI arguments, the set of DjVu arguments must be preceded by the string "DJVUOPTS&".
For example: document.djvu?DJVUOPTS&PAGE=13&PASSIVE=yes will display the 13th page of document.djvu and will switch the plug-in to the PASSIVE mode (no toolbar, no popup menu, no scrollbars and disabled keyboard input).
The main advantage of The CGI-style arguments is that you do not have to use the EMBED tag to control the plug-in. You pass commands to the plug-in as if it was a CGI script.
See how some examples from the EMBED flags section can be rewritten using this new feature.
Examples of using EMBED flags | Results |
---|---|
image.djvu?DJVUOPTS& MENU=false& TOOLBAR=false |
No popup menu, and no toolbar. |
/cgi-bin/gendjvu.pl?arg=2& DJVUOPTS&PASSIVE=yes |
Here arg=2 is passed to the cgi-bin script gendjvu.pl, and for the DjVu plug-in, we use passive mode: no toolbar, scrollbars, popup menu and keyboard input. Note that the cgi-bin script must be written specifically to ignore DJVUOPTS and anything after it. |
image.djvu?DJVUOPTS& PASSIVE=yes&MENU=yes |
Additional MENU=yes flag enables popup menu. |
image.djvu?DJVUOPTS& MENU=yes&PASSIVE=yes |
PASSIVE=yes overrides MENU=yes because it is specified after the MENU flag, and the popup menu is disabled. |
myimage.djvu?DJVUOPTS& ZOOM=Stretch& TOOLBAR=false |
The DjVu image is stretched to fill the DjVu Plug-In display area. In addition to it, the popup toolbar is disabled. |
report.djvu?DJVUOPTS& PAGE=10&ZOOM=page |
Display the 10th page of report.djvu and set the zoom factor to "Fit Page" |
report.djvu?DJVUOPTS& HIGHLIGHT=10,10, 300,200,FF00 |
Will highlight rectangle with coordinates of the lower-left corner (10, 10), width 300, and height 200 with green color. The coordinates are specified in the document coordinate system with reference point in lower-left corner of the document and axis Y pointing upward. |
Any DjVu document is composed of at least two chunks. You can see the list of chunks when you display the Page information dialog. Here is a brief description of every chunk currently recognizable:
Chunk name | Description |
---|---|
INFO |
Page information. Contains page dimensions and DPI information. Should be present in any DjVu page. |
INCL |
Inclusion chunk. Directs the decoder to process additional (included) files. |
Djbz |
JB2 Shared Dictionary. Is usually present in a file included into two or more pages. |
Sjbz |
JB2 Foreground Mask. |
Smmr |
Foreground mask in MMR-G4 format (see Pseudo-DjVu format). |
BG44 |
IW44 background. |
BGjp |
Background in JPEG format (see Pseudo-DjVu format). |
FG44 |
IW44 foreground colors. When masked by contents of Sjbz or Smmr chunks it forms image displayed by the plug-in in Foreground mode. |
FGjp |
Foreground colors in JPEG format (see Pseudo-DjVu format). |
FGbz |
JB2 Foreground Colors. |
PM44/BM44 |
IW44 data. |
NDIR |
Navigation directory (for OLD_BUNDLED and OLD_INDEXED formats, see New multipage formats). |
ANTa, ANTz |
Decompressed or compressed annotations (chunks with hyperlink information, startup zoom, mode, alignment and background color). |
TXTa, TXTz |
Decompressed or compressed textual information generated by an OCR engine. Used by the plug-in to search. |