tags:

views:

36

answers:

1

Hi,

How can I render a pdf stream in a new memory using win32 API ?

I know that ShellExecute can be used if the file is already saved on disk but what if I want to do that without having to first save the file ?

Thanks

+1  A: 

As far as I'm aware, win32 doesn't include a way to natively display PDF files. So I think your only choice is to save it to disk (perhaps in a temporary folder somewhere) and then use ShellExecute or equivalent to launch it, and hope the user has a PDF viewing application installed. :(

Edit: Andreas in a comment to this answer mentioned that there's an ActiveX control you should use, if you can rely on Adobe Acrobat being installed.

Colen
Or you could use the ActiveX control, as web browsers and e-mail clients do. But still, you need Adobe Reader installed.
Andreas Rejbrand