Which one is the best third party libary to convert XPS to PDF and XPS to DOC.
Asked
Active
Viewed 1.2k times
9
-
In OS X you can run `brew install libgxps` and then run `xpstopdf input.xps output.pdf` to convert XPS to PDF. – nisetama Jan 16 '16 at 23:34
2 Answers
27
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/

Keith Hoffman
- 608
- 5
- 16
-
I agree, this is the correct answer so far (at least for what concerns XPS to PDF conversion) – danicotra Oct 16 '16 at 18:49
-
1Linking to [another possible syntax to do the same thing using GhostXPS](http://softwarerecs.stackexchange.com/a/18460/15456) – danicotra Oct 30 '16 at 19:31
-
I liked GhostScript, unfortuntately, its license is GPL, so in practice in many cases it cannot be used.. – Mohammed Noureldin Oct 29 '20 at 08:43
2
XPS to PDF:
You can use GhostXPS (part of GhostPDL):
gxps.exe ^
-o output.pdf ^
c:/path/to/input.xps

Kurt Pfeifle
- 86,724
- 23
- 248
- 345