Share via


PDF to XPS

Question

Wednesday, June 29, 2011 12:35 PM

Hi ,

I want to convert a PDF file to XPS file. I searched a lot on google but found no free utility for this task.

There was one command line utility "AcroRd32.exe" which can do the conversion but the problem is after converting the PDF to XPS, it prompts the user to save the output XPS file to some location on the disk. But i want that my program will sweep an input directory containing PDF files and convert them into XPS files and save the XPS files to an output directory without prompting the user.

Thanks in advance.

All replies (3)

Monday, July 4, 2011 4:53 AM âś…Answered

Hi,

Seems that there are few free open source for PDF to XPS converter.

But you can check this link:

http://social.msdn.microsoft.com/Forums/en/windowsxps/thread/1917fede-bf5c-4c66-92cd-e97cfa0206cc

It mentioned that you can first convert pdf to another appropriate format such as image by using ghostscript. Then you can use XpsDocumentWriter class in .net to create the xps file.

Or you can check this link:

http://social.msdn.microsoft.com/forums/en-US/wpf/thread/98df1866-ca27-47f1-8e5d-14a4338ba6b8/

Hope this can help you.


Wednesday, June 29, 2011 11:34 PM

 

AbcPdf version 7 includes this funcationality, if you link back to their site you can have a free license key. Utilize the save method to accomplish PDF - XPS conversions.

XPS is exported only if the supplied path ends with ".xps", and it requires the .NET Framework 3.0. XPS is supported via Doc.SaveOptions.FileExtension of the Save method when saving to a stream. Set this property to either ".xps" or "xps" otherwise a conventional PDF output will be generated. XPS streams must have FileAccess.ReadWrite and not simply FileAccess.Write otherwise the operation will fail.

virtual void Save(Stream stream) 

Thursday, June 30, 2011 2:35 AM

I linked back to their site but didn't find any free license key. Could you please suggest, where to get free license key OR any other solution for PDF to XPS conversion. I want an open source utility for this.

Thanks!!