Hi Aamer, I used this same code but no data is returned from canvas. I have
html tables in Id 'divViews'. I am getting data as ',' for now.
On Sunday, December 25, 2016 at 3:12:06 AM UTC+5:30, Aamer Saeed wrote:
>
> I have done it like this but the problem is I have html table and i am
> using highcharts to show graphs on the basis of data. so when i try to
> export it in pdf my graphs are not showing.
>
> app.controller("",function ($scope){
> $scope.ExportToPDF = function () {
> html2canvas(document.getElementById('divViews'), {
> onrendered: function (canvas) {
> console.log(canvas);
> var data = canvas.toDataURL()
> var docDefinition = {
> content: [{
> image: data,
> width: 500,
> }]
> };
>
> pdfMake.createPdf(docDefinition).download("DailyView.pdf");
> }
> });
> }
> });
>
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.