Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
I'm interested if there is an answer - I've tried to recompile the latest evince under 11.10 - however the rerequisites breaks 11.10 (GTK, libpoppler etc) - therefore I'm doubtful that there is a 11.10 answer. Hope I'm wrong. –  fossfreedom Mar 26 '12 at 9:16
    
If you have any problems with xpsto* command line tools, you should file a bug upstream to libgxps: bugzilla.gnome.org/browse.cgi?product=libgxps - I maintain the ppa, I will try to upload the new 0.2.2 version of libgxps, maybe that fixes your issue. My test files worked fine: bugs.launchpad.net/ubuntu/+source/libarchive/+bug/951139/… –  medigeek Mar 26 '12 at 16:56
    
@medigeek - that really should be an answer! –  fossfreedom Mar 27 '12 at 11:29
    
@medigeek You are right, your test files work fine! So it seems to be a problem of that xps I created from a strange pdf. I can't upload these files, but you can try it by yourself. –  Jakob Mar 27 '12 at 16:25
    
@fossfreedom Bruno's answer is enough, I didn't add any new ideas, since there's pretty much only one way to do it. :) Jakob, So you're trying to convert a pdf to an xps and then back to pdf? If so, I think the pdf you posted uses a new version (1.7) which is not supported by many applications. For example, I cannot open that pdf in evince: bugs.launchpad.net/ubuntu/+source/poppler/+bug/321720 –  medigeek Apr 2 '12 at 11:05
show 1 more comment

1 Answer

up vote 10 down vote accepted

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

share|improve this answer
    
@Jakob Lets hope a better answer comes from here, does a Use some other program answers look favorable to you? –  Bruno Pereira Mar 23 '12 at 14:04
    
@Jakob Understood, just wondering if this would become a dupe of the one you linked or if posted as an answer it would be worthy of the bounty. –  Bruno Pereira Mar 23 '12 at 15:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.