XPS 文件的结构是什么

发布于 2024-08-09 19:39:59 字数 55 浏览 12 评论 0原文

我认为,XPS 文件就像 PDF 文件,但是 XPS 文件的结构是什么?类似于 PDF 文件吗?

As I think, XPS files are like PDF files, but what is the structure od a XPS file? It's like PDF files?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

孤独陪着我 2024-08-16 19:39:59

CNET 上的 XPS 与 PDF

摘录:
XPS 文档的行为更像是 ZIP 存档文件,它包含在任何系统上重新创建文档所需的所有文件。通过将 XPS 扩展名更改为 ZIP,您可以查看与任何 XPS 文档相关的文件。特定文件包括嵌入的图像和字体,因此,如果某人没有在其计算机上安装相同的字体,XPS 查看器仍将呈现这些原始字体(即使仅针对文档)。

Adobe 的便携式文档格式 (PDF) 表示固定布局文档中的二维文档,该文档与设备和分辨率无关。这包括文本、表格、图像和 2D 矢量图形。由于 PDF 文件不包含特定于应用程序或创建它的操作系统的信息,因此 PDF 文件在任何计算机上都会呈现相同的效果。

简而言之:
尽管它与更流行的 Adob​​e 便携式文档格式 (PDF) 有许多相似之处,但 XPS 不是动态文档格式,主要用于转换屏幕内容,例如网站,转化为静态、可打印的文档。

XPS vs. PDF on CNET

Excerpt:
Behaving more like a ZIP archive file, XPS documents contain all the files necessary to re-create a document on any system. By changing the XPS extension to ZIP, you can view the files related to any XPS document. Specific files include embedded images and fonts so that, if someone doesn't have the same fonts installed on their machine, the XPS Viewer will still render those original fonts, if only for the document.

Portable Document Format (PDF), from Adobe, represents two-dimensional documents in a fixed-layout document that is both device- and resolution-independent. This includes text, forms, images, and 2D vector graphics. Because PDF files do not include information specific to the application or the operating system that created it, PDF files will render the same on any machine.

In short:
Although it shares many similarities with the much more popular Adobe Portable Document Format (PDF), XPS is not a dynamic document format and is designed primarily to transform onscreen content, such as Web sites, into static, printable documents.

就此别过 2024-08-16 19:39:59

剖析 XPS 和 < a href="http://www.microsoft.com/whdc/xps/default.mspx" rel="noreferrer">Microsoft XPS 页面。

梦断已成空 2024-08-16 19:39:59

主要区别在于 XPS 是 XAML 的子集,XAML 是 Microsoft 开发的 XML 形式。这意味着 XPS 由一堆结构化 XML 数据组成。 PDF 是由 PS 生成的对象的数据库。

更多信息请参见:

维基百科:OpenXPS 与 PDF

The main diff is the that XPS is a subset of XAML which is a form of XML developed By Microsoft. Which means that XPS consists of a bunch of structured XML data. PDF is a database of objects prodcued from PS.

More info here:

Wikipedia: OpenXPS vs PDF

伏妖词 2024-08-16 19:39:59

您可以在这篇维基百科文章中找到 PDF 和 XPS 之间的比较。如果您正在寻找用于读取、写入或打印 XPS 文件的 .Net 示例代码,请查看此 MSDN 上的文章

You can find comparisons between PDF and XPS in this Wikipedia article. If you're looking for .Net sample code to read, write, or print XPS files, look at this article on MSDN.

蓝戈者 2024-08-16 19:39:59

问题是“有什么区别”。现在它的性格完全改变了。

功能视角

它们都捕获针对特定尺寸纸张页面进行分页的打印就绪布局。

PDF 还可以进行交互式操作,例如您可以填写的表单。XPS 为了简单起见故意省略了它们。

技术角度

XPS 和 PDF 都是序列化对象图。 PDF 使用二进制序列化,而 XPS 采用现代的、类似 Web 的方法,使用文件系统来存储命名资源。然后,该文件树被压缩为标准 zip 文件。

文档本身以 XML 形式表示。这遭到了严厉的批评,因为 XML 很冗长,但当整个内容都被压缩时,这种批评毫无意义,因为 XML 压缩得非常好(它对字典压缩有很好的效果)。

从开发人员的角度来看

XPS 被设计和实现为 PDF 核心功能的小型、快速、实用的仿制品。与 PDF 不同的是,

  • 它有一个受支持的 API,记录在 MSDN 中。
  • 除了 .NET 框架之外,不需要任何特殊的库,因此没有版税或黑盒依赖项。
  • 该查看器内置于 Windows 中。

哲学视角

在 Windows 7 之前,平台仅支持 XPS。 Windows 8 确实引入了对 PDF 的平台支持,但大多数付费客户都是作为 SOE 一部分运行 XP 或 Windows 7 的公司,对他们来说,唯一可用的平台支持格式是 XPS。

更多关于 PDF 能做而 XPS 没有的事情

当它是城里唯一的游戏时,PDF 的表单支持是采用该技术的一个令人信服的论据。现在这种情况已经不那么真实了,因为它的许多用途已被 Web 应用程序取代。

PDF 支持 DRM。我确信有些图书出版商认为,如果没有 DRM,我们所知道的生活将会结束,但我认为更有可能的是,他们所知道的生活将会结束。

这些功能使 PDF 在结构上和从开发人员的角度都变得非常复杂。我自己的经验是它们很少被使用。

The question WAS "What is the difference". Now it's completely changed in character.

A functional perspective

They both capture a print-ready layout paginated for a particular size paper page.

PDF also does interactive things like forms you can fill in. XPS intentionally omits them in favour of simplicity.

A technical perspective

Both XPS and PDF are serialised object graphs. PDF uses a binary serialisation, whereas XPS takes a modern, web-like approach, using a file system to store named resources. This file tree is then compressed into a standard zip file.

The document proper is expressed as XML. This has been lambasted because XML is verbose, but the criticism is meaningless when the whole thing is zipped, because XML compresses extremely well (it yields well to dictionary compression).

A developer's perspective

XPS was designed and implemented as a small, fast, functional knockoff of PDF core functionality. Unlike PDF,

  • There's a supported API for it, documented in MSDN.
  • No special libraries are required beyond the .NET framework so there are no royalties or black box dependencies.
  • The viewer is built into Windows.

A philosophical perspective

Up to Windows 7 there was platform support only for XPS. Windows 8 did introduce platform support for PDF, but most paying customers are corporate running XP or Windows 7 as part of an SOE, and for them the only available platform-supported format is XPS.

Some more on things PDF does that XPS doesn't

When it was the only game in town, PDF's form support was a compelling argument for adoption of the technology. This is now much less true because many of the uses to which it was put have been taken over by web applications.

PDF supports DRM. I'm sure there are book publishers who think that without DRM, life as we know it would come to an end, but I think it more likely that life as they know it would end.

These capabilities greatly complicate PDF both structurally and from a developer's perspective. My own experience is that they are rarely used.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文