Microsoft
Welcome to TechNet Blogs Sign in | Join | Help

Windows Printing Team Blog

Setup, connect, and print with confidence
Introducing Word Automation Services

Have you ever wanted to convert .docx files into PDF? We've heard from many customers trying to perform server side conversions of Open XML files (.docx) into fixed formats (PDF and XPS) using the Word desktop application, and that's what motivated us to create Word Automation Services.

As a component of SharePoint 2010, Word Automation Services allows you to perform file operations on the server that previously required automating desktop Word:

  • Converting between document formats (e.g. DOC to DOCX)
  • Converting to fixed formats (e.g. PDF or XPS)
  • Updating fields
  • Importing "alternate format chunks"
  • Etc.
Read more here: Microsoft Office Word Blog
Distributed Scan Management

Hi,

My name is Jane Maliouta, and I am a program manager for printer and scanner connectivity features. Today, I’d like to tell you about a new feature available in Windows Server 2008 R2, called Distributed Scan Management (DSM).

 

DSM is targeted primarily for enterprises and supports network scanning scenarios. It enables customers in enterprises to scan documents directly from the device into their workflow (sharepoint, email, and/or fileshare). Because DSM is part of the Windows Server, the feature is fully controllable by the administrator, and users can have different options available to them based on their domain profile. DSM integrates with Active Directory to enable centralized management of the scan options available to the user.

 

For information on how to add support for DSM on a device, check out these documents:

-          Design Guide for DSM (includes an architecture overview and sample tutorials to get you started)

-          References for DSM (describes the DSM schemas and events)

-          WSDL and XSD protocols  (contains actual protocol files to assist with implementation)

If you are interested in deploying DSM in your organization, here are some links to help:

-          What’s new in Print and Document Services (overview of Windows Server 2008 R2 Print and Document features)

-          Scan Management (overview of DSM management)

-          DSM AD Schema Update (In order to use DSM, you will need to update the AD Schema. You can either upgrade the AD server to Windows Server 2008 R2, or install a separate schema update file linked above)

 

Thanks,

Jane Maliouta

Windows

Printer Management Using PowerShell

*******Disclaimer.  This posting contains scripting samples.  These are provided as-is with no guaranties or warranties of any kind.  They are not thoroughly tested in all scenarios.

Over the years, the Printing team has released a number of management technologies designed to help print administrators get their jobs done. While the Print Management Console (PMC) is the tool of choice for many, sometimes you need a scripted solution. This is where PowerShell comes in.

One of the beautiful things about PowerShell is that it provides a single entry point to a wide array of scripting tools. For instance, you can manage WMI objects, .NET objects, call console apps like SetPrinter.exe and even (if you’re adventurous) marshal native API calls through .NET to PowerShell. For the purposes of this post, though, I’m going to keep things planted firmly in what you can do using the objects provided in .NET 3.0+.

One common administrative scenario would be setting all of the print queues on a print server to print double sided or duplexed. We could do this in the PMC, but we would need to edit each queue one-by-one: not fun. Fortunately, the Print Schema (introduced in Windows Vista) provides a common syntax that we can script against, and .NET provides a number of convenient objects to represent some of the common keywords.

Let’s go to the code. First, we need to change our threading model so that everything plays nice. Then we get into the real work of importing the correct namespace (System.Printing) and set up some objects we’ll be using. Note that we're filtering the queues we get back from the (local) server using a flag from System.Printing.EnumeratedPrintQueueTypes so that we only get shared queues. You could add more flags into the array we pass to GetPrintQueues() as well.

$host.Runspace.ThreadOptions = "ReuseThread"
Add-Type -AssemblyName System.Printing
$permissions = [System.Printing.PrintSystemDesiredAccess]::AdministrateServer
$queueperms = [System.Printing.PrintSystemDesiredAccess]::AdministratePrinter
$server = new-object System.Printing.PrintServer -argumentList $permissions
$queues = $server.GetPrintQueues(@([System.Printing.EnumeratedPrintQueueTypes]::Shared))

Now that we have a collection of PrintQueue objects in $queues, we can iterate over them in a foreach loop. The first challenge we’ll need to deal with is getting a PrintQueue object where we have administrative privileges. Note: You will most likely have to run PowerShell as an administrator in order to get permission to modify the PrintQueue object.

