What Is The Structure Of a XPS File
Asked Answered
S

5

3

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

Swagman answered 6/11, 2009 at 20:0 Comment(1)
tip: you can open and print XPS files with Internet Explorer.Goodall
M
5

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.

Marksman answered 6/11, 2009 at 20:4 Comment(0)
B
5

Dissecting XPS and Microsoft XPS Page.

Bordereau answered 6/11, 2009 at 20:6 Comment(0)
B
2

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

Broadleaf answered 6/11, 2009 at 20:10 Comment(0)
T
1

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.

Transduction answered 6/11, 2009 at 20:7 Comment(0)
E
0

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.

Exit answered 24/6, 2015 at 5:11 Comment(7)
Sorry, I don't agree with your assessment at all. Windows and .NET are indeed proprietary while there is nothing about PDF that is proprietary. There was - it used to be owned by Adobe - but today PDF is an ISO standard (ISO 32000) which makes it completely open and royalty free in any way imaginable. I understand you like XPS better than PDF but your answer is heavily skewed and close to being factually incorrect.Annabellannabella
PDF may be technically blessed as a standard but Adobe Reader is proprietary technology. So is Foxit Reader. Prior to Windows 8 there was no way to use PDF without proprietary tech. The reader shipped with Windows 8 is also proprietary, but now at least it's platform supported. From a development perspective the two formats are functionally equivalent, but worlds apart in terms of API quality and documentation. I say this on the basis of having spent the last week implementing both PDF and XPS generators for the same documents, coming in cold to both. What's your opinion based on?Exit
Sorry, but what you're saying is still not correct. There certainly are ways to use PDF without proprietary technology - you can write your own based on an ISO standard. It doesn't get much better than that. The PDF specification - while being intricate - is also quite good. I don't have an opinion on XPS as I've never actively worked with it, but I have 15 years of experience with PDF and about the same amount of time with working on and with PDF standards.Annabellannabella
In what way is writing your own implementation of an ISO standard better than using a stable, complete and mature implementation of a platform supported ECMA standard with identical functionality?Exit
I'm not saying what is better or worse. My original statement was that your answer is horribly skewed. I'll say one last thing: your platform - Windows / .NET - is not the only platform and it's proprietary. That means that platform support doesn't help me one bit when I'm on Mac or Linux (just as an example). If I implement an ISO standard correctly I have 1) a non-proprietary implementation and 2) something that works on any platform I need it. Once more, I'm not commenting on XPS at all as I don't know it enough but as far as your statements about PDF - they're horribly skewed.Annabellannabella
From the text, here are all the things I said about PDF: "PDF uses a binary serialisation...PDF also does interactive things like forms...PDF's form support has lost relevance, being largely superseded by web technology...PDF supports DRM...These rarely used capabilities greatly complicate PDF". In what way are any of these statements skewed?Exit
I think you're interpreting "has lost relevance" as "is now irrelevant" which is not what I meant. PDF forms have less relevance now than when they were new and shiny because web apps do forms quite well. I will amend the text for clarity.Exit

© 2022 - 2024 — McMap. All rights reserved.