How to Open an .xps File in Evince

11.10evincexps-file

On projects.gnome.org I read that evince/Document Viewer supports xps-files. But when I try to open an xps-file I get the error message

Unable to open document
File type Zip archive (application/zip) is not supported

Reading "the full list of supported document formats" on live.gnome.org I can't find xps there.

Now I ask myself (and you): Isn't Document Viewer able to open xps-files, or is there something wrong with that xps-file I try to open?

I specifically want to do this with Ubuntu 11.10 Oneiric.


I'd like to see a solution for Evince or Gnome in general, not get a recommendation for a KDE application like here.

Best Answer

There is nothing wrong with what you are doing, the problem is that for Ubuntu 11.10 the necessary library to open .xps files was not included and at the moment there is no package for it.

This has apparently and possibly will be included by default in Ubuntu 12.04.

You can add support to convert .xps files in to another format tough. On the packager's PPA you can read

Note: The evince version in ubuntu 11.10 oneiric ocelot doesn't work with xps (segmentation fault when opening the file) and there are several packages to be backported. I've decided not to backport it. It works in ubuntu 12.04 precise pangolin. If you need to read an xps file, package libgxps-utils provides enough conversion tools, e.g. command: xpstopdf myfile.xps.

That means that you can add the PPA to your system and at least convert your .xps to another format that can be opened in your system.


To do that add the PPA to your system

sudo add-apt-repository ppa:medigeek/evince-xps

Update and install the necessary tools to convert your files

sudo apt-get update && sudo apt-get install libgxps-utils

You will then be able to convert your .xps files in to another format as described in the PPA description

xpstopdf foo_file.xps

will convert a file called foo_file.xps in to a .pdf file.


For more information on PPAs and how to use them please have a look at any of these 2 posts