Search code examples
c#asp.netgdi+richtextcuteeditor

overlay a jpeg image with rich text using cute editor and GDI+


I am attempting to create and store a jpeg image on the fly with dynamic rich text. The rich text is comes from user input into the cute editor for asp.net. This particular editor can output either xHTML or rtf and some others. I'm using GDI+ to open a default background jpeg and overlaying it with the rich text from cute. I haven't found any way to do this yet.


Solution

  • One approach is to take the xHTML and render it server-side, then convert to an image. You could render the xHTML inside an HTML element that has the background set to your background image.

    You can find more info on how to do that here:

    How can I convert a DOM Tree into an Image

    Update: Direct link to source: http://www.tommyt.se/file.axd?file=Thumbnailer_src-0.2.zip