Re: nsIWebBrowserPersist saveDocument() method

Nashid <[email protected]> Wed, 7 Apr 2010 08:07:36 -0700 (PDT)
Newsgroups gmane.comp.mozilla.devel.dom
Organization http://groups.google.com
Message-ID <201fdc93-f468-4c1e-a726-78f62816bd87@a38g2000yqc.googlegroups.com>
On Apr 7, 3:51 pm, Boris Zbarsky <[email protected]> wrote:
> On 4/7/10 10:21 AM, Nashid wrote:
>
> > wbp.saveDocument(content.document, file, null,null, encodingFlags,
> > null);
>
>  Fromhttp://mxr.mozilla.org/mozilla-central/source/embedding/components/we...
> the documentation for that third argument (your first null) is:
>
> 268    * @param aDataPath          Path to directory where URIs linked
> to the document
> 269    *                           are saved or nsnull if no linked URIs
> should be saved.
> 270    *                           This may be a nsILocalFile object or
> an nsIURI object
> 271    *                           with a file scheme.
>
> -Boris

I have changed it. Now it saves the images. Still i dont get the exact
copy like that is saved in the web page. It seems css,js are not taken
properly. Do you have any idea about this? Do I need to change the
aOutputContentType?

Or any other idea to save a page locally like a scrapper solution. How
the scrappers save everything in a correct format?

Thanks
Nashid