A document processing system controls the printing of documents represented in page description language form. Documents are represented by a page description language which is structured so that definition and declaratory commands are positioned only at the beginning of each distinct document segment. Each document has prologue sections, which contain definition and declaratory commands, and content portions which contain the specific tokens or commands for defining specific images. The definition and declaratory commands in the prologue sections of the document are arranged in a hierarchical tree so that each definition and declaratory command has a scope corresponding to the portion of the hierarchical tree subtended by that command. A structure processor handles resource declaration and definitions, dictionary generation, context declarations and references to data external to the document. A content processor processes the tokens using the definitions and declarations set up by the structure processor, and an imaging driver module translates the document into commands suitable for any of several types of printers, as well as for communication by telephone line to a remote device. One feature of the document processing system is the ability to query a remote device to determine whether it has the resources required for processing a document transmitted in a high level encoded form. It then either transmits the document in rasterized bit map form if the required resources are not available, or transmits the document in a higher level encoded form if the required resources are available.