Exporting rad combo boxes to PDF

8 posts, 0 answers
  1. Helen
    Helen avatar
    12 posts
    Member since:
    Jun 2013

    Posted 21 Sep 2015 Link to this post

    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 

     

  2. Helen
    Helen avatar
    12 posts
    Member since:
    Jun 2013

    Posted 23 Sep 2015 in reply to Helen Link to this post

    See the attached images of the empty combo box in the pdf
  3. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 23 Sep 2015 Link to this post

    Hello Helen,

    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
  4. Helen
    Helen avatar
    12 posts
    Member since:
    Jun 2013

    Posted 23 Sep 2015 Link to this post

    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>

    thanks
  5. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 25 Sep 2015 Link to this post

    Hello Helen,

    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
  6. Helen
    Helen avatar
    12 posts
    Member since:
    Jun 2013

    Posted 25 Sep 2015 Link to this post

    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

      

     

  7. Helen
    Helen avatar
    12 posts
    Member since:
    Jun 2013

    Posted 25 Sep 2015 Link to this post

    Just tried to add asp checkboxlists too. Similar problem - I can't see the checkboxes in the pdf, I only see the words.
  8. Kostadin
    Admin
    Kostadin avatar
    1711 posts

    Posted 30 Sep 2015 Link to this post

    Hi Helen,

    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
Back to Top