0

I have a program that generates a FixedDocument object and displays that in the XPS DocumentViewer. According to the documentation on MSDN "Fixed documents are intended for applications that require a precise "what you see is what you get" (WYSIWYG) presentation, independent of the display or printer hardware used. "

That is exactly what I want, however..

When I open the same document in the XPS DocumentViewers of Windows XP and Windows 7 there is a big difference in how the document is presented. The Windows 7 version seems to be using a bigger font and more spacing between the elements. What can cause this? Isn't the purpose of the FixedDocument that it always looks the same regardless of OS or printer or whatever?

I have done some googling on the subject but can't find anything relevant and appreciate any suggestion you can give.

Thanks!

  • On Windows XP, are you using the XPS Essentials Pack viewer, which is standalone, or the viewer included in the .NET Framework, which runs hosted in IE? – mloar Feb 01 '12 at 23:57
  • In XP I'm using the viewer included in the .NET framework. – Tedje van Es Feb 02 '12 at 09:07

1 Answers1

0

You haven't asked a specific question, but I'll offer what I know about the subject.

The renderers used by the windows XP document viewer and windows 7 document viewer are vastly different. I believe, but can not confirm, that the XP version was contracted out to another company, while the windows 7 version was done in house. Where there are differences, the windows 7 renderer is generally more accurate with respect to the XPS specification. If you send that FixedDocument directly to an xps capable printer, you will also get results that differ somewhat from what you saw in either viewer, due to yet another renderer being invoked on the printer.

This is a limitation of any document format that relies on rendering being performed by the client. HTML suffers from similar problems - every browser renders html somewhat differently, so while the results may look similar, they are never identical.

What can you do about it? Not much. The differences between different XPS renderers should be small enough that they are not an issue in most cases. If you truly need pixel perfect accuracy across platforms, you need to move to a rasterized format.

Jon
  • 3,065
  • 1
  • 19
  • 29
  • Thanks Jon, this is useful information. Unfortunately for me the differences between the XPS renderers is big enough to mess up the documents I'm printing. For example when on XP it fits nicely on A4, whereas on Windows 7 the same document looses the last 4 lines. I think Microsoft should revise it's documentation and remove the part "independent of the display or printer hardware used"...In any case, I will focus on getting it right for Windows 7 and just hope that will be good enough for all printers out there. Thanks again! – Tedje van Es Feb 02 '12 at 09:26
  • @TedjevanEs That's unfortunate. Normally the differences are not so drastic. – Jon Feb 02 '12 at 14:56
  • Is your issue primarily around printing, and not display? If so, the issue may be related to PrintTickets. – mloar Feb 14 '12 at 04:29