XPS Document API Programming Samples
This section describes the sample programs that demonstrate how to use different aspects of the XPS Document API. These sample programs are available in the Microsoft Windows SDK and they can also be downloaded from the XPS Programming Samples on MSDN Code Gallery.
XpsFlowText demonstrates how to place a DirectWrite text layout on an XPS Canvas and then save it as an XPS document.
XpsLoadModifySave demonstrates how to load an XPS document from a stream and how to modify and save the document.
XpsMailMerge demonstrates how to use named fields in an XPS document to merge data into the document programmatically.
XpsOMPrint demonstrates how to print an XPS OM by using the XPS Print API.
XpsOnePage demonstrates how to create an XPS document with one blank page and write it to a file.
XpsRollup combines multiple XPS documents into a single document and renames the resource parts to prevent part name conflicts.