While downloading pdf data with integer values goes missing.

While downloading pdf data with integer values goes missing.

sushanthsushanth Posts: 3Questions: 0Answers: 0

$('#business_plan_data').DataTable( {
data: $scope.businessPlanList,
columns: [
{ "data": "farmName" ,title:"Farm Name "},
{ "data": "farmType" ,title:"Farm Type"},
{ "data": "farmSubtype" ,title:"Farm Sub-Type"},
{ "data": "count" ,title:"Count"},
{ "data": "createdDtm" ,title:"Created On"},
{ "data": "endDate" ,title:"End Date"},
{ "data": "tenure" ,title:"Tenure"}

                    ],

                            dom: 'Bfrtip',
                            destroy: true,
                            "pageLength": 20,

                            buttons: [
                                'copy', 'csv', 'excel', 'pdf', 'print'
                            ]

                     } );

Replies

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin

    Thanks for your question. As noted in the forum rules, please post a link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Allan

  • sushanthsushanth Posts: 3Questions: 0Answers: 0

    https://jsfiddle.net/c1hnhbhL/19/

    Here is the link.I can render the data in my appilication view.I have attached data object .I can download pdf but the values which are in integers are missing in downloaded pdf file.

  • kthorngrenkthorngren Posts: 20,322Questions: 26Answers: 4,774
    edited February 2018

    Your fiddle doesn't seem to run properly. Looks like you are missing some JS include files. Please fix and post back when its replicating the issue.

    EDIT: copied your basic code here and it seems to export the PDF correctly:
    http://live.datatables.net/wuficido/1/edit

    Kevin

  • sushanthsushanth Posts: 3Questions: 0Answers: 0

    Thankyou ..its working after using pdfmake. :)

This discussion has been closed.