Re: RadGrid Export to Pdf
My PDF won't open in Adobe Reader when I have <BR> present in my HTML (says the file is damaged)
How (and which event) should this be handled in?
Here is the code that I extracted from e.RawHTML in the PdfExporting event. When I exclude the records with the <BR> the PDF forms correctly.
Here's my Export to PDF settings:
My PDF won't open in Adobe Reader when I have <BR> present in my HTML (says the file is damaged)
How (and which event) should this be handled in?
Here is the code that I extracted from e.RawHTML in the PdfExporting event. When I exclude the records with the <BR> the PDF forms correctly.
<table cellspacing="0" border="0" id="RadGridSearchResults_ctl00" style="width:100%;table-layout:auto;empty-cells:show;"> <colgroup> <col style="width:75px" /> <col style="width:75px" /> <col style="width:150px" /> <col style="width:75px" /> <col style="width:100px" /> <col /> </colgroup> <thead> <tr> <th scope="col">Title Nbr</th><th scope="col">Reg Date</th><th scope="col">Type</th><th scope="col">Linc Nbr</th><th scope="col">Short Legal</th><th scope="col">Owner</th> </tr> </thead><tbody> <tr> <td>32T43 .</td><td> 1925-02-06 </td><td> CONVERSION </td><td> 0023045991 </td><td> 4;6;13;5;NE </td><td> THE TOWN OF SOMEWHERE. </td> </tr><tr> <td>48E12 .</td><td> 1933-09-22 </td><td> CONVERSION </td><td> 0023045975<br>0023045983 </td><td> 4;6;13;5;NE<br>4;6;13;5;SW </td><td> THE TOWN OF SOMEWHERE. </td> </tr><tr> <td>791042549</td><td> 1979-03-21 </td><td> CONVERSION </td><td> 0023046774 </td><td> 4;6;13;4;SW </td><td> THE TOWN OF SOMEWHERE. </td> </tr><tr> <td>891015298B .</td><td> 1989-01-26 </td><td> CONVERSION </td><td> 0023044720 </td><td> 4;6;13;5;NW </td><td> THE TOWN OF SOMEWHERE. </td> </tr><tr> <td>901047011</td><td> 1990-02-20 </td><td> CONVERSION </td><td> 0023045967 </td><td> 4;6;13;5;NE </td><td> THE TOWN OF SOMEWHERE. </td> </tr> </tbody> </table>Here's my Export to PDF settings:
protected void RadGridSearchResults_ItemCommand(object source, GridCommandEventArgs e) { if (e.CommandName == RadGrid.ExportToExcelCommandName || e.CommandName == RadGrid.ExportToPdfCommandName || e.CommandName == RadGrid.ExportToCsvCommandName || e.CommandName == RadGrid.ExportToWordCommandName) { RadGridSearchResults.ExportSettings.FileName = "Titles_Summary_Export_" + DateTime.Now.ToShortDateString(); RadGridSearchResults.PageSize = RadGridSearchResults.MasterTableView.VirtualItemCount; RadGridSearchResults.ExportSettings.IgnorePaging = true; if (e.CommandName == RadGrid.ExportToPdfCommandName) { isPdfExport = true; RadGridSearchResults.ClientSettings.Scrolling.UseStaticHeaders = false; RadGridSearchResults.ClientSettings.Scrolling.AllowScroll = false; RadGridSearchResults.ExportSettings.ExportOnlyData = true; RadGridSearchResults.MasterTableView.ExportToPdf(); } } }