开发者

How to present a pdf object using Win32 API?

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


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.


You can use MuPDF to render PDF in native Win32 program.

Learn the SumatraPDF source code to see how it works (SumatraPDF itself use MuPDF).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