I need control of the table columns widths when exporting to PDF from the RadEditor. I followed instructions from http://www.telerik.com/help/aspnet-ajax/grid-pdf-export.html (on exporting HTML to PDF). I followed the instructions under 'Exporting HTML Tables' to test controlling table widths. I copied and pasted the following into my RadEditor and exported the PDF and it does not work. I suspect that it may not be working because of the automatic corrections that RadEditor makes (I disabled 2 filters but it did not correct it).
1) How do I disable this auto correction?
2) Is the html table below correct for controlling column widths in PDFs?
Please see source:
ASPX Page:
Table example that I pasted directly off of help link:
After I paste the above HTML in the HTML section of the RadEditor, I clicked back to Design, then back to HTML and it changes the code to this:
1) How do I disable this auto correction?
2) Is the html table below correct for controlling column widths in PDFs?
Please see source:
ASPX Page:
<%@ Page Language="VB" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
script
runat
=
"server"
>
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
RadEditor1.ExportToPdf()
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
If IsPostBack = False Then
RadEditor1.DisableFilter(Telerik.Web.UI.EditorFilters.DefaultFilters)
RadEditor1.DisableFilter(Telerik.Web.UI.EditorFilters.ConvertToXhtml)
End If
End Sub
</
script
>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
>
</
asp:ScriptManager
>
<
telerik:RadEditor
ID
=
"RadEditor1"
Runat
=
"server"
ContentFilters
=
"DefaultFilters,PdfExportFilter"
><
ExportSettings
Pdf-PageBottomMargin
=
"10px"
Pdf-PageFooterMargin
=
"0px"
Pdf-PageHeaderMargin
=
"0px"
Pdf-PageLeftMargin
=
"10px"
Pdf-PageRightMargin
=
"10px"
Pdf-PageTopMargin
=
"10px"
OpenInNewWindow
=
"true"
>
<
Pdf
PageTopMargin
=
"10px"
PageBottomMargin
=
"10px"
PageLeftMargin
=
"10px"
PageRightMargin
=
"10px"
PageHeaderMargin
=
"0px"
PageFooterMargin
=
"0px"
></
Pdf
></
ExportSettings
><
Tools
><
telerik:EditorToolGroup
></
telerik:EditorToolGroup
></
Tools
><
Content
>
</
Content
></
telerik:RadEditor
>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
onclick
=
"Button1_Click"
Text
=
"Button"
/>
</
div
>
</
form
>
</
body
>
</
html
>
Table example that I pasted directly off of help link:
<
table
width
=
"300px"
>
<
colgroup
>
<
col
style
=
"200px"
/>
<
col
style
=
"20px"
/>
</
colgroup
>
<
tr
>
<
td
>Cell1</
td
>
<
td
>Cell2</
td
>
</
tr
>
</
table
>
After I paste the above HTML in the HTML section of the RadEditor, I clicked back to Design, then back to HTML and it changes the code to this:
<
table
style
=
"width: 0px;"
width
=
"300px"
>
<
colgroup
>
<
col
style
=
""
>
<
col
style
=
""
>
</
colgroup
>
<
tbody
><
tr
>
<
td
>Cell1</
td
>
<
td
>Cell2</
td
>
</
tr
>
</
tbody
></
table
>