How to view an XPS file?

48,340

Solution 1

Okular, the KDE pdf viewer, supports XPS. The package name is okular I'm not aware of any GNOME/GTK+ viewers that support XPS, though according to this evince bug in upstream GNOME support has been added. It's not working for me in Maverick....

Solution 2

Evince has XPS support now. Check: http://projects.gnome.org/evince/?guid=ON

Solution 3

To me, the most suitable solution on my 12.04 computer was to convert the XPS file to PDF on the command line through

xpstopdf file.xps

and viewing the newly created file.pdf using whatever PDF viewer (acroread in my case).

This required installing the package libgxps-utils.

(Evince did not open the XPS file that I ran into, at least out of the box, but complained "File type Zip archive (application/zip) is not supported".)

Solution 4

If you want to create XPS files, your best bet may be to try to build the GhostXPS component of GhostPDL (part of the Ghostscript suite); I don't know if this has ever been pacakged for Ubuntu, and I don't have first-hand experience with it.

Inkscape can both read and write .xaml files. I suppose it could even be used to convert, e.g., .pdf or .svg to .xaml. I don't know, however, whether or not it can handle .xps files directly (perhaps not).

Share:
48,340

Related videos on Youtube

Ivan
Author by

Ivan

Updated on September 17, 2022

Comments

  • Ivan
    Ivan almost 2 years

    Some times I have to deal with XPS files (XPS is a Microsoft's rival to Adobe's PDF format, technically a zipped XAML (XML)).

    Can I view them in Ubuntu? Or, maybe, I could even produce them?

  • Sanam Patel
    Sanam Patel over 12 years
    Google Docs also supports this format as of February 2011: googledocs.blogspot.com/2011/02/…
  • Ivan
    Ivan over 12 years
    Did you know, MS SampleXpsDocuments archive is a Win32 executable and weights 159 MiB? :-) I am going to check the answer (to know it Evince XPS support is really usable) as soon as I find a sane XPS file to try...
  • Jakob
    Jakob over 12 years
    Does Evince really support XPS? The link below the list doesn't say so. And it doesn't work here.
  • macrobook
    macrobook over 12 years
    @Jakob evince upstream supports it, but the package in ubuntu does not currenty use it. It requires a package libgxps which was just included in 12.04 and to be enabled in evince package, which is underway - there is no guarantee though because we're a bit late. See askubuntu.com/questions/112852/… and "XPS not supported"
  • Tarik
    Tarik about 10 years
    Inkskape failed to read my xps file
  • Tarik
    Tarik about 10 years
    Okular did the job but Arabic characters are garbled.
  • Tarik
    Tarik about 10 years
    xpstopdf crashed when invoked.
  • Tarik
    Tarik about 10 years
    Evince showed my XPS file as a blank page.
  • Steve Kroon
    Steve Kroon almost 10 years
    Same here - error message was "Error creating XPS file: Invalid XPS File: fixedrepresentation not found"
  • etech
    etech over 8 years
    Didn't work for me: (xpstopdf:87500): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
  • spikeyang
    spikeyang over 8 years
    Worked for me. On Ubuntu 14.0.2, great!
  • Jacob Rodrigues
    Jacob Rodrigues over 8 years
    @SteveKroon: I get that with OXPS files. Normal XPS seems to work...
  • luca76
    luca76 about 8 years
    Now the bug you are reporting is resolved fixed! :-)
  • Digger
    Digger over 6 years
    Currently rocking Debian 7 (Wheezy). Although not perfect (some kerning errors seem ot pop up here and there), this solution works better for me than does using Evince (my version of Evince has XPS support, but sometimes does a poor job of coverting).
  • Sandeep
    Sandeep over 4 years
    Okular fails on my oxps file ("Could not open file.oxps").
  • Sandeep
    Sandeep over 4 years
    evince states "Unable to open document" on my oxps file.