Search code examples
c#.netpdfitextxps

Using ITextSharp to generate XPS documents instead of PDF?


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!


Solution

  • 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.