与 XP 相比,什么会导致 XPS FixDocument 在 Windows 7 上看起来不同?
我有一个程序可以生成固定文档对象并将其显示在 XPS 文档查看器中。根据 MSDN 上的文档,“固定文档适用于需要精确的“所见即所得”(WYSIWYG) 演示的应用程序,与所使用的显示器或打印机硬件无关。”
但这正是我想要的。 当我在 Windows XP 和 Windows 7 的 XPS DocumentViewers 中打开相同的文档时,
文档的呈现方式有很大差异。 Windows 7 版本似乎使用了更大的字体和元素之间更大的间距。什么会导致这种情况?固定文档的目的不就是无论操作系统、打印机还是其他什么,它看起来总是一样吗?
我已经对这个主题进行了一些谷歌搜索,但找不到任何相关内容,并且感谢您提供的任何建议。
谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您没有提出具体问题,但我会提供我对这个主题的了解。
Windows XP 文档查看器和 Windows 7 文档查看器使用的渲染器有很大不同。我相信,但无法证实,XP 版本是外包给另一家公司的,而 Windows 7 版本是在内部完成的。如果存在差异,Windows 7 渲染器通常比 XPS 规范更准确。如果您将该FixedDocument 直接发送到支持xps 的打印机,您还会得到与在任一查看器中看到的结果有所不同的结果,因为打印机上还调用了另一个渲染器。
这是依赖于客户端执行的呈现的任何文档格式的限制。 HTML 也遇到类似的问题 - 每个浏览器呈现 html 的方式都有些不同,因此虽然结果可能看起来相似,但它们永远不会相同。
你能做些什么呢?
不多。不同 XPS 渲染器之间的差异应该足够小,在大多数情况下都不是问题。如果您确实需要跨平台的像素完美精度,则需要转向光栅化格式。
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.