While downloading pdf data with integer values goes missing.
While downloading pdf data with integer values goes missing.
$('#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
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
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.
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
Thankyou ..its working after using pdfmake.