Annotations¶
See also
Lizardtech DjVu Reference: 8.3.4 Annotation Chunk;
djvused manual: Annotation syntax.
- class djvu.decode.Annotations¶
Abstract base for document and page annotations.
Inheritance diagram:
- wait()¶
Wait until the associated S-expression is available.
- sexpr¶
- Returns
the associated S-expression.
- Return type
- Raises
NotAvailable – if the S-expression is not available; then,
PageInfoMessage
messages with emptypage_job
may be emitted.JobFailed – on failure.
- class djvu.decode.DocumentAnnotations(document[, shared=True])¶
If shared is true and no document-wide annotations are available, shared annotations are considered document-wide.
See also
Actual and proposed changes to the DjVu format: Document annotations and metadata.
Mapareas (overprinted annotations)¶
See also
Lizardtech DjVu Reference: 8.3.4.2 Maparea (overprinted annotations).
- class djvu.decode.Hyperlinks(annotations)¶
A sequence of
(maparea …)
S-expressions.
The following symbols are pre-defined:
- djvu.decode.ANNOTATION_MAPAREA¶
>>> ANNOTATION_MAPAREA Symbol('maparea')
- djvu.decode.MAPAREA_SHAPE_RECTANGLE¶
>>> MAPAREA_SHAPE_RECTANGLE Symbol('rect')
- djvu.decode.MAPAREA_SHAPE_OVAL¶
>>> MAPAREA_SHAPE_OVAL Symbol('oval')
- djvu.decode.MAPAREA_SHAPE_POLYGON¶
>>> MAPAREA_SHAPE_POLYGON Symbol('poly')
- djvu.decode.MAPAREA_SHAPE_LINE¶
>>> MAPAREA_SHAPE_LINE Symbol('line')
- djvu.decode.MAPAREA_SHAPE_TEXT¶
>>> MAPAREA_SHAPE_TEXT Symbol('text')
- djvu.decode.MAPAREA_URI¶
>>> MAPAREA_URI Symbol('url')
- djvu.decode.MAPAREA_URL¶
Equivalent to
MAPAREA_URI
.
Border style¶
See also
Lizardtech DjVu Reference: 8.3.4.2.3.1.1 Border type, 8.3.4.2.3.1.2 Border always visible.
The following symbols are pre-defined:
- djvu.const.MAPAREA_BORDER_NONE¶
>>> MAPAREA_BORDER_NONE Symbol('none')
- djvu.const.MAPAREA_BORDER_XOR¶
>>> MAPAREA_BORDER_XOR Symbol('xor')
- djvu.const.MAPAREA_BORDER_SOLID_COLOR¶
>>> MAPAREA_BORDER_SOLID_COLOR Symbol('border')
- djvu.const.MAPAREA_BORDER_SHADOW_IN¶
>>> MAPAREA_BORDER_SHADOW_IN Symbol('shadow_in')
- djvu.const.MAPAREA_BORDER_SHADOW_OUT¶
>>> MAPAREA_BORDER_SHADOW_OUT Symbol('shadow_out')
- djvu.const.MAPAREA_BORDER_ETCHED_IN¶
>>> MAPAREA_BORDER_ETCHED_IN Symbol('shadow_ein')
- djvu.const.MAPAREA_BORDER_ETCHED_OUT¶
>>> MAPAREA_BORDER_ETCHED_OUT Symbol('shadow_eout')
- djvu.const.MAPAREA_SHADOW_BORDERS¶
A sequence of all shadow border types.
>>> MAPAREA_SHADOW_BORDERS (Symbol('shadow_in'), Symbol('shadow_out'), Symbol('shadow_ein'), Symbol('shadow_eout'))
- djvu.const.MAPAREA_BORDER_ALWAYS_VISIBLE¶
>>> MAPAREA_BORDER_ALWAYS_VISIBLE Symbol('border_avis')
The following numeric constant are pre-defined:
Highlight color and opacity¶
See also
Lizardtech DjVu Reference: 8.3.4.2.3.1.3 Highlight color and opacity.
The following symbols are pre-defined:
The following numeric constant are pre-defined:
Line and text parameters¶
See also
Lizardtech DjVu Reference: 8.3.4.2.3.1.4 Line and Text parameters.
The following symbols are pre-defined:
- djvu.const.MAPAREA_ARROW¶
>>> MAPAREA_ARROW Symbol('arrow')
- djvu.const.MAPAREA_LINE_WIDTH¶
>>> MAPAREA_LINE_WIDTH Symbol('width')
- djvu.const.MAPAREA_LINE_COLOR¶
>>> MAPAREA_LINE_COLOR Symbol('lineclr')
- djvu.const.MAPAREA_BACKGROUND_COLOR¶
>>> MAPAREA_BACKGROUND_COLOR Symbol('backclr')
- djvu.const.MAPAREA_TEXT_COLOR¶
>>> MAPAREA_TEXT_COLOR Symbol('textclr')
- djvu.const.MAPAREA_PUSHPIN¶
>>> MAPAREA_PUSHPIN Symbol('pushpin')
The following numeric constants are pre-defined:
- djvu.const.MAPAREA_LINE_MIN_WIDTH¶
>>> MAPAREA_LINE_MIN_WIDTH 1
The following default colors are pre-defined:
Initial document view¶
See also
Lizardtech DjVu Reference: 8.3.4.1 Initial Document View.
The following symbols are pre-defined:
Metadata¶
See also
Actual and proposed changes to the DjVu format (Metadata Annotations, Document Annotations and Metadata).
- class djvu.decode.Metadata¶
A metadata mapping.
The following sets contain noteworthy metadata keys:
- djvu.const.METADATA_BIBTEX_KEYS¶
Keys borrowed from the BibTeX bibliography system.
>>> for key in sorted(METADATA_BIBTEX_KEYS): ... print(repr(key)) ... Symbol('address') Symbol('annote') Symbol('author') Symbol('booktitle') Symbol('chapter') Symbol('crossref') Symbol('edition') Symbol('editor') Symbol('howpublished') Symbol('institution') Symbol('journal') Symbol('key') Symbol('month') Symbol('note') Symbol('number') Symbol('organization') Symbol('pages') Symbol('publisher') Symbol('school') Symbol('series') Symbol('title') Symbol('type') Symbol('volume') Symbol('year')
- djvu.const.METADATA_PDFINFO_KEYS¶
Keys borrowed from the PDF DocInfo.
>>> for key in sorted(METADATA_PDFINFO_KEYS): ... print(repr(key)) ... Symbol('Author') Symbol('CreationDate') Symbol('Creator') Symbol('Keywords') Symbol('ModDate') Symbol('Producer') Symbol('Subject') Symbol('Title') Symbol('Trapped')
- djvu.const.METADATA_KEYS¶
Sum of
METADATA_BIBTEX_KEYS
andMETADATA_PDFINFO_KEYS
.
The following symbols are pre-defined:
- djvu.const.ANNOTATION_METADATA¶
>>> ANNOTATION_METADATA Symbol('metadata')