How can I use Ghostscript to convert XPS to PDF or XPS to DOC?

10,623

Solution 1

XPS to PDF:
You can use GhostXPS (part of GhostPDL):

gxps.exe ^
 -o output.pdf ^
  c:/path/to/input.xps

Solution 2

While gxps and ghostscript are a possible solution, the syntax of the accepted answer did not work for me.

I was able to use ghostscript and gxps using the following syntax:

C:\gxps-871.exe -sDEVICE=pdfwrite -sOutputFile=myfile.pdf -dNOPAUSE myfile.xps

One comment on tab path completion: gxps doesn't seem to understand some of the Windows 7 symbolic links like My Documents well. If you have trouble tab-completing to your path, consider a temp folder in c:.

Credit where credit is due: I got this syntax from this blog: http://minhtech.com/windows/convert-xps-to-pdf-without-printer-driver/

Share:
10,623
Dhyanesh
Author by

Dhyanesh

Updated on June 08, 2022

Comments

  • Dhyanesh
    Dhyanesh about 2 years

    Which one is the best third party libary to convert XPS to PDF and XPS to DOC.

  • dns
    dns almost 10 years
    Not working in newer version of GhostXPS
  • dns
    dns almost 10 years
    This is the correct answer, thanks ^^
  • danicotra
    danicotra over 7 years
    I agree, this is the correct answer so far (at least for what concerns XPS to PDF conversion)
  • danicotra
    danicotra over 7 years
  • Mohammed Noureldin
    Mohammed Noureldin over 3 years
    I liked GhostScript, unfortuntately, its license is GPL, so in practice in many cases it cannot be used..