-5

THIS IS NOT A REQUEST FOR A LIBRARY.

(This is question about the evolution of PDF support in the Windows OS vis-a-vis PDF support.)

Like many here on SO, I seek a C# native PDF to raster (e.g. PDF to BMP or PDF to PNG) library. Like many, I have struggled with the lack of open source libs in this area. But, so much is going on in Win itself.... is there hope? (Win has had strong XPS support ... and is that moving toward PDF?)

Now that the Windows OS has more and more PDF support, are there either:

1) APIs in Windows to do this

and/or

2) Extensions to the .NET Framework itself with this kind of support?

UPDATE:

The winrt approach posted below, referencing Windows.Data.Pdf is close... but is no cigar. Windows.Data.Pdf is perfect, but is not surfaced for use by windows apps. It can only be used within a winrt app.

So close...

Jonesome Reinstate Monica
  • 6,618
  • 11
  • 65
  • 112
  • 3
    Like many questions here os SO. I vote it to close as *"Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow"* – L.B Aug 22 '15 at 00:34
  • @Jonesome you are still asking for a library: " I would strongly prefer an open source or low cost lib (solving it for $2K per server is not that interesting)." – Daniel A. White Aug 22 '15 at 00:37
  • 1
    @DanielA.White Touche. OP enhanced again. – Jonesome Reinstate Monica Aug 22 '15 at 00:40
  • 1
    Microsoft has for a long time been content to leave this to be provided by third parties, and like Daniel said, there are several commercial products (that are typically VERY expensive) and also several open source projects (not sure how good any of these are, but given the cost of the commercial products, it would be worth your time to investigate this). – Jeff Prince Aug 22 '15 at 00:55
  • I tried some similar yet different things a month ago, even asked a questions on stack here http://stackoverflow.com/questions/31709393/visualbrush-resources-not-included-in-visual-in-xps-to-bitmap-conversion ... just wanting to convert XPS documents to Image. The code does work for simple documents but would not in my examples (which was the whole reason I was going down that path). I abandoned that and went for an alternative solution. – Kevin Brown Aug 22 '15 at 05:32
  • @L.B Per revised OP and widely upvoted answer, can you remove vote to close? – Jonesome Reinstate Monica Aug 23 '15 at 18:26
  • @DanielA.White Per revised OP and widely upvoted answer, can you remove vote to close? – Jonesome Reinstate Monica Aug 23 '15 at 18:26

1 Answers1

4

Yes. The Windows.Data.Pdf namespace contains many APIs that allow you to render PDFs.

These APIs are available to WinRT applications, but there are ways to use certain WinRT APIs from desktop applications if that is what you need.

Edit: It appears that this library can only be used in Windows RT apps and cannot be used in desktop apps.

There is also a video from 2013 build on rendering PDFs in WinRT applications.

John Koerner
  • 37,428
  • 8
  • 84
  • 134