foreach ($q in $queues) { 
#Get edit Permissions on the Queue
$q2 = new-object System.Printing.PrintQueue -argumentList $server,$q.Name,1,$queueperms
}

From here it is just a matter of finding devices that support the desired PrintCapability and then setting it to the desired value. We'll be using the DuplexingCapability object in this example.

	$duplexCaps = $q2.GetPrintCapabilities().DuplexingCapability
if ($duplexCaps.Contains([System.Printing.Duplexing]::TwoSidedLongEdge)) {
$q2.DefaultPrintTicket.Duplexing = [System.Printing.Duplexing]::TwoSidedLongEdge
$q2.commit()
}
Putting it all together:
$host.Runspace.ThreadOptions = "ReuseThread"
Add-Type -AssemblyName System.Printing
$permissions = [System.Printing.PrintSystemDesiredAccess]::AdministrateServer
$queueperms = [System.Printing.PrintSystemDesiredAccess]::AdministratePrinter
$server = new-object System.Printing.PrintServer -argumentList $permissions
$queues = $server.GetPrintQueues(@([System.Printing.EnumeratedPrintQueueTypes]::Shared))


foreach ($q in $queues) {
#Get edit Permissions on the Queue
$q2 = new-object System.Printing.PrintQueue -argumentList $server,$q.Name,1,$queueperms

#Set DefaultPrintTicket
$duplexCaps = $q2.GetPrintCapabilities().DuplexingCapability
if ($duplexCaps.Contains([System.Printing.Duplexing]::TwoSidedLongEdge)) {
$q2.DefaultPrintTicket.Duplexing = [System.Printing.Duplexing]::TwoSidedLongEdge
$q2.commit()
}
}

This is of course, just one example of what you could do now that you've got the System.Printing namespace mapped into PowerShell.

Thanks,

Justin Hutchings & Alan Morris

Windows-Printing

Printing and Document Features for the Platform Update for Windows Vista

What is the Platform Update for Windows Vista?

The Platform Update for Windows Vista is a set runtime libraries that makes it easy for developers to target both Windows 7 and Windows Vista.

Among the technologies included in the Platform Update for Windows Vista are the XPS Print API for XPS Printing, the XPS Rasterization Service for XPSDrv-based driver development, and the XPS Document API + Packaging API for the creation, manipulation and access of XPS content.  This enables developers to take advantage of new Windows 7 APIs to access existing features while ensuring their applications will work on Windows Vista SP2 and Windows Server 2008 SP2, and underscores our commitment to ISVs and IHVs that are developing solutions to take advantage of the XPS format.

For more information on Windows 7 Graphics Update for Windows Vista see http://blogs.msdn.com/directx/.

Document and Printing Features

XPS Print API

The XPS Print API is included in the Platform Update for Windows Vista.  This allows Win32 developers to send XPS content directly to the XPS Print Path. It also supports automatic conversion to support non XPS printing devices. The XPS Print API is detailed on MSDN at this link:  http://msdn.microsoft.com/en-us/library/dd374565(VS.85).aspx . 

XPS Rasterization Service

The XPS Rasterization Service provides an inbox solution to XPSDrv driver developers who require rasterized content.  The driver developer can write a print filter pipeline filter that calls the service, which will return rasterized content.  This service is introduced in Windows 7 and is now available through the Platform Update for Windows Vista to Windows Vista SP2 and Windows Server 2008 SP2.  Information on the XPS Rasterization Service can be found at http://msdn.microsoft.com/en-us/library/dd445665.aspx.

XPS Document API + Packaging API

The XPS Document API and Packaging API support the functionality required to work with the XPS Print API and XPS Rasterization Service, these components may be used to work directly with XPS content, although some API features available in Windows 7 and Server 2008 R2 are not available in the Platform Update for Windows Vista. These differences are detailed below.

