1

Is there any way to save .xps document as pdf document from wpf without using any third party libraries? To be more precise, I have a documentviewer control in which I preview some xps document. I added some button "Create pdf" which I planing to use for saving my document as pdf. For any more info about question leave the comments please, I tried to be as short as possible.

Stojdza
  • 445
  • 2
  • 10
  • 32
  • Pretty sure this is not a direct feature in .NET. DocumentViewerBase.Print will invoke a print dialog that you could print to PDF but don't know if that can be automated. – paparazzo Mar 12 '14 at 16:51
  • I know that I can use some pdf printer to do this, but i was planing to do it via save dialog, or something more like that. The document I'm trying to save as pdf, is actually report, so I changed default documentviewer template and added this button, which my client will then use to save pdf version of a report. I was searching for this but all I found was some third party libraries, mostly not free, that I'm trying to avoid. – Stojdza Mar 12 '14 at 16:57
  • While this may not meet your requirements, RenderX has C# code that can interpret XPS to their intermediate format. You could run this C# code in your application along with their CloudFormatter application which can accept this input, format to PDF and return the result. Low volume use of RenderX's Cloudformatter is free (under 1000 pages/month). – Kevin Brown Mar 12 '14 at 18:53
  • Well thank you for your replays. It's kind of disappointing to know that there is no way to do this without some third party library. Anyway thank you all again! – Stojdza Mar 12 '14 at 19:31

1 Answers1

0

There is no built in support to convert XPS to PDF. You need a third party library if you don't want to do all the coding for converting it one by one.

You might want to look at PDFSharp

123 456 789 0
  • 10,565
  • 4
  • 43
  • 72