با سلام خدمت شما جناب مهندس من یک فرم طراحی کردم خروجی pdf که ازش میگیرم خروجی میگیره ولی نوشته های فارسی رو نشون نمیده
کدی هم که استفاده میکنم
protected void ButtonPDF_Click(object sender, EventArgs e)
{
GetPdf();
}
public void GetPdf()
{
Response.ContentType = "application/DOC";
Response.AddHeader("content-disposition", "attachment;filename=AtulRawat.pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
StringWriter s_w = new StringWriter();
HtmlTextWriter h_w = new HtmlTextWriter(s_w);
GridView1.RenderControl(h_w);
StringReader sr = new StringReader(s_w.ToString());
Document pdfDoc = new Document(PageSize.A2, 7f, 7f, 7f, 0f);
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
htmlparser.Parse(sr);
pdfDoc.Close();
Response.Write(pdfDoc);
Response.End();
GridView1.AllowPaging = true;
GridView1.DataBind();
GridView1.HeaderRow.Style.Add("width", "15%");
GridView1.HeaderRow.Style.Add("font-size", "10px");
GridView1.Style.Add("text-decoration", "none");
GridView1.Style.Add("font-family", "BBadr;");
GridView1.Style.Add("font-size", "8px");
جناب مهندس خروجی میگیرم فقط نوشته فارسیش برام مهمه بررسیش کردم ولی از کدوم قسمت باید استفاده بکنم که نوشته فارسی رو نشون بده برام حل نمیشه
هیچ کاربری تا کنون از این پست تشکر نکرده است
با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)