xps2pdf, xpstopdf

This article was written some time ago, in the meantime Okular in KDE4 does indeed support the XPS format, but sometimes you get sloppy performances, or you still need to convert files from XPS to PDF for some reasons.

Here are the instructions, updated for Debian Wheezy:

  1. download the “GhostXPS/GhostPDL 9.04 Source for all platforms”:

    wget http://downloads.ghostscript.com/public/ghostpdl-9.04.tar.gz
    
  2. extract and configure

    tar xf Scaricati/ghostpdl-9.04.tar.gz
    cd ghostpdl-9.04/
    ./configure
    
  3. tweak a small file

    echo '#define HAVE_SYS_TIME_H' >> xps/obj/gconfig_.h
    
  4. compile

    make xps
    
  5. convert your file

    cd xps/obj
    ./gxps -sDEVICE=pdfwrite -sOutputFile=test.pdf -dNOPAUSE test.xps
    

Enjoy !