I am trying to get a nice export of may page to PDF. I have several rad combo boxes that control the content of various areas of the page.
All the rad combo boxes are empty in the PDF - is there anyway around this? I was trying to use them a titles and I don't really want to have to repeat the selected value of the radcombobox in to a literal control next to each one - just so I can tell what I'm looking at in the PDF.
Thanks
7 Answers, 1 is accepted
What product is used for generating this PDF file? It looks like it is the ClientExportManager for ASP.NET AJAX, but could you please confirm this?
ClientExportManager demo
Regards,
Daniel
Telerik
Yup, I'm using your client export manager for ajax:
<
telerik:RadClientExportManager
runat
=
"server"
ID
=
"RadClientExportManager1"
>
<
PdfSettings
MarginBottom
=
"20mm"
MarginLeft
=
"15mm"
MarginTop
=
"15mm"
MarginRight
=
"15mm"
Author
=
"SequoiaOnTarget"
FileName
=
"SequoiaOnTarget"
/>
</
telerik:RadClientExportManager
>
function exportPDF() {
$find('<%=RadClientExportManager1.ClientID%>').exportPDF($("#pdfExportArea"));
}
<
telerik:RadButton
runat
=
"server"
OnClientClicked
=
"exportPDF"
AutoPostBack
=
"false"
CssClass
=
"btn btn primary"
>
<
ContentTemplate
>
<
span
class
=
"glyphicon glyphicon-download glyphicon-margin-right"
></
span
>PDF
</
ContentTemplate
>
</
telerik:RadButton
>
Please test whether the following code works properly at your side. If it behaves as expected, can you help me to reproduce the issue by modifying it?
<
asp:ScriptManager
runat
=
"server"
/>
<
script
type
=
"text/javascript"
>
function exportPDF() {
$find('<%=RadClientExportManager1.ClientID%>').exportPDF($telerik.$("#pdfExportArea"));
}
</
script
>
<
div
>
<
div
id
=
"pdfExportArea"
>
<
telerik:RadComboBox
ID
=
"RadComboBox1"
runat
=
"server"
>
<
Items
>
<
telerik:RadComboBoxItem
Text
=
"Item 1"
/>
<
telerik:RadComboBoxItem
Text
=
"Item 2"
/>
</
Items
>
</
telerik:RadComboBox
>
<
telerik:RadDropDownList
ID
=
"RadDropDownList1"
runat
=
"server"
>
<
Items
>
<
telerik:DropDownListItem
Text
=
"Item 1"
/>
<
telerik:DropDownListItem
Text
=
"Item 2"
/>
</
Items
>
</
telerik:RadDropDownList
>
</
div
>
<
telerik:RadButton
runat
=
"server"
OnClientClicked
=
"exportPDF"
AutoPostBack
=
"false"
Text
=
"PDF"
>
</
telerik:RadButton
>
<
telerik:RadClientExportManager
runat
=
"server"
ID
=
"RadClientExportManager1"
>
<
PdfSettings
MarginBottom
=
"20mm"
MarginLeft
=
"15mm"
MarginTop
=
"15mm"
MarginRight
=
"15mm"
Author
=
"SequoiaOnTarget"
FileName
=
"SequoiaOnTarget"
/>
</
telerik:RadClientExportManager
>
</
div
>
Regards,
Daniel
Telerik
From your code - RadComboBox1 doesn't work but RadDropDownList1 does. Screen shots attached.
I'm using master pages so I have as RadAjaxManagerProxy on my page. Otherwise I just copied your code in.
At the moment I think I could use dropdown lists - not the combo box for this particular page, but it would be good to get a solution for the comboboxes.
Thanks
I am afraid this is a limitation of ClientExport manager. The reason is that the content of the following elements is not rendered: <iframe>, <svg>, <input>, <textarea>, and CheckBox controls and RadComboBox are rendered as <input> elements. More information about the control limitations could be found in the following help article.
Regards,
Kostadin
Telerik