I have an application for viewing Word and Excel Files via Xps Viewer. I convert office files to xps files and show it in WPF XPS Document Viewer.
But here is a little problem; I don’t want the users see the files, i delete the files after closing.
I am wondering is there any solution to convert xps in to memory stream and view it in Xps Viewer
Edit:
I don’t want create any xps file on disk. The convert process must done inside to MemoryStream.
Following lines of code worked fine for me on a poc project and can give you a starting point.
For the document conversion part (word/excel -> xps) you could just print them via automation using XPS Document Writer.