Programmatically print to a PDF printer [closed]
Asked Answered
B

1

1

I am looking for a free open source .Net based, preferably C#, pdf printer such as CutePDF's Custom PDF Writer with programmatic access that will allow me to save a xps document to a pdf format. I have found many alternatives that are capable of converting xps documents to pdf formats, but they are not open source. I was curious to know if anyone is aware of an open source library that will allow me to accomplish this.

Beltane answered 4/1, 2013 at 18:1 Comment(1)
Take a look at this question: #6396374Dart
B
2

For any of you out there attempting to convert XPS to PDF using an open source means, I was able to successfully do so using PDFSharp version 1.31. It successfully upgraded to .NET 4.5 and I included the PdfSharp.Xps project into my solution. Once you include all the references, you only need a single line to link to your XPS file.

XpsConverter.Convert("D:\\Example\\test.xps");

Note: There are also other constructors available but I used the most simplistic one in my example.

Hope this helps!

Beltane answered 7/1, 2013 at 15:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.