Hi,
I am trying to convert pdf file from HTML, but the scroll bar is displaying in the pdf file and the actual content is missing. In Html, there is a scrollbar for the inside body section.
Thanks and Regards
Santosh
public static bool CheckPageUrl(string url)
{
bool result = false;
try
{
if (url.IndexOf("http").Equals(-1))
{
url = "http://" + url;
}
HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(url);
myHttpWebRequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko";
myHttpWebRequest.Method = "GET";
HttpWebResponse myHttpWebResponse = (HttpWebResponse)myHttpWebRequest.GetResponse();
if (myHttpWebResponse.StatusCode == HttpStatusCode.OK)
{
result = true;
}
myHttpWebResponse.Close();
}
catch
{
result = false;
}
return result;
}
MemoryStream ms=new MemoryStream();
HtmlConverter.Convert(url, ms,
//enable javascripts
true,
//load timeout
100 * 1000,
//page size
new SizeF(612, 792),
//page margins
new Spire.Pdf.Graphics.PdfMargins(0,0));