Using ITextSharp to generate XPS documents instead of PDF?

2.5k views Asked by At

I'm using ITextSharp to generate PDF files. Is it also possible to generate XPS files? And if yes, how?

Can't find any documentation. Thanks!

2

There are 2 answers

0
John Koerner On BEST ANSWER

iTextSharp is a library specifically built to generate PDF files, so that is not going to create XPS files for you. The System.Windows.Xps namespace provides you with methods for writing XPS documents from your code for .net 3.5 and higher.

5
Mark Redman On

An Idea: You could try creating the PDF using iTextSharp, then converting it to XPS using GhostScript to print to an XPS printer driver?