Embedding DjVu in HTML
Strings separated by ampersands, and appended to a URL after a question mark is a standard way of passing arguments to a CGI script on the server. DjVu uses these arguments in the client (browser) to control the behavior of the plug-in.
The DjVu plug-in supports a number of attributes that affect how the DjVu document is displayed within the HTML document. While attributes can be specified separately, AT&T recommends using the flags attribute and group the attributes:
Note that you have to specify the attributes for both sets of tags.
The following attributes accept true, yes, false, or no as values. The default is true/yes unless otherwise specified:
toolbar
Determines whether the toolbar is displayed in the DjVu document area.
scrollbars
Determines whether scrollbars are used when the document exceeds the size of the DjVu document area. If disabled, the user scrolls the document using the mouse and the hand cursor.
menu
Determines whether the pop-up menu is enabled.
frame
Determines if a gray border is drawn around the window.
keyboard
Determines whether keyboard input is accepted.
passive
Sets the zoom factor to "Fit Page" and disables toolbar, popup menu, scrollbars and keyboard input. You can enable any of the previous options, append the specific setting such as menu=true. Regardless of whether you set this value to true or false the effect is the same. By default this is not in effect.
links
Determines if hyperlinks are enabled.
logo
Determines if the "DjVu" logo displays in the background of the DjVu document area before the document loads.
thumbnails
Determines whether thumbnails are displayed for multiple page DjVu documents.
DjVu supports the following additional attributes and values:
zoom
Determines the initial zoom of the DjVu document.
Valid values are:
mode
Determines the initial display mode.
Valid values are:
page
Displays the specified page, which may be any valid page number in the DjVu document.
highlight
Creates rectangular highlighted area with given coordinates and specified color. Five arguments separated by commas make up the correct value, as follows:
1st is the X coordinate of the lower-left corner of the highlighted rectangle in document's coordinate system.
2nd is the Y coordinate of the lower-left corner of the highlighted rectangle in document's coordinate system.
3rd is the width of the highlighted rectangle.
4th is the height of the highlighted rectangle.
5th is the highlighting color in RRGGBB format. A special value of FF000000 means to use XOR highlighting. The color may be omitted, in which case XOR highlighting will be assumed.
You can specify more than one highlight attribute. In a multiple page documents, all highlights are applied to the first page or the page specified with the page attribute.
Note, that all the coordinates are internal document coordinates, not screen coordinates.
flags
You can specify any of the attributes in matched pairs, separated by spaces with the whole enclosed in double quotes("). To hide the toolbar and stretch the document to fit, use:
Attributes in the URL
You don't have to use the <embed> or <object> tags to use the display attributes. The DjVu plug-in supports passing display parameters like CGI arguments using the standard anchor (a) tag. After specifying the DjVu document, follow it with a question mark (?) and the tags you want separated by ampersands (&). This is an excellent opportunity to use the flags attribute as follows:
|
||||||||||||||||||||||||