Mehar
Mehar

Reputation:

Can we Converting the xps document to Pdf programmatically using C#

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

Upvotes: 0

Views: 4500

Answers (2)

Dingo
Dingo

Reputation: 2765

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

Upvotes: 1

Mitch Wheat
Mitch Wheat

Reputation: 300559

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

Upvotes: 0

Related Questions