Free Support Forum - aspose.com

Snapshot of the page in SharePoint?

Is there a product that can do a snapshot of the page?

Hi

Thanks for your request. Do you need to make a printscreen of the web page on client side? Unfortunately, there is no Aspose product that allows you to achieve this.

Could you please clarify, why you need this?

Best regards,

How about getting a PDF of the page - is that possible?

Hi

Thanks for your request. You can try using Aspose.Words and code like the following to open the HTML document from url:

///

/// Opens document from web.

///

private Document OpenDocumentFromUrl(string url)

{

//Prepare the web page we will be asking for

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);

request.Method = "GET";

request.ContentType = "text/html";

request.UserAgent = "Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0";

//Execute the request

HttpWebResponse response = (HttpWebResponse)request.GetResponse();

//We will read data via the response stream

Stream resStream = response.GetResponseStream();

//Write content into the MemoryStream

BinaryReader resReader = new BinaryReader(resStream);

MemoryStream docStream = new MemoryStream(resReader.ReadBytes((int)response.ContentLength));

// Open document from stream.

Document doc = new Document(docStream);

return doc;

}

But I am afraid such conversion will not give you a 100% fidelity. This is because Aspose.Words was designed to work with MS Word documents, and HTML documents are quite different. That is why fidelity of conversion from HTML to Word and vice versa is not always perfect.

Best regards,