TOC PREV NEXT INDEX


Specifying document attributes

DjVu products provide several unique document attributes that you can specify using either <embed> or <object> tags, or CGI-style arguments.

Using <embed> or <object> tags

You can specify attributes using the following flags in the <embed> or <object> tags. All flags and their values are case-insensitive and can be specified as either yes or no, or true or false.

Name
Description
flags="..."
Allows any of the flags described here to be assigned in any valid combination. When you use multiple attributes, enclose them in quotation marks and separate them with spaces.
For example: flags="menu=false frame=true logo=yes zoom=width mode=color toolbar=top,auto-print"

"cache=yes/no"
Disables or enables caching of fully decoded pages of a DjVu document.
"frame=yes/no"
Disables or enables the gray border that frames DjVu documents.
"highlight=x,y,w,h[,c]"
Creates a rectangular highlighted area with given coordinates and color. The parameters are defined as follows:
  • x is the X coordinate of the lower-left corner of the highlighted rectangle in the document's coordinate system.
  • y is the Y coordinate of the lower-left corner of the highlighted rectangle in the document's coordinate system.
  • w is the width of the highlighted rectangle.
  • h is the height of the highlighted rectangle.
  • c is the highlighting color in RRGGBB format. A special value of FF000000 indicates to use XOR highlighting. The color may be omitted, in which case XOR highlighting will be assumed.

For example: "highlight=10,10,300,400,FF00FF"
"keyboard=yes/no"
Disables or enables the use of keyboard shortcuts.
"links=yes/no"
Disables or enables hyperlinks.
"logo=yes/no"
Disables or enables the DjVu logo.
"menu=yes/no"
Disables or enables the pop-up menu.
"mode=color"
"mode=bw"
"mode=fore"
"mode=back"
Sets the initial display mode as Color, Black and White, Foreground, or Background.
"page=ID"
Displays the specified page, which can be any valid page ID in the DjVu document referred by the <embed> tag.
"passive"
Disables the toolbar, pop-up menu, and keyboard shortcuts and sets the default zoom level to Fit Page. If the parameter "passive" is set, then the above items are disabled.
"scrollbars=yes/no"
Disables or enables the scrollbar.
"stretch=yes/no"
Disables or enables scrollbars and panning. By default, these are enabled.
"thumbnails=left/top/right/bottom"
Specifies where thumbnails appear in the browser window. By default, thumnails appear on the left.
"thumbnails=yes/no"
Disables or enables thumbnails, which are disabled by default. (The user can enable thumbnails by choosing Show Thumbnails from the pop-up menu.)
NOTE This tag is supported only in Windows.
"zoom=number"
"zoom=one2one"
"zoom=width"
"zoom=page"
"zoom=stretch"
Sets the initial zoom level as a percentage, One to One, Fit Width, Fit Page, or Stretch.
"toolbar=[bar_flag,bar_flag,...]+ [button_flag,button_flag,...]" or "toolbar=[bar_flag,bar_flag,...]- [button_flag,button_flag,...]"
Disables or enables the toolbar and sets toolbar conditions. (The user can also enable the toolbar in the Preferences dialog box, if the pop-up menu is enabled.)
To set the toolbar and enable/disable buttons, the following options apply:

bar_flag is one of the following:

yes,no,true,false,top,bottom,auto,fixed

button_flag is one of fore_button,back_button,color_button,bw_button,

button_flag is one of the following:

zoom,rescombo,pan,zoomsel,

save,rotate,backforw,print,
pagecombo,firstlastpage,

prevnextpage


+ means that only the buttons contained within the brackets will be displayed.
- means that the entire toolbar will be displayed except for the specified buttons.
For example, "toolbar=[auto,top]-[rotate,print,save]" will display the entire toolbar on the top of the viewing window with autohide enabled, but without the Rotate, Print and Save buttons.
"toolbar=[auto,top]+[rotate,print,save]" will display the toolbar on the top of the viewing window with autohide enabled and only with the Rotate, Print and Save buttons.


CGI-style arguments

CGI-style arguments use the same flag names and values listed above but specify them differently. To specify a CGI-style argument, append it to the document's URL after the "?" sign, separating flags with "&" signs. CGI-style arguments can also be used inside an html page.

To separate the DjVu arguments from other CGI-style arguments, precede the set of DjVu arguments with the string "djvuopts&".

For example, the following argument disables the pop-up menu and toolbar:

image.djvu?djvuopts&menu=No&toolbar=No

Note that CGI-style arguments are supported only for Web-served documents. CGI-style arguments for local file URLs ("file://...") are not supported.


LizardTech Web page
TOC PREV NEXT INDEX