title: Export arabic data into pdf asp.net showing error
body: <p>When I export ARABIC data into pdf.Microsoft adobereader showing error.Adobe reader could not open file because it is either not a supported file.My code is following asp.net c#.Guide me</p>
  
  <pre><code>protected void btnExport_Click(object sender, EventArgs e)
          {
              Response.ContentType = "application/pdf";
              Response.AddHeader("content-disposition", "attachment;filename=TestPage.pdf");
              Document doc = new Document(PageSize.LETTER);
              doc.Open();
  
              //Sample HTML
              StringBuilder stringBuilder = new StringBuilder();
              stringBuilder.Append(@"&lt;p&gt;This is a test: &lt;strong&gt;مسندم&lt;/strong&gt;&lt;/p&gt;");
  
              //Path to our font
              string arialuniTff = Server.MapPath("~/tradbdo.TTF");
              //Register the font with iTextSharp
              iTextSharp.text.FontFactory.Register(arialuniTff);
  
              //Create a new stylesheet
              iTextSharp.text.html.simpleparser.StyleSheet ST = new iTextSharp.text.html.simpleparser.StyleSheet();
              //Set the default body font to our registered font's internal name
              ST.LoadTagStyle(HtmlTags.BODY, HtmlTags.FACE, "Traditional Arabic Bold");
              //Set the default encoding to support Unicode characters
              ST.LoadTagStyle(HtmlTags.BODY, HtmlTags.ENCODING, BaseFont.IDENTITY_H);
  
              //Parse our HTML using the stylesheet created above
              List&lt;IElement&gt; list = HTMLWorker.ParseToList(new StringReader(stringBuilder.ToString()), ST);
  
              //Loop through each element, don't bother wrapping in P tags
              foreach (var element in list)
              {
                  doc.Add(element);
              }
  
              doc.Close();
              Response.Write(doc);
              Response.End();
          }
  </code></pre>