0

I am new to the xps documents. I have requirement like convert xps doucment to Pdf format. Can any body have an idea how to do this.

Can u give me any code samples.

Thanks in Advance..

Mehar

Dan F
  • 11,958
  • 3
  • 48
  • 72
  • For an open-source solution, see this [question](http://stackoverflow.com/questions/14162392/programmatically-print-to-a-pdf-printer). Hope this helps someone! – killaJewl Jan 07 '13 at 18:03
  • Does this answer your question? [Is ther any open tool to convert XPS to PDF?](https://stackoverflow.com/questions/29108319/is-ther-any-open-tool-to-convert-xps-to-pdf) – Orace Jun 12 '20 at 08:07
  • Does it answer you question https://stackoverflow.com/a/67146033/9368328 – Tony Stark Apr 18 '21 at 07:15

2 Answers2

1

woof woof!

you can use

ghostpdl

ghostpdl is a set of three utilities

pcl6
gxps
gsvg

to convert the file to PDF format. GhostPDL can handle SVG (and XPS or PCL) in a similar way as Ghostscript does handle PostScript

a sample of how to convert xps to pdf with gsvg

gxps -dNOPAUSE -dBATCH -dSAFER -sOutputFile=my.pdf -sDEVICE=pdfwrite file.xps
Dingo
  • 2,619
  • 1
  • 22
  • 32
0

Not free, but does what you need: VeryDOC XPS to PDF Converter

Another possibility is to convert the XPS document to a Word Doc, and then use a free third party library to convert the Word Doc to PDF (such as SharpPDF).

2007 Microsoft Office Add-in: Microsoft Save as PDF or XPS

Mitch Wheat
  • 295,962
  • 43
  • 465
  • 541