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

Free Support Forum - aspose.com

Sample code just hangs

I tried your sample code - But it just hangs at the SAVE. Any ideas?

// The address of the web URL which you need to convert into PDF format

string WebUrl = "http://en.wikipedia.org/wiki/Main_Page";

// create a Web Request object to connect to remote URL

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

// set the Web Request timeout

request.Timeout = 10000; // 10 secs

// Retrieve request info headers

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

// Windows default Code Page (Include System.Text namespace in project)

Encoding encoding = Encoding.GetEncoding(1252);

// Read the contents of into StreamReader object

StreamReader localResponseStream = new StreamReader(localWebResponse.GetResponseStream(), encoding);

// Instantiate an object PDF class

Aspose.Pdf.Generator.Pdf pdf = new Aspose.Pdf.Generator.Pdf();

// add the section to PDF document sections collection

Aspose.Pdf.Generator.Section section = pdf.Sections.Add();

//Create text paragraphs containing HTML text

Aspose.Pdf.Generator.Text text2 = new Aspose.Pdf.Generator.Text(section, localResponseStream.ReadToEnd());

// enable the property to display HTML contents within their own formatting

text2.IsHtmlTagSupported = true;

// Add the text object containing HTML contents to PD Sections


// Specify the URL which serves as images database

//pdf.HtmlInfo.ImgUrl = "http://en.wikipedia.org/";

//Save the pdf document




Hi Jon,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.Pdf.

Well, I checked the sample code and it takes same time on the same method (and also the save method throws an exception). As per my understanding, the specified URL has some illegal characters which are not supported in our product that is why the exception is thrown. I have registered this issue in our issue tracking system with issue id: PDFNEWNET-32481. You can check for any other URL to check the functionality and see if it fits your need. We will notify you via this forum thread regarding any updates as per your reported issue.

Thank You & Best Regards,

The issues you have found earlier (filed as PDFNEWNET-32481) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.