Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PDFsharp missing the Xps namespace

Tags:

c#

wpf

pdfsharp

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);
like image 200
user928112 Avatar asked May 21 '14 14:05

user928112


Video Answer


1 Answers

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.

like image 181
I liked the old Stack Overflow Avatar answered Sep 17 '22 20:09

I liked the old Stack Overflow