<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Feng Yuan (袁峰) : XPS, Printing</title><link>http://blogs.msdn.com/fyuan/archive/tags/XPS_2C00_+Printing/default.aspx</link><description>Tags: XPS, Printing</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Anatomy of Radial Gradient Brush</title><link>http://blogs.msdn.com/fyuan/archive/2006/05/09/594078.aspx</link><pubDate>Wed, 10 May 2006 02:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:594078</guid><dc:creator>fyuan</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/fyuan/comments/594078.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fyuan/commentrss.aspx?PostID=594078</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fyuan/rsscomments.aspx?PostID=594078</wfw:comment><description>&lt;P&gt;WPF(Windows Presentation Foundation) and XPS (Open XML Paper Specification) supports five types of brushes. They are solid color brush, linear gradient brush, radial gradient brush, image brush, and visual brush. This posting will discuss the 'shape' of radial gradient brushes.&lt;/P&gt;
&lt;P&gt;The shape of a WPF/XPS radial gradient brush is defined by three attributes:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Center 
&lt;LI&gt;GradientOrigin 
&lt;LI&gt;Radius&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Here is a simple radial gradient brush in XAML:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;lt;RadialGradientBrush SpreadMethod="Repeat" Center="0.5,0.5" RadiusX="0.2" RadiusY="0.2" GradientOrigin="&lt;STRONG&gt;0.5,0.5&lt;/STRONG&gt;"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RadialGradientBrush.GradientStops&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GradientStopCollection&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GradientStop Color="blue" Offset="1" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GradientStop Color="yellow" Offset="0" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/GradientStopCollection&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/RadialGradientBrush.GradientStops&amp;gt;&lt;BR&gt;&amp;lt;/RadialGradientBrush&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;IMG height=300 src="http://blog.fengyuan.com/radial0.PNG" width=300&gt; &lt;/P&gt;
&lt;P&gt;The best way to understand a radial gradient brush is to look it using a series of paramterized ellipses, with parameter t.&lt;/P&gt;
&lt;P&gt;The brush originates at GradientOrigin, with t= 0,&amp;nbsp;color from GradientStopCollection at offset 0, and radius (0, 0).&lt;/P&gt;
&lt;P&gt;When t = 1, it complets its first cycle. The ellipses is centered around Center, with t&amp;nbsp;= 1, color from GradientStopCollections at offset 1, and radisu (RadiusX, RadiusY).&lt;/P&gt;
&lt;P&gt;Here is the generic formulas for a radial gradient brush's ellipses:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;Center:&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;GradientOrigin (1 - t) + Center&amp;nbsp; * t&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Radius:&amp;nbsp; &lt;STRONG&gt;(RadiusX * t,&amp;nbsp;RadiusY * t)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Color:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;GradientStopCollection[t mod 1]&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P dir=ltr&gt;The centers for these ellipses move along the straight line from GradientOrigin to Center. After the first cycle is completed, they continue to move along the line.&lt;/P&gt;
&lt;P dir=ltr&gt;Radii are simply increasing proportionally with t.&lt;/P&gt;
&lt;P dir=ltr&gt;Color is a periodical function of t. But you also need to consider SpreadMethod to make it right.&lt;/P&gt;
&lt;P dir=ltr&gt;&lt;FONT size=5&gt;&lt;U&gt;GradientOrigin&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P dir=ltr&gt;Normally, center and origin are the same point. These ellipses are then cocentric curves. But when origin is moving away from center, they can become quite interesting.&lt;/P&gt;
&lt;P dir=ltr&gt;If we move GradientOrigin from (0.5, 0.5) to (0.4, 0.5), this is what we get:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;lt;RadialGradientBrush SpreadMethod="Repeat" Center="0.5,0.5" RadiusX="0.2" RadiusY="0.2" GradientOrigin="&lt;STRONG&gt;&lt;FONT style="BACKGROUND-COLOR: #ffffff"&gt;0.4&lt;/FONT&gt;,0.5&lt;/STRONG&gt;"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RadialGradientBrush.GradientStops&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GradientStopCollection&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GradientStop Color="blue" Offset="1" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GradientStop Color="yellow" Offset="0" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/GradientStopCollection&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/RadialGradientBrush.GradientStops&amp;gt;&lt;BR&gt;&amp;lt;/RadialGradientBrush&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG style="WIDTH: 310px; HEIGHT: 287px" height=300 src="http://blog.fengyuan.com/radial1.PNG" width=300&gt; &lt;/P&gt;
&lt;P dir=ltr&gt;If we further move GradientOrigin from (0.4, 0.5) to (0.3, 0.5), something drastic happens:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;lt;RadialGradientBrush SpreadMethod="Repeat" Center="0.5,0.5" RadiusX="0.2" RadiusY="0.2" GradientOrigin="&lt;STRONG&gt;&lt;FONT style="BACKGROUND-COLOR: #ffffff"&gt;0.3&lt;/FONT&gt;,0.5&lt;/STRONG&gt;"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RadialGradientBrush.GradientStops&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GradientStopCollection&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GradientStop Color="blue" Offset="1" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GradientStop Color="yellow" Offset="0" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/GradientStopCollection&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/RadialGradientBrush.GradientStops&amp;gt;&lt;BR&gt;&amp;lt;/RadialGradientBrush&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG height=300 src="http://blog.fengyuan.com/radial2.PNG" width=300&gt;&lt;/P&gt;
&lt;P&gt;Instead of having gradual changing ellipses filling the whole plane, only half of the plane is filled with ellipses; the other is filled with color at gradient stop 1. This breaking change happens when the distance between center and origin points equals radius.&lt;/P&gt;
&lt;P&gt;If we move the origin further away, the ellipses fill an even smaller (triangular) shape:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;lt;RadialGradientBrush SpreadMethod="Repeat" Center="0.5,0.5" RadiusX="0.2" RadiusY="0.2" GradientOrigin="&lt;STRONG&gt;&lt;FONT style="BACKGROUND-COLOR: #ffffff"&gt;0.2&lt;/FONT&gt;,0.5&lt;/STRONG&gt;"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RadialGradientBrush.GradientStops&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GradientStopCollection&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GradientStop Color="blue" Offset="1" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;GradientStop Color="yellow" Offset="0" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/GradientStopCollection&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/RadialGradientBrush.GradientStops&amp;gt;&lt;BR&gt;&amp;lt;/RadialGradientBrush&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG height=300 src="http://blog.fengyuan.com/radial3.PNG" width=300&gt; &lt;/P&gt;
&lt;P&gt;The angle of the triangle can be calculated using:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;STRONG&gt;2* arctan(radius / distance(center,origin))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=594078" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fyuan/archive/tags/XPS_2C00_+Printing/default.aspx">XPS, Printing</category></item><item><title>Zoran announces XPS rendering support for printers </title><link>http://blogs.msdn.com/fyuan/archive/2006/01/19/514972.aspx</link><pubDate>Thu, 19 Jan 2006 22:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:514972</guid><dc:creator>fyuan</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/fyuan/comments/514972.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fyuan/commentrss.aspx?PostID=514972</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fyuan/rsscomments.aspx?PostID=514972</wfw:comment><description>&lt;P class=spip&gt;&lt;STRONG class=spip&gt;Sunnyvale, Calif.&lt;/STRONG&gt; - January 17, 2005 - Zoran Corporation (Nasdaq: ZRAN) announced that its IPS/XPS interpreter for Microsoft’s new XPS Document format will be available to printer and multifunction peripheral (MFP) manufacturers through an Early Adopter Program..&lt;/P&gt;
&lt;P class=spip&gt;&lt;A href="http://www.zoran.com/Zoran-Announces-Enhanced"&gt;http://www.zoran.com/Zoran-Announces-Enhanced&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=514972" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fyuan/archive/tags/XPS_2C00_+Printing/default.aspx">XPS, Printing</category></item><item><title>Optimize XPS markup</title><link>http://blogs.msdn.com/fyuan/archive/2006/01/18/514450.aspx</link><pubDate>Wed, 18 Jan 2006 22:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:514450</guid><dc:creator>fyuan</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/fyuan/comments/514450.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fyuan/commentrss.aspx?PostID=514450</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fyuan/rsscomments.aspx?PostID=514450</wfw:comment><description>&lt;P&gt;XPS is hot, so naturally more and more applications will be generating XPS. If your application has access to the XPS Document Writer, then the easiest way to generate XPS is just print to it. But there are cases you may want to generate XPS on your own, either because you can't use the XPS Document Writer, or you want a better solution.&lt;/P&gt;
&lt;P&gt;In case you want to generate XPS on your own, here are a few tips on how to generate better XPS markup:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Read the XPS spec. Understand what is really supported and what is not. 
&lt;LI&gt;Play with the XPS Document Writer, just to see what kind of markup is generated by it. Remember the XPS Document Writer is also improving. 
&lt;LI&gt;Play with XPS markup using XamlPad. XPS is a subset of XAML, so you can edit a little piece of XPS markup in XamlPad and see how is it rendered. 
&lt;LI&gt;Check default values. If an attribute has a default value and the current value matches it, it does not need to be written down. 
&lt;LI&gt;Use Canvas element. If a group of primitives share the same transformation, clipping, opacity, opacity mask, group them in a Canvas, set those attributes only once. But do not use Canvas to group a single primitive. 
&lt;LI&gt;Use shorthand form for Path geometry, avoid using the Element from of Path if possible. 
&lt;LI&gt;Use ResourceDictionary, if a gradient brush, image brush, or visual brush is used multiple times, put it into Resource Dictionary and reference to it. 
&lt;LI&gt;Use integers. By default, coordinates in XPS is in 96-dpi, so to specify coordinates in higher resolution, you need to use floating point numbers. If you have lots of vector data, it will reduce markup size if you introduce a transformation at the top to increase the resolution to say, 600-dpi, and then use integers underneath. If you use floating point, your data would most likely to be in the form of xxx.yy; if you use integers, it could be zzzz, saving 2 bytes per number. 
&lt;LI&gt;Optimize images: check image dimension, check image pixel format, check image compression, reuse image within the whole document. 
&lt;LI&gt;Optimize fonts: use font subsetting. 
&lt;LI&gt;Optimize input to your XPS generator: 
&lt;UL&gt;
&lt;LI&gt;Remove anything with opacity &amp;lt;= 0 
&lt;LI&gt;Remove things with null brush 
&lt;LI&gt;Remove things which are fully clipped. 
&lt;LI&gt;Remve things which are overlapped fully on the top with an opaque object. 
&lt;LI&gt;If OpacityMask is always opaque, remove it. 
&lt;LI&gt;If OpacityMask is solid color brush, just extract the opacity out and mutiply to Opacity attribute. 
&lt;LI&gt;Change degenerated gradient brush to solid color brush. 
&lt;LI&gt;Remove primitives which are out of page boundary. 
&lt;LI&gt;Merge simple primitives with the same brush, pen, font into a single primitive when possible. 
&lt;LI&gt;Merge images adjacent to each other into single image when possible.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;If you have issues and concerns about XPS, talk to us (xpsinfo @ microsoft . com)&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=514450" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fyuan/archive/tags/XPS_2C00_+Printing/default.aspx">XPS, Printing</category></item><item><title>Native Office Support for XPS Annouced</title><link>http://blogs.msdn.com/fyuan/archive/2005/10/29/486810.aspx</link><pubDate>Sat, 29 Oct 2005 21:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:486810</guid><dc:creator>fyuan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/fyuan/comments/486810.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fyuan/commentrss.aspx?PostID=486810</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fyuan/rsscomments.aspx?PostID=486810</wfw:comment><description>&lt;P&gt;Office just annouced native/direct support for XPS document in Office 12. Read more about it:&lt;/P&gt;
&lt;P&gt;Jeff Bell's blog: &lt;a href="http://blogs.msdn.com/jeff_bell/archive/2005/10/27/485937.aspx"&gt;http://blogs.msdn.com/jeff_bell/archive/2005/10/27/485937.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Andy Simonds's blog: &lt;a href="http://blogs.msdn.com/andy_simonds/archive/2005/10/28/486211.aspx"&gt;http://blogs.msdn.com/andy_simonds/archive/2005/10/28/486211.aspx&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=486810" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fyuan/archive/tags/XPS_2C00_+Printing/default.aspx">XPS, Printing</category></item><item><title>The XPS (XML Paper Specification) Depot</title><link>http://blogs.msdn.com/fyuan/archive/2005/09/20/472183.aspx</link><pubDate>Wed, 21 Sep 2005 08:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:472183</guid><dc:creator>fyuan</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/fyuan/comments/472183.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fyuan/commentrss.aspx?PostID=472183</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fyuan/rsscomments.aspx?PostID=472183</wfw:comment><description>One stop shop for XPS information...(&lt;a href="http://blogs.msdn.com/fyuan/archive/2005/09/20/472183.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=472183" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fyuan/archive/tags/XPS_2C00_+Printing/default.aspx">XPS, Printing</category></item><item><title>Printing to Microsoft XPS Document Writer without showing File Save Dialog Box</title><link>http://blogs.msdn.com/fyuan/archive/2005/09/16/469076.aspx</link><pubDate>Fri, 16 Sep 2005 20:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:469076</guid><dc:creator>fyuan</dc:creator><slash:comments>13</slash:comments><comments>http://blogs.msdn.com/fyuan/comments/469076.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fyuan/commentrss.aspx?PostID=469076</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fyuan/rsscomments.aspx?PostID=469076</wfw:comment><description>If you want to use the Microsoft XPS Writer to generate a large amount of XPS Documents, or use it in a server environment, you do not want the File Save dialog box to show up. Solution: specify output file name in DOCINFO passed to StartDoc....(&lt;a href="http://blogs.msdn.com/fyuan/archive/2005/09/16/469076.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=469076" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fyuan/archive/tags/XPS_2C00_+Printing/default.aspx">XPS, Printing</category></item><item><title>DIY generation of XPS Documents </title><link>http://blogs.msdn.com/fyuan/archive/2005/09/15/468029.aspx</link><pubDate>Fri, 16 Sep 2005 02:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:468029</guid><dc:creator>fyuan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/fyuan/comments/468029.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fyuan/commentrss.aspx?PostID=468029</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fyuan/rsscomments.aspx?PostID=468029</wfw:comment><description>Although Microsoft has already provided two ways to generate XPS Documents, there are benefits to generate them on your own. Here is some sample Win32 code for generating XPS Fixedpage markup....(&lt;a href="http://blogs.msdn.com/fyuan/archive/2005/09/15/468029.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=468029" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fyuan/archive/tags/XPS_2C00_+Printing/default.aspx">XPS, Printing</category></item><item><title>Printing to legacy devices in Windows Presentation Foundation</title><link>http://blogs.msdn.com/fyuan/archive/2005/09/13/464399.aspx</link><pubDate>Tue, 13 Sep 2005 10:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:464399</guid><dc:creator>fyuan</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/fyuan/comments/464399.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fyuan/commentrss.aspx?PostID=464399</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fyuan/rsscomments.aspx?PostID=464399</wfw:comment><description>&lt;DIV class=Section1&gt;
&lt;P class=MsoNormal&gt;In the two previous postings, we discussed about two different ways of generating XPS (XML Paper Specification) Documents, one being printing to XPS Document Writer from Win32 applications, and the other being using the new WPF (Windows Presentation Foundation) API. In this article, we will discuss how to print to printers in WPF.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;There are two different printing paths under WPF, although the printing API is completely the same. If a printer device supports XPS Document directly, the print sub-system can just generate an XPS Document and sent to the printer; otherwise, the print sub-system will convert WPF contents to GDI commands and send them to GDI/DDI-based printer drivers (also known as legacy devices). The two printing paths approach isolates application from implementation details, encourages printer manufacturers to innovate to provide customer which better printing quality and performance, while at the same time make all existing printers work seamlessly.&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;In the WIN32 world, GDI-based printing API is centered around DEVMODE for printing settings, &lt;SPAN class=SpellE&gt;GeDeviceCapabilities&lt;/SPAN&gt; for device capability queries, HPRINTER for printer handler, and HDC for passing graphics primitives to GDI and then to printer driver. In the WPF world, DEVMODE has been replaced by &lt;SPAN class=SpellE&gt;PrintTicket&lt;/SPAN&gt; class, &lt;SPAN class=SpellE&gt;GetDeviceCapabilities&lt;/SPAN&gt; has been turned to &lt;SPAN class=SpellE&gt;PrinterCapabilities&lt;/SPAN&gt; class, HPRINTER morphs into &lt;SPAN class=SpellE&gt;PrintQueue&lt;/SPAN&gt; class, and &lt;SPAN class=SpellE&gt;HDC’s&lt;/SPAN&gt; role is now played by Visual and &lt;SPAN class=SpellE&gt;UIElement&lt;/SPAN&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;In the XPS Document generation code, we used a very simple Visual. This time, let’s try something little bit more complicated. We would like to generate Visual which reflects the size of the paper it’s going to be printed on, and we want to use more complicated brushes to illustrate internal printing implementation. Here is the Visual generation code we are using:&lt;o:p&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;static&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; Visual CreateVisual(PrintTicket ticket)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;double&lt;/SPAN&gt; width&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;= ticket.PageMediaSize.MediaSizeX;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;double&lt;/SPAN&gt; height = ticket.PageMediaSize.MediaSizeY;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (ticket.PageOrientation.Value == PrintSchema.OrientationValue.Landscape)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;double&lt;/SPAN&gt; t = width; width = height; height = t;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;const&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;double&lt;/SPAN&gt; Inch = 96;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;DrawingVisual visual = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; DrawingVisual();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;DrawingContext dc = visual.RenderOpen();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Pen dotPen = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; Pen(Brushes.Black, 0.5);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;dotPen.DashStyle = DashStyles.Dot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;dc.DrawRectangle(null, dotPen, &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; Rect(Inch / 4, Inch / 4, width - Inch / 2, height - Inch / 2));&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;LinearGradientBrush vertical = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; LinearGradientBrush(Colors.Yellow, Colors.Blue, 90);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;dc.DrawRectangle(vertical, null, &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; Rect(Inch / 2, Inch / 2, Inch * 1.5, Inch * 1.5));&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;LinearGradientBrush horizontal = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; LinearGradientBrush(Colors.Red, Colors.Green, 0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;horizontal.Opacity = 0.6;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;dc.DrawEllipse(horizontal, null, &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; Point(Inch * 2.25, Inch * 2), Inch * 1.25, Inch);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;dc.Close();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; visual;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;}&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Here is what the code is doing:&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;UL style="MARGIN-TOP: 0in" type=disc&gt;
&lt;LI class=MsoNormal style="mso-list: l0 level1 lfo2; tab-stops: list .5in"&gt;It queries current paper size, and switches width and height if it’s printing landscape mode. So now width and height define the drawing area. 
&lt;LI class=MsoNormal style="mso-list: l0 level1 lfo2; tab-stops: list .5in"&gt;It then draws a dotted rectangle ¼ inch from all four sides. Notice that in WPF, point (0, 0) is aligned to the top left corner of the paper, not the top-left corner of the printable area as in GDI. 
&lt;LI class=MsoNormal style="mso-list: l0 level1 lfo2; tab-stops: list .5in"&gt;The rectangle following it uses a vertical linear gradient brush. 
&lt;LI class=MsoNormal style="mso-list: l0 level1 lfo2; tab-stops: list .5in"&gt;The last graphics primitive is an ellipse with a 60% transparent horizontal linear gradient brush.&amp;nbsp;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal&gt;To print a &lt;SPAN class=GramE&gt;Visual&lt;/SPAN&gt;, first we need to get a &lt;SPAN class=SpellE&gt;PrintQueue&lt;/SPAN&gt; (replacement for HPRINT). The code to get the default printer queue and default &lt;SPAN class=SpellE&gt;PrintTicket&lt;/SPAN&gt; (replacement for DEVMODE) is quite simple:&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;static&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt; PrintQueue GetDefaultPrintQueue(out PrintTicket ticket)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;LocalPrintServer server = &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt;&lt;FONT color=#000000&gt; LocalPrintServer();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;PrintQueue queue = server.DefaultPrintQueue;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ticket = queue.DefaultPrintTicket;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt;&lt;FONT color=#000000&gt; queue;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;}&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;Once a Visual and a &lt;SPAN class=SpellE&gt;PrintQueue&lt;/SPAN&gt; is generated, printing the Visual as a single page is very easy:&lt;/P&gt;&lt;o:p&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;PrintTicket&lt;/FONT&gt; ticket;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;PrintQueue&lt;/FONT&gt; queue = GetDefaultPrintQueue(out ticket);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;XpsDocumentWriter writer = PrintQueue.CreateXpsDocumentWriter(queue);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;writer.Write(CreateVisual(ticket), ticket);&lt;/SPAN&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="mso-layout-grid-align: none"&gt;With a few more lines of code, we can print multiple pages:&lt;/P&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;PrintTicket ticket;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;PrintQueue queue = GetDefaultPrintQueue(out ticket);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;XpsDocumentWriter writer = PrintQueue.CreateXpsDocumentWriter(queue);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;VisualsToXpsDocument vtoxpsd = writer.CreateVisualsCollator();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;vtoxpsd.Write(CreateVisual(ticket), ticket);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;ticket.PageOrientation.Value = PrintSchema.OrientationValue.Landscape;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;vtoxpsd.Write(CreateVisual(ticket), ticket);&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;vtoxpsd.EndBatchWrite();&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="mso-layout-grid-align: none"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="mso-layout-grid-align: none"&gt;The code above prints the first page in default orientation (normally portrait) and then switches to landscape mode for the second page. Being a developer in the Windows printing system, I normally prefer paperless printer for my endless printing needs. One of my favorite is Microsoft Office Document Image Writer. It will display the two pages as:&lt;/P&gt;&lt;IMG src="http://www.fengyuan.com/pdc05/basicprint_1.PNG"&gt; 
&lt;P class=MsoNormal style="mso-layout-grid-align: none"&gt;Notice that the dotted rectangles are somehow not displayed perfectly in small scale.&lt;/P&gt;
&lt;P class=MsoNormal style="mso-layout-grid-align: none"&gt;The most interesting thing in this test case is the transparency handling on a legacy device like Microsoft Office Document Image Writer. We mentioned before that for legacy devices, we will convert WPF contents into GDI representation. One of the most difficulty conversions is removing, implementing or simulating transparency. GDI+, which is used by &lt;SPAN class=SpellE&gt;WinForm&lt;/SPAN&gt; and Microsoft Office applications, has the same issue for printing. GDI+ solves the issue using by using GDI raster operations and Postscript image masks to approximate transparency, both of them has fidelity problem. Now let’s zoom in to exam &lt;SPAN class=SpellE&gt;WPF’s&lt;/SPAN&gt; implementation of transparency on legacy printers.&lt;IMG src="http://www.fengyuan.com/pdc05/basicprint_2.PNG"&gt;&amp;nbsp;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="mso-layout-grid-align: none"&gt;Transparency is almost as good as WPF rendering of the Visual on screen. The main difference you see is &lt;SPAN class=SpellE&gt;WPF’s&lt;/SPAN&gt; anti-aliasing rendering vs. &lt;SPAN class=SpellE&gt;GDI’s&lt;/SPAN&gt; aliasing rendering. What WPF legacy printing path code does is removing transparency in vector space as much as possible.&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=464399" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fyuan/archive/tags/XPS_2C00_+Printing/default.aspx">XPS, Printing</category></item><item><title>Creating XPS Documents from Visual, plus an insider look at an XPS Document</title><link>http://blogs.msdn.com/fyuan/archive/2005/09/12/463887.aspx</link><pubDate>Mon, 12 Sep 2005 10:09:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:463887</guid><dc:creator>fyuan</dc:creator><slash:comments>10</slash:comments><comments>http://blogs.msdn.com/fyuan/comments/463887.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fyuan/commentrss.aspx?PostID=463887</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fyuan/rsscomments.aspx?PostID=463887</wfw:comment><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;In the last article &lt;a href="http://blogs.msdn.com/fyuan/archive/2005/09/11/463708.aspx"&gt;blogs.msdn.com/fyuan/archive/2005/09/11/463708&lt;/A&gt;, we discussed how to generate XPS Documents from Win32 applications using the XPS Document Writer. The procedure is very simple, can you simply print whatever contents you have using GDI API. Now let’s try to generate XPS Documents from WPF (Windows Presentation Foundation) using its new API.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;As lots of stuff is new, we will build a simple console application, but build step by step to illustrate what exact is involved. Starting by creating a blank C# console application using Visual Studio, here is what we will get:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; System.Collections.Generic;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; System.Text;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;namespace&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; BasicXps&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;class&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;Program&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; &lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:place w:st="on"&gt;Main&lt;/st1:place&gt;(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;[] args)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;There are a few ways to create XPS Documents using XPF API, you can access the XPS Document container at stream level and build thing piece by piece, you can convert from a WPF Visual object, or your can convert from a WPF UIElement object. We will focus on the conversion from Visual approach. Let’s try to create a Visual which has a yellow rectangle and a pink ellipse as in the last example. The WPF code would be:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;static&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: teal"&gt;Visual&lt;/SPAN&gt; CreateVisual()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;const&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;double&lt;/SPAN&gt; Inch = 96;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;DrawingVisual&lt;/SPAN&gt; visual = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;DrawingVisual&lt;/SPAN&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;DrawingContext&lt;/SPAN&gt; dc = visual.RenderOpen();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;Pen&lt;/SPAN&gt; bluePen = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;Pen&lt;/SPAN&gt;(&lt;SPAN style="COLOR: teal"&gt;Brushes&lt;/SPAN&gt;.Blue, 1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;dc.DrawRectangle(&lt;SPAN style="COLOR: teal"&gt;Brushes&lt;/SPAN&gt;.Yellow, bluePen, &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;Rect&lt;/SPAN&gt;(Inch / 2, Inch / 2, Inch * 1.5, Inch * 1.5));&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;Brush&lt;/SPAN&gt; pinkBrush = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;SolidColorBrush&lt;/SPAN&gt;(&lt;SPAN style="COLOR: teal"&gt;Color&lt;/SPAN&gt;.FromArgb(128, 255, 0, 255));&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;Pen&lt;/SPAN&gt; blackPen = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;Pen&lt;/SPAN&gt;(&lt;SPAN style="COLOR: teal"&gt;Brushes&lt;/SPAN&gt;.Black, 1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;dc.DrawEllipse(pinkBrush, blackPen, &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;Point&lt;/SPAN&gt;(Inch * 2.25, Inch * 2), Inch * 1.25, Inch);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;dc.Close();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; visual;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;DrawingVisual is one main type of Visual supported by WPF. From a DrawingVisual, you can open a DrawingContext and draw graphics primitives into it. DrawingContext is much richer than XPS in terms of graphics primitives supported, but yet every Visual, either generated through DrawingContext or otherwise can be converted to XPS, in certain form. Here the code draws a rectangle and an ellipse. Note that the pink brush is created using &lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Color&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;.FromArgb(128, 255, 0, 255), &lt;/SPAN&gt;50% pink to be exact.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;Classes like DrawingVisual, Pen, Brush, etc., are defined in PresentationCore assembly, which depends on WindowsBase assembly. So we need to add references to them, together with the necessary namespaces: &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;// Needed by CreateVisual, from WindowsBase, PresentationCore.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; System.Windows;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;System.Windows.Media;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;The functionality to generate XPS Document resides in ReachFramework assembly, which depends on System.Printing assembly. So we need to add two more assembly references, together with a few more namespaces:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;// Needed by VisualToXps&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; System.IO.Packaging;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; System.IO;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;// Need by VisualToXps, from ReachFramework, which needs System.Printing and PresentationFramework&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; System.Windows.Xps.Packaging;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; System.Printing.PrintSubSystem;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;The code to generate an XPS Document from a Visual is shown below:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;static&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; VisualToXps(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; fileName, &lt;SPAN style="COLOR: teal"&gt;Visual&lt;/SPAN&gt; visual)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;Package&lt;/SPAN&gt; package = &lt;SPAN style="COLOR: teal"&gt;Package&lt;/SPAN&gt;.Open(fileName, &lt;SPAN style="COLOR: teal"&gt;FileMode&lt;/SPAN&gt;.Create);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;XpsDocument&lt;/SPAN&gt; doc = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;XpsDocument&lt;/SPAN&gt;(package);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;XpsDocumentWriter&lt;/SPAN&gt; writer = &lt;SPAN style="COLOR: teal"&gt;XpsDocument&lt;/SPAN&gt;.CreateXpsDocumentWriter(doc);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;writer.Write(CreateVisual());&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;doc.Close();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;package.Close();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;The code above first creates a container (in ZIP format). A container can contain multiple XpsDocument, only one is used here. An XpsDocument can have multiple pages. A single page is generated here because we only call XpsDocumentWriter once with a single Visual.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;With two new helper functions, we can change the Main function to call both of them to finish our project:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;static&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; &lt;st1:place w:st="on"&gt;Main&lt;/st1:place&gt;(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;[] args)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;VisualToXps(&lt;SPAN style="COLOR: maroon"&gt;"BasicXps.container"&lt;/SPAN&gt;, CreateVisual());&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;Visually the container generated by this code is very similar to the one generated by the XPS Document Writer. The difference can be explained by the two different creation methods, one dragging using mouse, and the other specifying by inches in C# code.&lt;/P&gt;&lt;IMG src="http://www.fengyuan.com/pdc05/basicxps_1.PNG"&gt; 
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;The XPS Document generated by this code is much smaller than the one created by the XPS Document Writer, it’s only 2,496 bytes in size. The difference is mainly caused by font embedding, PrintTicket, splitting of stroking and filling, and clipping. The container is small enough that we can show everything here. Here is the list of components in the container:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;UL style="MARGIN-TOP: 0in" type=disc&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;[Content_Types].xml, 543 bytes 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;FixedDocumentSequence/FixedDocumentSequeuce_1.xaml, 168 bytes 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;FixedDocuments/FixedDocument_1.xaml, 138 bytes 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;FixedPages/FixedPage_1.xaml, 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;_rels/.rels, 308 bytes.&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;[Context_Types].xml specifies the syntax of the container:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;?&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;xml&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;version&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;1.0&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;encoding&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;utf-8&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;?&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Types&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;http://schemas.microsoft.com/package/2005/06/content-types&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Default&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Extension&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;xaml&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ContentType&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;application/vnd.ms-package.xps-fixeddocumentsequence+xml&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Default&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Extension&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;rels&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ContentType&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;application/vnd.ms-package.relationships+xml&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Override&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;PartName&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;/FIXEDDOCUMENTS/FIXEDDOCUMENT_1.XAML&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;ContentType&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;application/vnd.ms-package.xps-fixeddocument+xml&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Override&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;PartName&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;/FIXEDPAGES/FIXEDPAGE_1.XAML&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;ContentType&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;application/vnd.ms-package.xps-fixedpage+xml&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Types&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;FixedDocumentdSequence_1.xaml says it only has FixedDocument_1.xaml as its only document:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;FixedDocumentSequence&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;http://schemas.microsoft.com/xps/2005/06&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;DocumentReference&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Source&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;../FixedDocuments/FixedDocument_1.xaml&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;FixedDocumentSequence&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;FixedDocumentd_1.xaml says it only has FixedPage_1.xaml as its only page:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;FixedDocument&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;http://schemas.microsoft.com/xps/2005/06&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;PageContent&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Source&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;../FixedPages/FixedPage_1.xaml&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;FixedDocument&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;FixedPage_1.xaml contains the XPS representation of the Visual we are writing:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;FixedPage&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;http://schemas.microsoft.com/xps/2005/06&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;xmlns:x&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;http://schemas.microsoft.com/xps/2005/06/resourcedictionary-key&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;xml:lang&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;en-us&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Width&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;816&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Height&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;1056&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;FixedPage.Resources&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;ResourceDictionary&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;ResourceDictionary&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;FixedPage.Resources&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Path&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Stroke&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;#FF0000FF&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;StrokeThickness&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;1&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;StrokeMiterLimit&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;10&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Fill&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;#FFFFFF00&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Data&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;F0 M 48, 48 L 192, 48 192, 192 48, 192Z&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Path&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Stroke&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;#FF000000&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;StrokeThickness&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;1&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;StrokeMiterLimit&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;10&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Fill&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;#80FF00FF&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Data&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;F0 M 336, 192 C 336, 245.02 282.27, 288 216, 288 C 149.73, 288 96, 245.02 96, 192 &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;C 96, 138.98 149.73, 96 216, 96 C 282.27, 96 336, 138.98 336, 192Z&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;FixedPage&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;The FixedPage element is quite similar, but much simpler than the version generated by the XPS Document Writer. The major new addition is the ResourceDictionary. Common elements can be put into the resource dictionary, given a name, and then reused. In this simple case, the resource dictionary happens to be empty.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;Finally, the .rels binds everything together:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;?&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;xml&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;version&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;1.0&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;encoding&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;utf-8&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;?&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Relationships&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;http://schemas.microsoft.com/package/2005/06/relationships&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Relationship&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;http://schemas.microsoft.com/xps/2005/06/fixedrepresentation&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Target&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;/FixedDocumentSequences/FixedDocumentSequence_1.xaml&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;RFBE031A033A8834A&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Relationships&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=463887" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fyuan/archive/tags/XPS_2C00_+Printing/default.aspx">XPS, Printing</category></item><item><title>Generating XPS Document from Win32 Applications: the XPS Document Writer</title><link>http://blogs.msdn.com/fyuan/archive/2005/09/11/463708.aspx</link><pubDate>Mon, 12 Sep 2005 00:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:463708</guid><dc:creator>fyuan</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/fyuan/comments/463708.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fyuan/commentrss.aspx?PostID=463708</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fyuan/rsscomments.aspx?PostID=463708</wfw:comment><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710658"&gt;At Winhec 2005, Microsoft announced a new file format code named Metro (Modular Content Framework and Document Format). The name Metro has since been retired and replaced with the official name XPS which stands for XML Paper Specification.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710659"&gt;&lt;?xml namespace="" ns="urn:schemas-microsoft-com:office:office" prefix="o" ?&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;O:P __designer:dtid="281474976710660"&gt;&lt;/O:P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710661"&gt;XPS is a set of conventions for the use of XML and other widely available technologies to describe the content and appearance of paginated documents. For details about XPS, check the following:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710661"&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL style="MARGIN-TOP: 0in" type=disc __designer:dtid="281474976710662"&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in" __designer:dtid="281474976710663"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: #a55506; FONT-FAMILY: Verdana" __designer:dtid="281474976710664"&gt;&lt;A href="http://www.microsoft.com/whdc/Device/print/metro.mspx" target=_blank __designer:dtid="281474976710665"&gt;&lt;FONT face="Times New Roman" size=3&gt;Metro specification and reference guide&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt; 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in" __designer:dtid="281474976710666"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; COLOR: #a55506; FONT-FAMILY: Verdana" __designer:dtid="281474976710667"&gt;&lt;A href="http://msdn.microsoft.com/windowsvista/integrated/#xps" target=_blank __designer:dtid="281474976710668"&gt;&lt;FONT face="Times New Roman" size=3&gt;XML Paper Specification&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt; 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in" __designer:dtid="281474976710669"&gt;&lt;A href="http://channel9.msdn.com/ShowPost.aspx?PostID=98057" __designer:dtid="281474976710670"&gt;&lt;SPAN style="COLOR: #a55506" __designer:dtid="281474976710671"&gt;Jerry Dunietz's article on XPS&lt;/SPAN&gt;&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710672"&gt;&lt;O:P __designer:dtid="281474976710673"&gt;&lt;/O:P&gt;If you’re writing a WPF (Windows Presentation Foundation, previously known as Avalon) application, generating XPS Document is already supported by the new API. If you’re using or writing Win32 based applications, or non WPF-based .Net applications, there is an easy way to generate XPS Documents too, as long as your applications support printing.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710672"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710675"&gt;&lt;O:P __designer:dtid="281474976710676"&gt;&lt;/O:P&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710677"&gt;With Windows Vista and WPF, Microsoft has provided a GDI/DDI based printer driver which can capture GDI/DDI command sequence and generate a XPS Document from it. The name of the printer driver is Microsoft XPS Document Writer (previously known as MDDW driver). The XPS Documents generated can then be viewed by XpsViewer or other XPS-aware applications and devices.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710677"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710678"&gt;&lt;O:P __designer:dtid="281474976710679"&gt;&lt;/O:P&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710680"&gt;So let’s try out the XPS Document Writer. First let’s create a simple Microsoft Word document with two shapes overlapping each other, a pink ellipse on top of a yellow rectangle, with the ellipse set to be 50% transparent.&lt;/P&gt;&lt;IMG src="http://www.fengyuan.com/pdc05/xpsdriver_1.PNG"&gt; 
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710680"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710681"&gt;&lt;O:P __designer:dtid="281474976710682"&gt;&lt;/O:P&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710683"&gt;Now we can print it to the XPS Document Writer, hit ‘Print’, select ‘XPS Document Writer’ as your printer, and hit ‘Ok’. A file save dialog box will appear for you to select the file name. XPS Documents uses “.container” as file extension. If you set your printer option to be ‘Open the new XPS Document automatically”, an IE window will pop up showing the new container generated. Otherwise, you can locate the file and double check to open it.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710683"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710684"&gt;&lt;O:P __designer:dtid="281474976710685"&gt;&lt;/O:P&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710686"&gt;For the document, the WPF rendering is almost exactly the same as Microsoft Word rendering, but they are using two totally different rendering engines. WPF is using a new hardware-accelerated rendering engine based on D3D, while Microsoft Word is using software-based rendering engine known as&amp;nbsp;GDI+.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710686"&gt;&amp;nbsp;&lt;/P&gt;&lt;IMG src="http://www.fengyuan.com/pdc05/xpsdriver_2.PNG"&gt; 
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710686"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710687"&gt;&lt;O:P __designer:dtid="281474976710688"&gt;&lt;/O:P&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710689"&gt;As XPS Document is packaged in ZIP format and its contents are XML-based, we can easily crack open a XPS Document and see what’s inside. Rename your container to use the zip file extension, double click to open it using WinZip. There are a bunch of files in the zip container. You can find XML files for PrintTicket, image files, font files, XML files for defining the relationship between those files. The file we are interested in here is named FixedPage_1.fpage. This is the XPS representation of the first page of our print job.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710690"&gt;&lt;O:P __designer:dtid="281474976710691"&gt;&lt;/O:P&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710692"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710692"&gt;Open it up using your favorite XML viewer/editor, mine being the ever-powerful Microsoft Visual Studio. &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710692"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710693"&gt;&lt;O:P __designer:dtid="281474976710694"&gt;&lt;/O:P&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710695"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710696"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710697"&gt;FixedPage&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710698"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710699"&gt;Width&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710700"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710701"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710702"&gt;816&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710703"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red" __designer:dtid="281474976710704"&gt;Height&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710705"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710706"&gt;1056&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710707"&gt; &lt;O:P __designer:dtid="281474976710708"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710709"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710710"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710711"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710712"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710713"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710714"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710715"&gt;http://schemas.microsoft.com/xps/2005/06&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710716"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red" __designer:dtid="281474976710717"&gt;xml:lang&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710718"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710719"&gt;en-US&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710720"&gt;&amp;gt;&lt;O:P __designer:dtid="281474976710721"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710722"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710723"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710724"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710725"&gt;Glyphs&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710726"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710727"&gt;Fill&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710728"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710729"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710730"&gt;#ff000000&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710731"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red" __designer:dtid="281474976710732"&gt;FontUri&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710733"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710734"&gt;/font_0.TTF&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710735"&gt; &lt;O:P __designer:dtid="281474976710736"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710737"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710738"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710739"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710740"&gt;FontRenderingEmSize&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710741"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710742"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710743"&gt;16&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710744"&gt; &lt;O:P __designer:dtid="281474976710745"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710746"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710747"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710748"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710749"&gt;StyleSimulations&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710750"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710751"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710752"&gt;None&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red" __designer:dtid="281474976710753"&gt;OriginX&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710754"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710755"&gt;576&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710756"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red" __designer:dtid="281474976710757"&gt;OriginY&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710758"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710759"&gt;336.16&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710760"&gt; &lt;O:P __designer:dtid="281474976710761"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710762"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710763"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710764"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710765"&gt;Indices&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710766"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710767"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710768"&gt;3&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710769"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red" __designer:dtid="281474976710770"&gt;UnicodeString&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710771"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710772"&gt; &lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710773"&gt; /&amp;gt;&lt;O:P __designer:dtid="281474976710774"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710775"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710776"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710777"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710778"&gt;Path&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710779"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710780"&gt;Data&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710781"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710782"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710783"&gt;F1 M 48,36 L 192,36 192,192 48,192 z&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710784"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red" __designer:dtid="281474976710785"&gt;Fill&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710786"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710787"&gt;#ffffff00&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710788"&gt; /&amp;gt;&lt;O:P __designer:dtid="281474976710789"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710790"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710791"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710792"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710793"&gt;Path&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710794"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710795"&gt;Data&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710796"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710797"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710798"&gt;F1 M 48,36 L 48,192 192,192 192,36 z&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710799"&gt; &lt;O:P __designer:dtid="281474976710800"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710801"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710802"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710803"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710804"&gt;Stroke&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710805"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710806"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710807"&gt;#ff0000ff&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710808"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red" __designer:dtid="281474976710809"&gt;StrokeThickness&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710810"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710811"&gt;0.96&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710812"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red" __designer:dtid="281474976710813"&gt;StrokeLineJoin&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710814"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710815"&gt;Miter&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710816"&gt; &lt;O:P __designer:dtid="281474976710817"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710818"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710819"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710820"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710821"&gt;StrokeStartLineCap&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710822"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710823"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710824"&gt;Round&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710825"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red" __designer:dtid="281474976710826"&gt;StrokeEndLineCap&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710827"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710828"&gt;Round&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710829"&gt; &lt;O:P __designer:dtid="281474976710830"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710831"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710832"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710833"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710834"&gt;StrokeMiterLimit&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710835"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710836"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710837"&gt;8&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710838"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red" __designer:dtid="281474976710839"&gt;Clip&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710840"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710841"&gt;M 0,0 L 0,1056 816,1056 816,0 z&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710842"&gt; /&amp;gt;&lt;O:P __designer:dtid="281474976710843"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710844"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710845"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710846"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710847"&gt;Path&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710848"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710849"&gt;Data&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710850"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710851"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710852"&gt;F0 M 216,84 C 149.76,84 96,124.32 96,173.92 96,223.68 &lt;O:P __designer:dtid="281474976710853"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710854"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710855"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710856"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;149.76,264 216,264 282.24,264 336,223.68 336,173.92 336,124.32 &lt;O:P __designer:dtid="281474976710857"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710858"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710859"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710860"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;282.24,84 216,84 z&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710861"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710862"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red" __designer:dtid="281474976710863"&gt;Opacity&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710864"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710865"&gt;0.5&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710866"&gt; &lt;O:P __designer:dtid="281474976710867"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710868"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710869"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710870"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710871"&gt;Clip&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710872"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710873"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710874"&gt;M 0,0 L 0,1056 816,1056 816,0 z&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710875"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red" __designer:dtid="281474976710876"&gt;Fill&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710877"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710878"&gt;#ffff00ff&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710879"&gt; /&amp;gt;&lt;O:P __designer:dtid="281474976710880"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710881"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710882"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710883"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710884"&gt;Path&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710885"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710886"&gt;Data&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710887"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710888"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710889"&gt;F1 M 216,84 C 149.76,84 96,124.32 96,173.92 96,223.68 &lt;O:P __designer:dtid="281474976710890"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710891"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710892"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710893"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;149.76,264 216,264 282.24,264 336,223.68 336,173.92 336,124.32&lt;O:P __designer:dtid="281474976710894"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710895"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710896"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710897"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;282.24,84 216,84&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710898"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710899"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red" __designer:dtid="281474976710900"&gt;Stroke&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710901"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710902"&gt;#ff000000&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710903"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red" __designer:dtid="281474976710904"&gt;StrokeThickness&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710905"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710906"&gt;0.96&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710907"&gt; &lt;O:P __designer:dtid="281474976710908"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710909"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710910"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710911"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710912"&gt;StrokeLineJoin&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710913"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710914"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710915"&gt;Round&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710916"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red" __designer:dtid="281474976710917"&gt;StrokeStartLineCap&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710918"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710919"&gt;Round&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710920"&gt; &lt;O:P __designer:dtid="281474976710921"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710922"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710923"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710924"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710925"&gt;StrokeEndLineCap&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710926"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710927"&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710928"&gt;Round&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710929"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red" __designer:dtid="281474976710930"&gt;Clip&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710931"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710932"&gt;M 0,0 L 0,1056 816,1056 816,0 z&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue" __designer:dtid="281474976710933"&gt; /&amp;gt;&lt;O:P __designer:dtid="281474976710934"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710935"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710936"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710937"&gt;FixedPage&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710938"&gt;&amp;gt;&lt;O:P __designer:dtid="281474976710939"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710940"&gt;&lt;SPAN style="FONT-SIZE: 8pt" __designer:dtid="281474976710941"&gt;&lt;O:P __designer:dtid="281474976710942"&gt;&lt;/O:P&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710943"&gt;&lt;SPAN style="FONT-SIZE: 8pt" __designer:dtid="281474976710944"&gt;&lt;O:P __designer:dtid="281474976710945"&gt;&lt;/O:P&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710943"&gt;&lt;SPAN style="FONT-SIZE: 8pt" __designer:dtid="281474976710944"&gt;For the official XPS specification, check &lt;A href="http://www.microsoft.com/whdc/xps/default.mspx"&gt;http://www.microsoft.com/whdc/xps/default.mspx&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710943"&gt;&lt;SPAN style="FONT-SIZE: 8pt" __designer:dtid="281474976710944"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710946"&gt;Here is a crash course on XPS syntax:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710946"&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL style="MARGIN-TOP: 0in" type=disc __designer:dtid="281474976710947"&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in" __designer:dtid="281474976710948"&gt;A page in XPS is stored in &lt;FONT face="Courier New"&gt;FixedPage&lt;/FONT&gt; element. 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in" __designer:dtid="281474976710949"&gt;XPS base unit is 96-dpi, so 816 x 1056 is just 8.5 inch x 11 inch. 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in" __designer:dtid="281474976710950"&gt;XPS uses &lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710951"&gt;&lt;A href="http://schemas.microsoft.com/xps/2005/06" __designer:dtid="281474976710952"&gt;&lt;SPAN style="COLOR: #a55506" __designer:dtid="281474976710953"&gt;&lt;FONT face="Times New Roman" size=3&gt;http://schemas.microsoft.com/xps/2005/06&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt; &lt;/SPAN&gt;schema. 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in" __designer:dtid="281474976710954"&gt;All text is represented using &lt;FONT face="Courier New"&gt;Glyphs&lt;/FONT&gt; element, unless it has been converted to vector graphic or image. 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in" __designer:dtid="281474976710955"&gt;All vector graphic and image is represented using &lt;FONT face="Courier New"&gt;Path&lt;/FONT&gt; element. Images are represented using image brushes. 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in" __designer:dtid="281474976710956"&gt;Brush is specified using &lt;FONT face="Courier New"&gt;Fill&lt;/FONT&gt; attribute, which can solid color brush, linear gradient brush, radial gradient brush, image brush, or visual brush. 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in" __designer:dtid="281474976710957"&gt;Pen is represented using a few attributes which start with “&lt;FONT face="Courier New"&gt;Stroke&lt;/FONT&gt;”. The “&lt;FONT face="Courier New"&gt;Stroke&lt;/FONT&gt;” attribute itself specifies the brush for stroking, &lt;FONT face="Courier New"&gt;StrokeTickness&lt;/FONT&gt; is for width, and other attributes control the shape of stroking. 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in" __designer:dtid="281474976710958"&gt;Transparency (opacity, alpha channel) can be in lots of places in XPS. It can be in colors, images, on a single element, or on a bunch of elements grouped in a &lt;FONT face="Courier New"&gt;Canvas &lt;/FONT&gt;&lt;FONT face="Times New Roman"&gt;element. Transparency can be also used as opacity mask. The only place with transparency in this example is on the 3&lt;SUP __designer:dtid="281474976710959"&gt;rd&lt;/SUP&gt; path, the pink ellipse. &lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710960"&gt;&lt;O:P __designer:dtid="281474976710961"&gt;&lt;/O:P&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710962"&gt;There are five elements in this XPS page:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710962"&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL style="MARGIN-TOP: 0in" type=disc __designer:dtid="281474976710963"&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level1 lfo3; tab-stops: list .5in" __designer:dtid="281474976710964"&gt;The first is a &lt;FONT face="Courier New"&gt;Glyphs&lt;/FONT&gt; element with a single character. I’m not sure why it’s generated by Microsoft Word. 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level1 lfo3; tab-stops: list .5in" __designer:dtid="281474976710965"&gt;The second is the yellow rectangle. 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level1 lfo3; tab-stops: list .5in" __designer:dtid="281474976710966"&gt;The 3&lt;SUP __designer:dtid="281474976710967"&gt;rd&lt;/SUP&gt; is the blue outline of the rectangle. It’s possible to combine 2 and 3 into a single element. 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level1 lfo3; tab-stops: list .5in" __designer:dtid="281474976710968"&gt;The 4&lt;SUP __designer:dtid="281474976710969"&gt;th&lt;/SUP&gt; is the 50% transparent pink ellipse. Note that the ellipse has been converted into 4 pieces of Bezier curves. 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level1 lfo3; tab-stops: list .5in" __designer:dtid="281474976710970"&gt;The last one is the black outline of ellipse. Again it can be combined with 4 to save some space, provided we push the opacity into the filling brush first. &lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710971"&gt;&lt;O:P __designer:dtid="281474976710972"&gt;&lt;/O:P&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710973"&gt;The XPS Document Writer does a quite good job of converting GDI/DDI commands into XPS. One of the things it put special handling is optimzation of GDI raster operation sequences into real transparency. When GDI+, which is used by Microsoft Word under the cover, prints shapes with transparency, it normally uses a sequence of GDI commands with GDI raster operation to simulate transparency. Raster operations basically mask off certain pixels off on the source and destination and then combine the remaining to give the impression that two things are blended together.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710973"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710974"&gt;&lt;O:P __designer:dtid="281474976710975"&gt;&lt;/O:P&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710976"&gt;Here is the actual sequence of commands generated by GDI+ to print the 50% transparent pink ellipse:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710976"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976710977"&gt;&lt;O:P __designer:dtid="281474976710978"&gt;&lt;/O:P&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710979"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710980"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710981"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;hObj[2]=CreateSolidBrush(RGB(0xFF,0,0xFF));&lt;O:P __designer:dtid="281474976710982"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710983"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710984"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710985"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;SelectObject(hDC, hObj[2]);&lt;O:P __designer:dtid="281474976710986"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710987"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710988"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710989"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;PatBlt(hDC,2,207,752,565,PATINVERT);&lt;O:P __designer:dtid="281474976710990"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710991"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710992"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710993"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;SetROP2(hDC, R2_MASKPEN);&lt;O:P __designer:dtid="281474976710994"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710995"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976710996"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976710997"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;SetTextColor(hDC, RGB(0xFF,0xFF,0xFF));&lt;O:P __designer:dtid="281474976710998"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976710999"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711000"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711001"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;O:P __designer:dtid="281474976711002"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976711003"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711004"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711005"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue" __designer:dtid="281474976711006"&gt;static&lt;/SPAN&gt; KDIB Dib_1(_TEXT(&lt;SPAN style="COLOR: maroon" __designer:dtid="281474976711007"&gt;"fp00001_1.bmp"&lt;/SPAN&gt;));&lt;SPAN style="COLOR: green" __designer:dtid="281474976711008"&gt;// 16x16x1&lt;O:P __designer:dtid="281474976711009"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976711010"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711011"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711012"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;hObj[3]=Dib_1.CreateDIBPatternBrushPt(DIB_RGB_COLORS);&lt;O:P __designer:dtid="281474976711013"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976711014"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711015"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711016"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;SelectObject(hDC, hObj[3]);&lt;O:P __designer:dtid="281474976711017"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976711018"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711019"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711020"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;SetPolyFillMode(hDC, ALTERNATE);&lt;O:P __designer:dtid="281474976711021"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976711022"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711023"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711024"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;BeginPath(hDC);&lt;O:P __designer:dtid="281474976711025"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976711026"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711027"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711028"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;O:P __designer:dtid="281474976711029"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 24pt; mso-layout-grid-align: none" __designer:dtid="281474976711030"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711031"&gt;static&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711032"&gt; &lt;SPAN style="COLOR: blue" __designer:dtid="281474976711033"&gt;const&lt;/SPAN&gt; POINT Points_2[]={ 378, 208, 171, 208, 3, 334, 3,&lt;O:P __designer:dtid="281474976711034"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 24pt; mso-layout-grid-align: none" __designer:dtid="281474976711035"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711036"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711037"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711038"&gt;&amp;nbsp;&lt;/SPAN&gt;489, 3, 645, 171, 771, 378, 771, 585, 771, 753, 645, 753, &lt;O:P __designer:dtid="281474976711039"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 24pt; mso-layout-grid-align: none" __designer:dtid="281474976711040"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711041"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711042"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;489, 753, 334, 585, 208, 378, 208 };&lt;O:P __designer:dtid="281474976711043"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976711044"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711045"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711046"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;PolyBezier(hDC, Points_2, 13);&lt;O:P __designer:dtid="281474976711047"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976711048"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711049"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711050"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;EndPath(hDC);&lt;O:P __designer:dtid="281474976711051"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976711052"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711053"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711054"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;FillPath(hDC);&lt;O:P __designer:dtid="281474976711055"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976711056"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711057"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711058"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;SetPolyFillMode(hDC, ALTERNATE);&lt;O:P __designer:dtid="281474976711059"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976711060"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711061"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711062"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;SelectObject(hDC, hObj[2]);&lt;O:P __designer:dtid="281474976711063"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976711064"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711065"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711066"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;SetTextColor(hDC, PALETTERGB(0,0,0));&lt;O:P __designer:dtid="281474976711067"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976711068"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711069"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711070"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;SetROP2(hDC, R2_COPYPEN);&lt;O:P __designer:dtid="281474976711071"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976711072"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711073"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711074"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;PatBlt(hDC,2,207,752,565,PATINVERT);&lt;O:P __designer:dtid="281474976711075"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976711076"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711077"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711078"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;SelectObject(hDC, GetStockObject(WHITE_BRUSH));&lt;O:P __designer:dtid="281474976711079"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" __designer:dtid="281474976711080"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes" __designer:dtid="281474976711081"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711082"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;DeleteObject(hObj[2]);&lt;O:P __designer:dtid="281474976711083"&gt;&lt;/O:P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976711084"&gt;&lt;SPAN style="mso-spacerun: yes" __designer:dtid="281474976711085"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976711086"&gt;The main GDI commands used are:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976711086"&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL style="MARGIN-TOP: 0in" type=disc __designer:dtid="281474976711087"&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo4; tab-stops: list .5in" __designer:dtid="281474976711088"&gt;PatBlt with PATINVERT rop. 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo4; tab-stops: list .5in" __designer:dtid="281474976711089"&gt;FillPath with R2_MASKPEN rop, using a 16 x 16 bit bitmap brush simulating 50% transparency, 
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo4; tab-stops: list .5in" __designer:dtid="281474976711090"&gt;PatBlt again with PATINVERT rop. &lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976711091"&gt;&lt;O:P __designer:dtid="281474976711092"&gt;&lt;/O:P&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt" __designer:dtid="281474976711093"&gt;Now you’re ready to explore XPS Document Writer on your own. &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=463708" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fyuan/archive/tags/XPS_2C00_+Printing/default.aspx">XPS, Printing</category></item></channel></rss>