Generating XPS and PDF Documents with VSTO Assemblies

It’s not always easy to manage XPS documents, especially when creating them, even if the .NET Framework provides full support for them. In fact, this task mostly requires writing a lot of complex code, especially if you want to add pictures, thumbnails, digital signatures, and so on.

The situation is even more complex when talking about PDF documents, since .NET doesn’t provide any native support. A pretty good alternative is available for generating XPS and PDF documents starting from Microsoft Word documents (.docx and .doc). With limited effort, you can include some assemblies from the Visual Studio Tools for Office (VSTO), generating XPS and PDF documents with less than 30 lines of code. ...

Get Hidden WPF: Secrets for Creating Great Applications in Windows Presentation Foundation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.