Wictor Wilen

Wictor Wilén is Product Leader at Microsoft. Former Microsoft Regional Director and SharePoint MVP, as well as an author and a well known international speaker

.NET

Dissecting XPS, part 6 - reading XPS files programatically

The sixth part of the Dissecting XPS series is here and this time we will, finally, look at some code for reading XML Paper Specification [1], XPS, files. I will in the following sample not use the Microsoft.NET 3.0 Framework, which has built-in functionality for reading and writing XPS files [2]. Instead I will do it using .NET 2.0 (you can try it in .NET 1.1 if you like) and an excellent ZIP library called #ziplib [3]. This will show you more of what’s really happening and it will show you how to integrate XPS into applications built using other .NET Frameworks than 3.0 or in Mono or in what ever you like. For instance, you can use Java and the Java Zip packages.

Windows Vista

NVIDIA has released new beta drivers for Windows Vista

Yesterday NVIDIA released a new set of beta drivers for Microsoft Windows Vista, v 158.18. The drivers supports the GeForce 6, 7 and 8 series (not the mobile ones). Apart from a number of bug fixes and improvements (to the NVIDIA Control Panel, improved WMV playback quality and 3D performance) the new interesting feature is the PureVideo HD support. But there are numerous things for NVIDIA to fix, jus read the Release Notes.

Windows XP

Microsoft XPS Essentials Pack 1.0 RTW

Microsoft has released version 1.0 of the XML Paper Specification Essentials Pack. The pack is available for Windows Vista or Windows XP and Windows 2003 Server (both 32 bit and 64 bit versions is available). XPS Essentials Pack contains An XPS viewer called XPS Viewer EP - for reading XPS files An XPS Document writer - for printing to an XPS file Filters for previewing (IPreview) and searching (IFilter) XPS files Windows Shell handlers, for Windows Explorer integration and thumbnails Note: On Windows Vista Internet Explorer will still be the default viewer for XPS files. Just right click any XPS file and choose Open With and then Choose Default Program. In the dialog choose the XPS viewer you want to use as default.

Windows Vista

Windows Vista start menu power button

The Start menu has dramatically changed in Windows Vista and one of the changes are how you choose to shut down, log of or put your computer to sleep. By default the two buttons in the start menu can be used to put your computer to sleep and to log you off. If you really want to turn your computer off you can press the right-arrow button and get a menu where you can shut down, restart etc. Windows XP also has two buttons but instead of having a sleep button it has a shut down button.

XML

Dissecting XPS, part 5 - Document properties

This is the fith part of the Dissecting XPS series and will focus on the Xml Paper Specification, XPS, document properties. Core Properties The properties used in an XPS document are stored in the Core Properties Part, specified in the Open Packaging Conventions, OPC [1]. The Part is located by reading the [Content_Types].xml file and finding the content type application/vnd.openxmlformats-package.core-properties+xml. A document should have one Core Properties part, so there is no requirement to have one but having serveral indicates an invalid package. But there should be no reason to leave out the part. There are also no requirements on which elements that should be present in the part.

XML

Dissecting XPS, part 4 - the content markup

This part in the Dissecting XPS series will take off were we ended part 3, by looking into how the actual content is marked up. The content is contained in the FixedPage element and it is marked up by three different elements the Path element which specified a geometry filled with a brush the Glyphs element which represents text the Canvas element which groups elements together The Path element The Path element is used to specify a geometry shape and optionally fill it using a brush. This XPS markup code creates the triangle shown on the right.

Microsoft Expression

Microsoft Expression products now for MSDN subscribers

Microsoft has decided to make the Expression Blend and Expression Web products available for all MSDN Premium subscribers. This is great news for all developers, and a great enhancement to the MSDN subscription. The Expression Design application will not be included in the MSDN subscription and neither will Expression Media. I surely can understand why Media is not in but I think that Design should be included. Blend will help developers making nice WPF applications and Web will help out when making nice websites, but there is great need for nice graphics on a website and therefore I think Design should be included in the MSDN subscription.

XPS

Dissecting XPS - part 3 - the Fixed Document

This is the third part in the Dissecting XPS Series and this episode will focus on the Fixed Document parts of an XPS document. The previous part described how an XPS document is packed into a package and how we could find the actual document within it. FixedDocument and PageContent The FixedDocument element [1] is the part of the XPS document which contains the actual pages, which are represented as PageContent elements. The PageContent elements appears in the exact same order in which they should appear in the document and contains a reference to the FixedPage Part and optionally size (width and height) of the page.

XML

Dissecting XPS, part 2 - inside the XPS document

This is the second part of the Dissecting XPS series, last post generally described the XML Paper Specification. This post in the series will describe the XPS file format internals. This will give you an overview of how the XPS files are built from ground and up, instead of reading the XPS Specification which covers 453 pages. The XPS file The XPS file, with the .xps extension, is a ZIP file - called the physical Package, and consists of a number of XML and binary files - called Parts. There are also files describing how the files are organized and connected together - called Relationships.