We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Quick question on Tiff

Hi,

Can we use aspose.imaging to convert a URL to tiff image using C#?

Thanks,
Shruthi


Hi Shruthi,


Thanks for your inquiry. Unfortunately Aspose.Imaging doesn’t support this feature. However you can use another Aspose component, Aspose.Words, for the purpose. Please check following code snippet for the converting a URL to Tiff.

string url = @“http://www.codeproject.com/”;

//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));

Document doc = new Document(docStream);

//Save document
doc.Save(MyDir + @“AsposeOut.tif”);

Please feel free to contact us for any further assistance.

Best Regards,