Using Xps Common Scenarios in Xps Overview Printing

  • Slides: 20
Download presentation
Using Xps Common Scenarios in Xps

Using Xps Common Scenarios in Xps

Overview Printing Loading Serializing Manipulating

Overview Printing Loading Serializing Manipulating

Session Goals Outline Common Scenarios Highlight Developer Choices Warn of Common Mistakes

Session Goals Outline Common Scenarios Highlight Developer Choices Warn of Common Mistakes

Printing Print. Dialog Xps. Document. Writer Simple Controlled/Advanced Synchronous Asynchronous Works in Partial Trust

Printing Print. Dialog Xps. Document. Writer Simple Controlled/Advanced Synchronous Asynchronous Works in Partial Trust Special Case for Partial Trust No Access to Print Tickets

Print Queue Entry point to advanced printing Can be accessed from the Print Dialog

Print Queue Entry point to advanced printing Can be accessed from the Print Dialog Access to Print Capabilities Access to Status Access to default Print Ticket

Asynchronous Printing Progress call backs Cancel call backs Completion callbacks

Asynchronous Printing Progress call backs Cancel call backs Completion callbacks

Print Ticket Reading user settings from Print Tickets Associating print tickets during printing Acquiring

Print Ticket Reading user settings from Print Tickets Associating print tickets during printing Acquiring default Print tickets No Print Ticket in Partial Trust De-serialization does not maintain print tickets

Orientation and Layout Objects may need to be translated to fit in the visible

Orientation and Layout Objects may need to be translated to fit in the visible area. XPS Serialization does not re-layout based on orientation The drawing is clipped to the union of the viewable area and the rectangle defined by the fixed page size. Some Options Transform the Fixed Page Re-Layout the Fixed Page

Loading Xps Deferred Loading Using the Package Store Using Xaml Parser

Loading Xps Deferred Loading Using the Package Store Using Xaml Parser

Deferred Loading Documents and Pages are loaded on access The Fixed Class maintain only

Deferred Loading Documents and Pages are loaded on access The Fixed Class maintain only weak references

Package Store The Package Store prevents the need to continually re-open the Package to

Package Store The Package Store prevents the need to continually re-open the Package to access the internal parts. Keep documents open until though displaying them. Creating an Xps Document with a stream requires the user to manage the Package Store Loading Xps Documents with out the package in the Package store works but is very slow.

Serialization Write once “Fixed” content Fonts are sub-set Some Fonts are restricted Documents can

Serialization Write once “Fixed” content Fonts are sub-set Some Fonts are restricted Documents can be interleaved for simultaneous production and consumption

Font Subsetting All the needed fonts are stored in the document. Only the needed

Font Subsetting All the needed fonts are stored in the document. Only the needed glyphs are stored in the fonts. Printing might need different levels of granularity on sub-setting

Restricted Fonts Licensing Right Intent Installable embedding Restricted license embedding – Relationship Preview and

Restricted Fonts Licensing Right Intent Installable embedding Restricted license embedding – Relationship Preview and print embedding - Obfuscated Editable embedding No subsetting Bitmap embedding only – glyphs converted to images

Interleaving Triggered by opening document with Write access. Used for simultaneous generation and consumption.

Interleaving Triggered by opening document with Write access. Used for simultaneous generation and consumption. “Image Last” option designed for Web consumption

Processing Xps Documents Displaying Signing Merging Generating Thumbnails

Processing Xps Documents Displaying Signing Merging Generating Thumbnails

Displaying Xps Components Simple – Document. Viewer Pages are Visuals that can be displayed

Displaying Xps Components Simple – Document. Viewer Pages are Visuals that can be displayed through visual brushes

Signing Acquiring a certificate Iterating the Signature Definitions Effectively using Is. Signable Testing if

Signing Acquiring a certificate Iterating the Signature Definitions Effectively using Is. Signable Testing if a signature is valid

Merging New documents can be created from other documents This technique only works if

Merging New documents can be created from other documents This technique only works if the source documents are serialized (not formed in memory)

Generating Thumbnails Create a bitmap of a page by render to target Encode the

Generating Thumbnails Create a bitmap of a page by render to target Encode the bitmap to a jpeg using encoders Write the stream to an Xps Thumbnail © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.