Annotations and Textual Information.

Annotation chunks --- All types of DjVu images may contain annotation chunks. Annotation chunks are currently used to describe hyperlinks as well as specifying more closely the behavior of the viewers. Annotation chunks can be edited with the DjVu editor djedit. Annotation chunks can be inserted or removed using command djvuiff. Annotations are contained in "ANTa" or "ANTz" chunks. The "ANTa" chunks contain the annotation in plain text. The "ANTz" chunks contain the same information compressed with the BZZ encoder (cf. BSByteStream.h). The syntax of the uncompressed annotation chunk uses a simple parenthesized notation. Erroneous and unrecognized constructs are silently ignored. The following constructs are recognized:

(background <color>)
Sets the color of the viewer area surrounding the DjVu image. The color argument color are always represented using X11 syntax #RRGGBB. For instance #000000 is black and #FFFFFF is white.

(zoom <zoom-value>)
Sets the initial zoom factor of the image. Argument zoom-value may be stretch, one2one, width, page, or composed of the letter "d" followed by a number between 1 and 999 (such as in d300 for instance.)

(mode <mode-value>)
Sets the display mode for the image. Argument mode-value may be color, bw, fore or back.

(align <horz-align> <vert-align>)
Specifies how the image should be aligned on the viewer surface. By default the image is located in the center. Argument horz-align may be left, center, or right. Argument vert-align may be top, center, or bottom.

(maparea <url> <comment> <area> <...options...>
Defines an hyperlink for the URL specified by argument url.

Argument url may have one of the following two forms:

            "<href>"
            (url "<href>" "<target>")
       
where href is a string representing the URL and target is a string representing the target frame for the hyperlink (cf. Documentation for the HTML tag <A>). Both strings are surrounded with double quotes. Argument comment is a string surrounded by double quotes. This string may be displayed as a tooltip when the user moves the mouse over the hyperlink. Argument area defines the shape of the hyperlink. The following options are supported for representing rectangle, circle, or polygons.
            (rect <xmin> <ymin> <width> <height>)
            (oval <xmin> <ymin> <width> <height>)
            (polygon <x0> <y0> <x1> <y1> ....)
       
All parameters are numbers representing coordinates measured in image pixels with the origin set at the bottom left corner of the image. The remaining arguments describe options regarding the hyperlink borders. A first set of option define the type of the borders:
            (xor)
            (border <color>
            (shadow_in [<thickness>])
            (shadow_out [<thickness>])
            (shadow_ein [<thickness>])
            (shadow_eout [<thickness>])
       
where parameter color has syntax #RRGGBB (as above) and parameter thickness is a number from 1 to 32. The last four border modes are only supported with rectangular areas. The border becomes visible when the user moves the mouse over the hyperlink. The border may be made always visible by using the following option:
            (border-avis)
       
Finally the following option may be used with rectangular areas only. The complete area will be hilited using the specified color (specified with syntax #RRGGBB as usual).
            (hilite <color>)
       
This is often used with an empty URL for simply emphasizing a specific segment of an image.

Textual Information Chunks --- DjVu image files also contain a computer readable description of the text appearing on the page. This information is contained by either a "TXTa" chunk or "TXTz" chunk. The "TXTa" chunk contains uncompressed data. The "TXTz" chunk contains the same data compressed with the bzz compressor (cf. BSByteStream.h). The "TXTa" chunks begins by a 24 bit integer (most significant byte first) describing the length of the text in bytes. Then come the ISO10646/UTF8 text. Additional information indicates the position of each column/region/paragraph/line/word in the document. More information about the capabilities of the chunk can be found in section DjVuTXT. More information about the encoding of textual information can be found in file "DjVuAnno.cpp".

Alphabetic index Hierarchy of classes


DjVu is a trademark of LizardTech, Inc.
All other products mentioned are registered trademarks or trademarks of their respective companies.