XPS & OPC Support in Windows 7

Last week at PDC and this week at WinHEC we’re talking for the first time about investments we’re making in Windows 7 to better support XPS and OPC.

  • New Win32 APIs for XPS
  • New Win32 APIs for OPC
  • New Win32 API to provide access to the XPS Print Path
  • New XPS Rasterization service for driver developers to use within the XPS Print Path filter pipeline
  • Enhanced user experience with XPS Documents

We’ll be talking more about, and digging into the details of, these new features over the coming weeks and months as we head towards Windows 7 beta. To get a preview you can check out the details from PDC and WinHEC that Adrian posted.

Comments (13)

  1. Jason says:

    Time stamp of digital cert is Oct 20, 2008 but I’m getting an error in the event log.  Product: XPS Essentials Pack — Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.  Action SCUpdateInstallAction, location: C:WINDOWSInstallerMSIBC3.tmp, command: /q /z

  2. XPS says:


    To better understand your error, could you please send to xpsinfo@microsoft.com the following information:

    1. Which operating system you were trying to install the XPS Essentials Pack on (including what Service Pack you’re running)

    2. What language of the XPS Essentials Pack you were trying to download.

    3. Have you ever had a previous version of the XPS Essentials Pack installed on your machine?  If yes, do you know when one?

    4. If possible, please send us the install log.

    If running Vista, it’s located here:  c:windowswindowsupdate.log

    If running XP, do the following:

    a. Opening a command prompt

    b. run –  <xpsep_setup.exe> /l* <logfile.log>

    <xpsep_setup.exe> is the setup name that you downloaded from the web site (you will need to change the command prompt directory to point to wherever this file is)

    <logfile.log> can be any filename that you want to put the log file, ususaly put c:xpsep.log  

    (ex. C:tempxpsep"XPSEP XP and Server 2003 32 bit.msi" /l*vx xpsep.ui.log)


  3. xps says:

    @Jason – great to hear you’re up and running

  4. Comme à l’accoutumé, voici une brochette de liens de la semaine sur Open XML. Posts techniques en vrac

  5. yuguang.hu says:

    How to print a xps file in windows xp/2k3/vista/2k8 through native code, I mean native c++ code?

    Does the new win32 XPS API in windows 7 work in winxp/2k3/vista/2k8?

    Will MS distribute a single pack which includes the XPS API?

  6. Algis says:

    I would like to change electronic invoices delivery format from PDF to XPS. There are several reasons to switch both technological and legal also (XPS is part of Vista and Adobe PDF Reader license terms are not acceptable. Its not free if you read the license, there are too many obligations to Adobe so many customers started to install alternative freeware PDF readers and they do not always work as expected, esp. with digital signatures).

    The expensive legacy billing system can only produce PostScript or PDF. I need converter from PDF to XPS. As simple as this:

    PDF2XPS Invoice.PDF Invoice.XPS

    When Microsoft released WMA format it released PowerToy MP3toWMA. Now PDF2XPS tool is critically needed. I spend a week reserching/testing available commercial tools and NONE work with acceptable quality (XPS is not equal to PDF when printed, bar codes stop to work etc.) or they produce files 5 times bigger or they do not support automatic translation of many files. Product by PDFTron in Technology Showcase looks promising but they do not have it yet and the final date is unclear. The only quality solution at no extra cost is printing to XPS Document Writer in Vista/2008 from Adobe Reader 8, it produces XPS files that print exactly as originals and size is even less in some cases (!). Unfortunatelly it asks for file name every time and no way to automate conversion of 100000 files. If you are promoting XPS technology the PDF2XPS conversion tool or powertoy is needed very much. Simple command prompt application to make XPS from PDF.

    For widespread XPS technology adoption ability to create identical XPS from PDF without huge file size increase is more important that everything I read what will be added for XPS in Windows7. And without mass adoption companies will not do more than just declarations about support but in reality still very little XPS products (like printers or scanners) will be available.

    Add PDF2XPS command line utility in addition to XPS Document Writer in Windows7 or as separate download. In format adoption phase its more important for XPS than improvement of legacy W32 api.

  7. Algis says:

    I sent this prayer reg. PDF2XPS because Microsoft already master and has an experience in both technologies because Office 2007 can save both to PDF and XPS.

    The ability to sign XPS files works very good and creates no any problem to sign high amount of files. In less than and hour I was able to build application that batch signs XPS files using XPS API, this XPS implementation part was excellent.

    Therefore XPS can serve as an excellent medium to distribute digitally signed electronic documents, invoices etc. For single document, everything is included into XPS Document Writer (production) and IE7 (signing). For mass production, signatures can be applied with API. But no way to mass produce XPS if the source is the legacy system that will still serve for many years and that can only produce PDF or PostScript. Best regards to XPS team.

  8. adrian ford says:


    "Unfortunatelly it asks for file name every time and no way to automate conversion of 100000 files."

    We enable custom development of XPS-based print drivers, including automating the save as process, via the WDK. See details in this post: http://blogs.msdn.com/adrianford/archive/2008/02/02/generating-xps-automagically.aspx

  9. adrian ford says:


    The XPS Print API described in this post is only in Windows 7. You can still use the XPS Path Path from Win32 in previous versions of Windows, although it does require more work (code).

    One option is to use MXDC_ESCAPE [1] to pass XPS page content through to the print path, another is to submit an XPS file directly to the spooler [2]. Note that in both these cases you’ll need to verify that the print queue is XPS (see GETTECHNOLOGY [3] for details) which is something that the XPS Print API on Windows 7 handles automatically.

    [1] http://msdn.microsoft.com/en-us/library/dd162739(VS.85).aspx

    [2] http://msdn.microsoft.com/en-us/library/dd162861(VS.85).aspx

    [3] http://msdn.microsoft.com/en-us/library/dd144931(VS.85).aspx

  10. Algis says:

    Thank you for the information.

    I sent the first batch of 600000 invoices in XPS format. Users with Vista, part of users with XP (with .NET installed) and part of Linux users (those with KDE4.1 or later) can open XPS directly. As XP will start to shrink after release of Windows7, there will be possibility to eliminate PDF at all.

    The PDF to XPS solution is very ugly – custom printer driver was written as adviced here, and every PDF file must be printed starting new Adobe Reader process from command line with parameter to provide printer port (that is used by custom driver for filename). OS must be rebooted periodically to keep this process speedy (with many printing PDF readers starting constantly, it slows down with the time for some reason).

    Unfortunatelly at the moment there are no properly working solutions on the market to convert from PDF to XPS. Only via print. In the future this ugly step probably may be eliminated by replacing print solution with convert solution.

    But after I sent the signed invoices I discovered another problem. To be legally accepted, XPS were signed with valid e-signature that will expire after two years. But the document must be valid minimum for 10 years. By setting forward date I discovered that if the user will open the signed XPS document after the certificate will expire (after two years) he will get a warning message. To avoid that, I found that I must "timestamp" the document, then must be no warnings forewer. Unfortunatelly I did not found anything related in the XPS API.

    Any information how do I sign XPS document to be valid for 10 years, with no warnings about signature validity? Some agreements may require more than 20 years. If no way in Vista, can this be fixed in Windows7? Without long term validity there is no option to standardize with XPS for legal/financial document archiving.

  11. Algis says:

    It may also be a bug in XPS viewer. Because it shows warning that certificate is expired, but it also shows correctly that the document was signed at the specific date, and at that date the certificate was valid, so must be no warnings. Timestamping is not needed if this is an XPS viewer bug, then I hope this will be corrected in Windows 7.

  12. jasonfar says:

    Hello Algis,

    Thank you for the great feedback; I’m glad to see you trying to use XPS in this way.  It would be fantastic to learn more about your scenarios and goals with XPS.  Could you share more information with us at xpsinfo@microsoft.com?

    In regards to timestamp support, this is something we are very much aware of.  Without timestamp server support it’s not possible for the XPS Viewer to verify that an expired certificate was valid at the time of signing.  As a result these signatures become questionable, meaning that they are still valid signatures, but it’s up to the user to make a trust decision about them.  The legality of signatures with or without timestamp support varies by region.

    I’m hopeful that we can improve this in the future, but I don’t have a specific timeline or release for timestamp support.