Example #1
0
        /// <summary>
        /// Generates a string representation of the URL as a Mht archive file
        /// using exclusively in-memory storage
        /// </summary>
        /// <param name="url">fully qualified URL you wish to render to Mht</param>
        /// <returns>string representation of MHT file</returns>
        public string GetPageArchive(string url)
        {
            DownloadHtmlFile(url);

            // download all references
            _HtmlFile.DownloadExternalFiles(_AllowRecursion);

            // build the Mht
            AppendMhtHeader(_HtmlFile);
            AppendMhtFiles();

            return(this.FinalizeMht());
        }