Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Download into MS Word document including images

Reply
Thread Tools

Download into MS Word document including images

 
 
gerard.buskermolen@getronics.com
Guest
Posts: n/a
 
      12-15-2005
Hello world,

I have an ASP.NET application that returns HTML to the browser that
should be read by MS Word.
To do this I set

Response.ContentType = ContentType.Word
Response.AddHeader("Content-Disposition", "Report.doc")

and render the HTML.
The browser (IE6.0) shows a dialog box which enables the user to Open
the HTML in Word or save the report to disk.

So far so good.

But now I want to include a number of images into the Word document.
These images are created on the fly during the generation of the HTML
(so they are not available in a file on the webserver. In fact, for
each image I've got an System.IO.Stream representing the image).

I know that there is something like

<img src="data:image/gif;base64,iVBORw0KG....." >

to include the image itself in the HTML. This construction is
understood by Firefox, but not by IE or MS Word.

So I think I should download the images as seperate files. A
subdirectory
in de Temporary Internet Files should be created, the images should be
saved in this subdirectory and the HTML should refer to those images,
for example <img src="MyDir\MyImageFile.jgp">.

Does anyone know how to do this or have any other suggestion?

Thanks in advance,
Gerard

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
generating word document with header and footerwithout using word object. srk ASP .Net 0 04-24-2007 01:59 PM
capture ALL image urls used in document including background images Rob Javascript 6 04-07-2007 08:42 PM
Upload into Word document with images gerard.buskermolen@getronics.com ASP .Net 2 12-16-2005 07:48 AM
Including XSLT/XML document within a XSLT document dar_imiro@hotmail.com XML 4 12-13-2005 02:26 AM
Help on including one XML document within another XML document using XML Schemas Tony Prichard XML 0 12-12-2003 03:18 PM



Advertisments