The XML Paper Specification describes the XPS document format and how it is organized internally and rendered externally. The Open Packaging Conventions describes how the parts of an XPS document are packaged for physical storage or transmission.
An XPS document is composed of modular parts and resources that are organized in a logical hierarchy. The format of the content and the organization of these parts and resources are specified in the XML Paper Specification. Figure 1 shows the parts of a sample XPS document in their logical hierarchy.
Figure 1. Logical Document-Part Hierarchy of an XPS Document
As an open specification, the XPS document format can be used to publish documents for end users who might be using computer systems and operating systems that are different from those that the author used to create the document. To be viewed, an XPS document does not require the original authoring application.
Although the XML Paper Specification describes the format for the content and the logical organization of the parts of an XPS document, the Open Packaging Conventions specifies the actual physical storage and organization of the document parts. It is important to understand this relationship because XPS documents can, and should, be optimized at both levels:
· The content and organization of the document parts that make up an XPS document can be optimized to represent the document content most efficiently.
· The physical storage can be managed and organized at the packaging layer so that the physical storage, transmission, and processing of the document can be made as efficient as possible.
This paper describes how you can create more efficient XPS documents from your application at both of these levels. In general, to provide the best document quality, the best end-user experience, and the most efficient document files at the same time, you should:
· Make the document markup as efficient as possible.
· Use the image format and compression level that provides the best image in the smallest space and still meets the requirements of the document. After the image has been compressed, do not compress it any further in the packaging layer. Compressing a compressed image reduces the overall file size but adds additional processing cost.
· Use font subsetting.
· Use the packaging layer compression options to compress the text and document markup in the packaging layer.