The XPS Print API also supports a progress event so an application can know about other spooling activity. L"ERROR: CoInitializeEx failed with HRESULT 0x%X\n", hr) Ĭreate a completion event, which the XPS Print API uses to notify the application when the print spooler has received the entire document from the application. If (FAILED(hr = CoInitializeEx(0, COINIT_MULTITHREADED))) Initialize the COM interface, if the application has not Initialize the COM interface, if the application has not already done so. For more information about using an XPS OM, see the XPS Document API. It is also possible to create an XPS document without sending it to a printer by using the XPS Document API and maintaining it as an XPS OM or by saving the XPS OM as an XPS document. In the following example, the XPS document is created as it is sent to the printer by the XPS Print API. The XPS Print API requires an XPS document to print. Close the IXpsOMPackageWriter Interface.Create an IXpsOMPackageWriter Interface.Using the XPS Print API to print a document from an application involves the following steps. Once an XPS document has been created, the application can use the XPS Print API to print it. The Common XPS Document Programming Tasks help topic describes how to do this. An application can create an XPS document by using the XPS Document API. The XPS Print API enables native Windows applications to print XPS documents. XPS Support in Earlier Versions of Windowsįor more information about XPS printing for printer driver developers, see XPSDrv Printer Driver.This topic describes how to use the XPS Print API to print from a Windows application. The XPS Document format is identical to the "print" format and effectively preserves application content and user intent. The XAML tags in the XPS spool file are XAML representations for existing rendering classes in WPF. Therefore, documents that are described in the XPS spool file can be rendered natively in WPF without data or fidelity loss because no conversion is necessary. The markup in the XPS spool file to describe XPS Documents is compatible with the Extensible Application Markup Language (XAML) markup in Windows Presentation Foundation (WPF). The XPS spool file is open and extensible, can be viewed by using platform services, and can be reintroduced into document workflows. The XPS spool file uses the XPS Document format. By using the XPS Document format throughout the print processing, you can eliminate the need for any document format conversions between an application and the printer, so you can deliver a "what you see is what you get" (WYSIWYG) experience. Fidelity and performance improve when the document format is the same as the spool file format and the PDL. If you consistently use XPS throughout a document cycle, you can greatly improve print predictability and reliability. The XPS Document format serves as a document format, a spool file format, and a page description language (PDL) for printers. The XPS Document format consists of XML markup that defines the layout of a document and the visual appearance of each page along with rendering rules for displaying or printing the document. This specification describes the appearance of fixed-format documents by using a structured, XML-based document format. The XML Paper Specification (XPS) is the foundation for document and printing improvements in Windows Vista. With an XPSDrv printer driver, the XPS Document format is used as a spool file format and as a document file format. The XPSDrv printer driver extends Microsoft's GDI-based, version 3 printer driver architecture to support consuming XML Paper Specification (XPS) documents. We recommend that you use Microsoft's IPP inbox class driver, along with Print Support Apps (PSA), to customize the print experience in Windows 10 and 11 for printer device development.įor more information, see the Print support app design guide.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |