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

Web Service Binding & Export PDF

6 Answers 63 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mehmet
Top achievements
Rank 1
Mehmet asked on 11 Sep 2014, 02:02 AM
Hi,

I couldn't achieve of exporting a pdf file with my web service binding scheduler.

Isn't it possible?

I would like to know whether it is possible to do it with a JS code in my aspx page. If it doesn't work, I don't have any binding criteria in my back end code. How could be possible to do that ?

thank you

6 Answers, 1 is accepted

Sort by
0
Mehmet
Top achievements
Rank 1
answered on 12 Sep 2014, 02:01 AM
any idea of exporting a pdf on Client side?
0
Bozhidar
Telerik team
answered on 15 Sep 2014, 06:22 AM
Hi,

RadScheduler only supports Export to PDF out of the box when bound on the Server. If you want to export on the client you will have to use a third party solution.

Regards,
Bozhidar
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
Mehmet
Top achievements
Rank 1
answered on 15 Sep 2014, 06:51 AM
such as?
0
Bozhidar
Telerik team
answered on 17 Sep 2014, 08:18 AM
Hello,

You can use for instance the following libraries:
http://html2canvas.hertzen.com/
http://parall.ax/products/jspdf

Here's the sample code which uses these two libraries to capture an image of the Scheduler and then exprot it to PDF:
function exportScheduler() {
 
    var doc = jsPDF("landscape", "pt", "a2");
 
    html2canvas(document.getElementById("RadScheduler1"), {
        onrendered: function(canvas) {
            var data = canvas.toDataURL("image/jpeg");
            var pageWidth = doc.internal.pageSize.width;
            var pageHeight = doc.internal.pageSize.height;
            var width = canvas.width;
            var height = canvas.height;
 
            doc.addImage(data, "JPEG", (pageWidth - width) / 2, (pageHeight - height) / 2, width, height);
            doc.save("scheduler.pdf");
        }
    });
}


Regards,
Bozhidar
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
Anders
Top achievements
Rank 1
answered on 04 Jun 2018, 12:17 PM
Is the pdf export still like that? Cant I export a scheduler bound to a webservice to pdf?
0
Marin Bratanov
Telerik team
answered on 04 Jun 2018, 12:24 PM
Hello,

In later releases you can use RadClientExportManager to export RadScheduler in the browser: https://www.telerik.com/support/code-library/scheduler-client-pdf-export-with-clientexportmanager.


Regards,
Marin Bratanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler
Asked by
Mehmet
Top achievements
Rank 1
Answers by
Mehmet
Top achievements
Rank 1
Bozhidar
Telerik team
Anders
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or