naveedqadri 0 Junior Poster in Training

Dear Experts,
Thanks in advance for helping me out.
I am new to C# as well asp.net.
I have already running appllication asp.net , needs to change in asp file with C# code.
Scenario:

My application is using third party software "activepdf server,webgrabber" to convert and print to pdf.
BUT latest version of Activepdf Webgraber is doing all alone.

Problem : I can not put code on proper location as given in example by Activepdf at : http://examples.activepdf.com/WebGrabber%20WBE/2010/WebGrabber%20Basic%20Conversion.vbs
Kindly help me to change the code of here .

//APWebGrabber wb=new APWebGrabber();
APWebGrbNET.APWebGrabber wb = new APWebGrbNET.APWebGrabber();
//APServer aps=new APServer();
Set aps = Server.CreateObject("APServer.Object");
	StringWriter wtr=new StringWriter();	
	i=Convert.ToInt32(Request.QueryString["n"]);
			string pg=Request.Form["fn_"+i];
			//if(Session.Contents["app_id"].ToString()=="63"){
				Server.Execute(pg,wtr);
			//}else{
			//Server.Execute(pg+"?pl="+(Request.Form["ori_"+i]=="1"?"1":"0"),wtr);
			//}
			string htm=wtr.ToString();

           
           htm=htm.Replace("/ictm/soft/tmp/","http://124.217.245.184/ictm/soft/tmp/");
           htm = htm.Replace("/ictm/images/", "http://124.217.245.184/ictm/images/");
            
    
            // Changes by Naveed Qadri----july 7 2011
           pdfurl = "http://124.217.245.184" + Request.FilePath;
          
			wb.URL=pdfurl;

			wb.PrintBackgroundColors=0;
			wb.HTMLTextToFile=true;
			wb.CreateFromHTMLText=htm;
			
			if (Request.Form["back_"+i]=="Y")
				wb.EngineToUse=1;
			else
				wb.EngineToUse=0;
				
			aps.PaperSize=Convert.ToInt16(Request.Form["pg_"+i]);
			aps.Orientation=Convert.ToInt16(Request.Form["ori_"+i]);
			aps.Scaling=Convert.ToInt16(Request.Form["scaling_"+i]);
			wb.LeftRightMargin=(int)(Convert.ToDouble(Request.Form["lm_"+i])*600);

For reference my aspx file is here attached with.

I need Immediate help plz.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.