Building a document with text and images from streams

别等时光非礼了梦想. 提交于 2019-12-11 23:23:38

问题


I would need to display certain images and text in c# WinForms application, so I decided to use WebBrowser. Both images and text are retrieved from the database. However, I don't know how to combine them in the document creation. Thank you!


回答1:


Besides nobugz's suggestion, you can implement IMoniker on an object that exposes your data as mht (web archive) and use IE document's IPersistMoniker interface to load from your object. http://www.codeproject.com/KB/miscctrl/csEXWB.aspx is an example for this interface. The benefit of using IMoniker over IStream is that you can specify a base URL for your document.



来源:https://stackoverflow.com/questions/1797469/building-a-document-with-text-and-images-from-streams

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!