1

I have been using the System.Windows.Xps.Packaging.XpsDocument class in an WPF application to export a collection of UIElements. It seems to work quite okay, but not always.

When there are two visuals with exactly the same visual properties, they do not appear, when the XPS file is opened with Microsoft's XPS Viewer. The identical elements do not appear at all. If I open the xps file with some other viewer or just use some online tool to convert it to PDF, everything is rendered properly:

Left is correct rendering, right is the wrong

Does anyone know what might be the cause for this behavior and how can I remedy it?

Here is also a link to the XPS file, that demonstrates the behavior.

Thank you!

roskoN
  • 333
  • 4
  • 12

1 Answers1

0

Not really a solution, but this seems like an issue related to the XPS viewers implementation of the xps standard. You´re not the first one to encounter this issue : https://social.msdn.microsoft.com/Forums/en-US/43319dbd-e359-45f8-aa90-0f5835617981/xps-file-hides-some-elements-on-some-viewers?forum=windowsxps

So probably nothing you can do about it.

lhildebrandt
  • 294
  • 1
  • 9