streaming non-HTML content into AxShDocVw

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Arno richard (msdn.newsgroups_at_workingbydesign.com)
Date: 02/16/04


Date: Mon, 16 Feb 2004 05:21:06 -0800

all,

There's a lot of information in all forums about the basic usage of AxShWebVw, using the Navigate() method, and some on how to stream content directly into the control using the IPersistStreamInit interface.

The 1st method (navigate) easily allows you to navigate to any type of document recognised by IE, including Office documents and PDF files.

The 2nd method (stream) not-that-easily-but-still allows you to generate content on the fly and stream that into the AxSHDocVw.AxWebBrowser.Document property.... but so far, I've only been able to stream TEXT, HTML and JPEG documents.

... and of course, my task is to generate XLS and PDF files (and more formats in the future!) on the fly, and display them using their native format... which is why I went the AxShDocVw route, so that I can leave IE's control handle the formatting. But all I get is a display as text of all bytes of my data inside the control, not my generated document.
Of course, I could write the document to disk and use the 1st method, but I can't for security reasons (documents have to be in memory only, not editable, not printable, not savable, no copy & paste....).

Now I wonder if that's possible at all to stream non-HTML content into this control... Any help will be most than warmly welcome!!!

Arnaud Richard



Relevant Pages

  • Re: Pls Help with empty Print Preview
    ... HRESULT InvokeScript(LPCOLESTR lpszName, VARIANT* pvarParam1 = NULL, ... >> Navigate()? ... > you pass the ownership of the handle to the stream object. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: some water resources for the Upper Midwest
    ... the stream is navigable, you can navigate it unfettered -- no trespass laws apply, no matter who owns the land it runs through. ... much hinges on the definition of a navigable stream. ... happens to be the Eastern Continental Divide) behind my family's house and down the other side, there's a creek by the name of John's Creek. ... But, you see, this particular stretch happens to run through private land. ...
    (rec.arts.sf.composition)
  • Re: Loading XML into WebBrowser
    ... >>> I also noticed that even when you Navigate to an XML file which is ... >>> It's the raw XML. ... > I ran across a technique for loading MHTNL in WebBrowser using an APP ... So, if you have your XML in a stream, you would build an APP that took ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Detecting and Processing the Key ?
    ... The HTML tabIndex property isn't particularly useful ... control with tabIndex 3 requires looping over the form controls to ... Using tab to navigate the ... no scripting required and it will work without script. ...
    (comp.lang.javascript)
  • Re: UCOMIStream, MSHTML and WebBrowser control Persistence Problem
    ... If I navigate to a file ... > the same html I cannot call into the same dhtml script function. ... It is best to retrieve it from the control each time ...
    (microsoft.public.dotnet.languages.vb)