Upload into Word document with images

Discussion in 'ASP .Net' started by gerard.buskermolen@getronics.com, Dec 15, 2005.

  1. Guest

    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 and render the
    HTML.
    The browser (IE6.0) shows a dialog box which enables the user to Open
    the HTML in Word or save it 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).
    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 upload 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
     
    , Dec 15, 2005
    #1
    1. Advertising

  2. Bruce Barker Guest

    you need to defer image generation until the image fetch

    <img src="generateImage.aspx?id=18282">

    where id identifies the parameters need to generate the image.

    -- bruce (sqlwork.com)


    <> wrote in message
    news:...
    > 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 and render the
    > HTML.
    > The browser (IE6.0) shows a dialog box which enables the user to Open
    > the HTML in Word or save it 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).
    > 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 upload 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
    >
     
    Bruce Barker, Dec 15, 2005
    #2
    1. Advertising

  3. Guest

    Bruce,

    Thanks for reaction. I'm glad you were not mislead by the word
    "Upload".
    Of course it should have been "Download".

    I'm afraid you're proposed solution has one disadvantage: if the user
    saves the Word-document and wants to review it when offline,
    he won't see the images anymore.

    Do you think there is solution that doesn't have this disadvantage, or
    am I looking for something that is just impossible?

    Gerard
     
    , Dec 16, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    468
  2. srk
    Replies:
    0
    Views:
    692
  3. srk
    Replies:
    0
    Views:
    646
  4. kalyan

    Upload word document

    kalyan, Sep 23, 2003, in forum: ASP General
    Replies:
    1
    Views:
    125
    Atrax
    Sep 24, 2003
  5. Michael G. Schneider

    Modifying a Word document without using Word Automation

    Michael G. Schneider, Dec 15, 2003, in forum: ASP General
    Replies:
    5
    Views:
    325
    el.c. - myLittleTools.net
    Dec 16, 2003
Loading...

Share This Page