Download into MS Word document including images
- From: gerard.buskermolen@xxxxxxxxxxxxx
- Date: 15 Dec 2005 05:15:26 -0800
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
.
- Prev by Date: Re: asynchronous, callback, dropdownlist, v2.0
- Next by Date: updateproblem with usercontrol, page and masterpage
- Previous by thread: How to deploy iis 6.0 with Remotely Stored Content on UNC Servers and NAS Devices.
- Next by thread: updateproblem with usercontrol, page and masterpage
- Index(es):
Relevant Pages
|
|