7
votes

I need PDFsharp's XPS functionality to convert from WPF -> XPS -> PDF. I've tried referencing PDFsharp 1.20, 1.30, 1.31 and also 1.32, but none of these contain the mystical PdfSharp.Xps namespace that everyone is talking about. Apparently 1.31 was the last version to include the XPS functionality, but I didn't find anything in there either.

This is the one line of code I need it for:

//error: 'Xps' is not a member of 'PdfSharp'
var test = PdfSharp.Xps.XpsModel.XpsDocument.Open(_MemoryStream);
1
Did you add a ref to PdfSharp.Xps.dll assembly?EkoostikMartin
@EkoostikMartin I didn't get that dll with any of the versions I downloaded.user928112

1 Answers

4
votes

The latest version that includes the XPS project is version 1.31.

Downloads are available here:
https://sourceforge.net/projects/pdfsharp/files/pdfsharp/

Get the file PDFSharp-MigraDocFoundation-1_31.zip and add the C# projects to your solution and reference these projects from your project.