tags:

views:

303

answers:

1

Hey Guys,

I want to make a simple xps file in wpf please tell me the whole code and step by step process as i am new in WPF.

A: 

Here's a great tutorial on the subject:

http://www.dsmyth.net/wiki/StudyNotes_WPFFlowDocToXPSFixedDoc.ashx

free-dom
hey thanks man, but that code is to convert xaml to xps , can u also tell me how to write a xps file
Jolley
Here's a code snip to write an XPS to a memorystream, you can easily create a filestream if you want it on disk:// create XPS file based on a WPF Visual, and store it in a memorystreamMemoryStream lMemoryStream = new MemoryStream();Package package = Package.Open(lMemoryStream, FileMode.Create);XpsDocument doc = new XpsDocument(package);XpsDocumentWriter writer = XpsDocument.CreateXpsDocumentWriter(doc);writer.Write(CreateVisual());doc.Close();package.Close();(source: http://nixps.blogspot.com/2008/12/wpf-to-pdf.html)
nixps
source page is not available anymore
Padu Merloti