Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using Xps Common Scenarios in Xps. Overview PrintingLoadingSerializingManipulating.

Similar presentations

Presentation on theme: "Using Xps Common Scenarios in Xps. Overview PrintingLoadingSerializingManipulating."— Presentation transcript:

1 Using Xps Common Scenarios in Xps

2 Overview PrintingLoadingSerializingManipulating

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

4 Printing PrintDialogXpsDocumentWriter SimpleControlled/Advanced SynchronousAsynchronous Works in Partial Trust Special Case for Partial Trust No Access to Print Tickets Access to Print Tickets

5 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

6 Asynchronous Printing Progress call backs Cancel call backs Completion callbacks

7 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

8 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

9 Loading Xps Deferred Loading Using the Package Store Using Xaml Parser

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

11 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.

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

13 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

14 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

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

16 Processing Xps Documents DisplayingSigningMerging Generating Thumbnails

17 Displaying Xps Components Simple – DocumentViewer Pages are Visuals that can be displayed through visual brushes

18 Signing Acquiring a certificate Iterating the Signature Definitions Effectively using IsSignable Testing if a signature is valid

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

20 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.

Download ppt "Using Xps Common Scenarios in Xps. Overview PrintingLoadingSerializingManipulating."

Similar presentations

Ads by Google