Document class which loads a document from a URL. Loads asynchronously, so that a request for a certain page may block. Loads fonts as they are defined in the body of the dvi file. Uses an idvi.display.PageParser object to convert a token stream into one idvi.display.BlockRoot object per page.
Abstract base class. Static functions provide document caching. Provides some utilities for derived classes, such as font management functions and a function to parse the header of a dvi file.
Derived classes are idvi.dvi.DVIStreamDocument and idvi.split.Splitter.
It should be possible to write a derived class which behaves much like xdvi. Such a class would read the postamble in order to define all fonts right away, and scan backwards through the document getting page offsets; then load a page only when it is requested for the first time. This would make a lot of sense if you wanted to write a standalone viewer application, or if the idvi application is extended to leave the document in a single file instead of splitting it up.
Documents with different magfactors can (supposedly -- this is untested!) share a font file. DVIDocumentFont objects contain a DVIFont pointer and a conversion factor to be used when converting font dimensions back to device-independent coordinates for a particular document.
DVI file tokenizer. Hides all information about device-independent coordinates and magnification levels. All externally visible coordinates are integers, at the unscaled resolution specified for pk font files. Requires a DVIDocument pointer, which manages fonts.
In a plain dvi file, the only tokens which will be seen are kTokenCharacter, kTokenRule, kTokenBeginPage, kTokenEndPage, and kTokenPostamble.
In a fancier dvi file, the tokenizer will also generate kTokenPSFile, kTokenBeginLinkAnchor, kTokenBeginNameAnchor, kTokenEndAnchor, kTokenBeginColor, kTokenEndColor, kTokenBeginApplet, kTokenEndApplet, and kTokenParam.
Constants describing the format of a dvi file, and the format of the various specials which are recognized.
This is used by DVITokenizer, and also by idvi.split.Splitter.
Exception which is thrown when an error is detected while reading a dvi file.