Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1070
Infragistics Document.Reports
posted

We are trying to export content to pdf format. We have some issues to convert the html tables to pdf. The sample code is as follows:

 
 Dim sampleHeading As Infragistics.Documents.Reports.Report.Text.IText
 
 Dim strHTML As String
 
        sampleHeading = tocSection.AddText()
        sampleHeading.Heading = TextHeading.H1
        sampleHeading.Caption = "Caption"
 
 strHTML = "<table cellpadding=""3"" cellspacing=""1"" bgcolor=""#dddddd"" width=""500"" align=""center"">" & _
        "<tr> " & _
            "<td bgcolor=""#f6f6f6"" style=""font-family: Trebuchet MS; font-size: 12px; font-weight: bold; color: #000;"">Sl.No </td> " & _
            "<td bgcolor=""#f6f6f6"" style=""font-family: Trebuchet MS; font-size: 12px; font-weight: bold; color: #000;"">Name </td> " & _
            "<td bgcolor=""#f6f6f6"" align=""center"" style=""font-family: Trebuchet MS; font-size: 12px; font-weight: bold; color: #000;"">Age </td> " & _
            "</tr> <tr> " & _
            "<td bgcolor=""#ffffff"" style=""font-family: Trebuchet MS; font-size: 12px; font-weight: normal; color: #000;"">1 </td> " & _
            "<td bgcolor=""#ffffff"" style=""font-family: Trebuchet MS; font-size: 12px; font-weight: normal; color: #000;"">Mr. Rajesh R </td> " & _
            "<td bgcolor=""#ffffff"" style=""font-family: Trebuchet MS; font-size: 12px; font-weight: normal; color: #000;"" align=""center"">28 </td> " & _
            "</tr> <tr> " & _
            "<td bgcolor=""#ffffff"" style=""font-family: Trebuchet MS; font-size: 12px; font-weight: normal; color: #000;"">2 </td> " & _
            "<td bgcolor=""#ffffff"" style=""font-family: Trebuchet MS; font-size: 12px; font-weight: normal; color: #000;"">Mr. Lakshmi Narashimman N </td> " & _
            "<td bgcolor=""#ffffff"" style=""font-family: Trebuchet MS; font-size: 12px; font-weight: normal; color: #000;"" align=""center"">35 </td> " & _
            "</tr> <tr> " & _
            "<td bgcolor=""#ffffff"" style=""font-family: Trebuchet MS; font-size: 12px; font-weight: normal; color: #000;"">3 </td> " & _
            "<td bgcolor=""#ffffff"" style=""font-family: Trebuchet MS; font-size: 12px; font-weight: normal; color: #000;"">Mr. Bharathi P </td> " & _
            "<td bgcolor=""#ffffff"" style=""font-family: Trebuchet MS; font-size: 12px; font-weight: normal; color: #000;"" align=""center"">27 </td> " & _
            "</tr> <tr> " & _
            "<td bgcolor=""#ffffff"" style=""font-family: Trebuchet MS; font-size: 12px; font-weight: normal; color: #000;"">4 </td> " & _
            "<td bgcolor=""#ffffff"" style=""font-family: Trebuchet MS; font-size: 12px; font-weight: normal; color: #000;"">Mr. Senthil S </td> " & _
            "<td bgcolor=""#ffffff"" style=""font-family: Trebuchet MS; font-size: 12px; font-weight: normal; color: #000;"" align=""center"">32</td> " & _
        "</tr> " & _
 "</table>"
 
        sampleHeading.AddRichContent(strHTML)
 
The sample code above is a part in exporting contents to pdf format. The html table are not exported in the pdf file (only text is export and not table as such). In real scenario the value read from the database. For sample we have given strHTML value at run time.
 
Request you to clarify on this at the earliest.
 
Parents
No Data
Reply Children
No Data