how to export div content to pdf in landscape mode in c#f on button click.
i have code like this...
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=Payout_" + Label3.Text.Trim() + "to" + Label4.Text.Trim() + ".pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
StringWriter stringWriter = new StringWriter();
HtmlTextWriter htmlTextWriter = new HtmlTextWriter(stringWriter);
AccessCard.RenderControl(htmlTextWriter);
StringReader stringReader = new StringReader(stringWriter.ToString());
Document Doc = new Document(PageSize.A4, 5f, 5f, 5f, 5f);
//Document Doc = new Document(new RectangleReadOnly(761, 498), 10f, 10f, 10f, 10f);
HTMLWorker htmlparser = new HTMLWorker(Doc);
PdfWriter.GetInstance(Doc, Response.OutputStream);
Doc.Open();
htmlparser.Parse(stringReader);
Doc.Close();
Response.Write(Doc);
Response.End();
please help me
thanks..