This is a migrated thread and some comments may be shown as answers.

PDF Export JavaScript error

2 Answers 80 Views
ClientExportManager
This is a migrated thread and some comments may be shown as answers.
Mbott
Top achievements
Rank 1
Mbott asked on 13 Mar 2015, 06:41 PM
Having trouble with the PDF export functionlaity. I created a page and copied the sample test from the site

http://www.telerik.com/help/aspnet-ajax/clientexportmanager-getting-started.html

When I click the button I get:

Error: Object doesn't support property or method 'exportPdf'

I can export an image, but not a pdf.

What am I missing? Thank.

Using...  2015.1.204.40

2 Answers, 1 is accepted

Sort by
0
Accepted
Peter Filipov
Telerik team
answered on 16 Mar 2015, 09:57 AM
Hello MIke,

There is a typo in our documentation. Here is the working script:
<telerik:RadClientExportManager runat="server" ID="RadClientExportManager1">
   <PdfSettings filename="Myfile.pdf" />
</telerik:RadClientExportManager>
<input type="button" onclick="exportElement()" value="export" />
 
<script type="text/javascript">
    function exportElement() {
        var exp = $find("<%= RadClientExportManager1.ClientID %>");
       exp.exportPDF($telerik.$("#foo"));
   }
</script>

Regards,
Peter Filipov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Mbott
Top achievements
Rank 1
answered on 16 Mar 2015, 12:09 PM
Thanks, that did the trick! :)
Tags
ClientExportManager
Asked by
Mbott
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Mbott
Top achievements
Rank 1
Share this question
or