I have one web page url and i want to convert it to PDF.I used abcpdf.net in my webpage and its working fine in local host but its not working in server.I have installed abcpdf.net 6.1 version and added abcpdf.dll in my bin folder.my server is windows server 2008 r2. If there is a version problem ,please give me a suggestion.
here is my code:
string projectid = partnerid;
string versionid = DDLVersion.SelectedItem.Text.ToString().Trim();
string serverurl = "http://serverurl/Design/Pro/Previewtopdf.aspx?PID=" + projectid + "&versionID=" + versionid + "";
Doc theDoc = new Doc();
theDoc.Rect.Inset(10, 30);
theDoc.Page = theDoc.AddPage();
int theID;
theID = theDoc.AddImageUrl(serverurl);
while (true)
{
theDoc.FrameRect(); // add a black border
if (!theDoc.Chainable(theID))
break;
theDoc.Page = theDoc.AddPage();
theID = theDoc.AddImageToChain(theID);
}
for (int i = 1; i <= theDoc.PageCount; i++)
{
theDoc.PageNumber = i;
theDoc.Flatten();
}
theDoc.Save(Server.MapPath("report.pdf"));
theDoc.Clear();
Response.Redirect("report.pdf");