XPS Document API provides interfaces to work directly with XPS Documents.  In the Platform Update for Windows Vista, XPS Document API implements all the Windows 7 interfaces except for digital signature functionality (see XPS Document API link in the MSDN link:    http://msdn.microsoft.com/en-us/library/dd316975(VS.85).aspx.

The Packaging API in the Transition Pack will only expose the following interfaces needed by the XPS Document API. 

·         IOpcUri

o   All Win7 interface methods are supported

§  CombinePartUri

§  GetRelativeUri

§  GetRelationshipPartUri

·         IOpcPartUri

o   All Win7 interface methods are supported

§  ComparePartUri

§  GetSourceUri

§  IsRelationshipsPartUri

·         IOpcFactory

o   Supported interface methods

§  CreatePackageRootUri

§  CreatePartUri

§  CreateStreamOnFile

The Windows 7 documentation for Packaging API can be found here:  http://msdn.microsoft.com/en-us/library/dd742822(VS.85).aspx.  Note that this link discusses all of the Packaging API functionality, not just the interfaces included in the Transition Pack listed above.

How to Download

The Platform Update for Windows Vista will be released to the public in the fourth quarter of 2009.  A public beta will is available on 9/10 (see http://windowsteamblog.com for details on how to get the beta).

 

--Brian Clubb

  Windows Printing

Print Services Migration Guide

With the release of Windows Server 2008 R2, many of you will be looking into migrating your print servers. Since migrating a server running either Windows Server 2003 or Windows Server 2008 to a server running the Windows Server 2008 R2 operating system can often become a stressful time for IT Admins, we have just the right remedy.

 

To avoid any downtime and have a smooth migrating experience, hit up the read links below that provide a guide for migrating print servers with information about tools, a step-by-step tutorial, potential pitfalls, and a discussion of important issues such as cross-architecture migration.

 

Read: Print Services Migration Guide

Read: Migrate Print Servers

 

--Alan Morris, Shawn Maloney, Khurram Zia, Jon Kay, and Abhinav Gupta

  Windows Printing

 

New in Documents, Printing, and Scanning Space

There have been many improvements in Windows 7 and Server 2008R2 in the Documents, Printing, and Scanning space.  These include great performance, stability, security, and reliability enhancements and entirely new feature additions to ease printing and scanning as well as print and scan management. 

 

Printers now are part of the Device Stage experience in Windows that comes with a great new UI where users can see their devices, easily change settings, view status, order new supplies and so much more. Printing is now location aware which makes printing at home, at the office or any other network seamless and easy. Homegroup printing make sharing printers over your Homegroup as easy as connecting it to one of your Homegroup machines. Print Management Console (PMC) in Windows 7 gives administrators greater flexibility and ease in managing print servers by providing better support for driver management including a powerful All Drivers view with a single view of all print drivers across the administered print systems.

 

Scanning in enterprise gets a whole new dimension with Distributed Scan Management that enables authenticated access to scanners and ability to send scanned documents to emails, file shares  and SharePoint for enterprise users. IT Admins ,in turn, can easily administer access to scanners as well as monitor scanner and scan job status. There is also better support  for device initiated scanning. 

 

Windows 7 comes with a brand new XPS viewer with significant enhancements in viewing and searching XPS content. XPS documents are better integrated in Windows with previews available from Explorer and Outlook. The viewer comes built in with Rights Management and Digital Signatures to restrict access and digitally sign XPS documents.

 

A lot has changed deeper under the hood as well. Print drivers can now run isolated from the print infrastructure making the print subsystem more stable. Rendering enhancements enable rendering of XPS content with improved fidelity and performance and enable printing from XPS Applications to GDI Printers. Server Administrators can now delegate  print administration tasks to "print administrators" enabling greater security and cost savings for small businesses. Printer Backup and Restore tool now comes with the ability to customize the restoration of a print server. There is a also a new set of native APIs to create, edit, view, save and print XPS files and another new set of native APIs for supporting Open Packaging Convention based file formats including XPS files, Word files, Excel files, PowerPoint files, and more.

 

--Khurram Zia & Jon Kay

   Program Managers

   Windows-Printing

 

Print blog begins!

The print team has created a new TechNet blog for discussing printing related topics.  Our primary goal is to make this a highly efficient and searchable way for customers to get at the wealth of information we have published in various places.  The following list is a subset of topics that we have discussed and are currently considering blogging about:

 

·         Information about new KB articles

·         Setup and migration how-to guides

·         Tips about debugging printing-related issues

·         Links to related blogs and articles being published by other teams

·         Other Print related issues

 

Thanks,

Abhinav Gupta

Program Manager

Windows-Printing

Page view tracker