When I export datatable to pdf in Arabic language pdf file appear wrong language cant read and under
When I export datatable to pdf in Arabic language pdf file appear wrong language cant read and under
mohmd42597
Posts: 19Questions: 6Answers: 0
in DataTables
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
This discussion has been closed.
Answers
This thread should help, it's asking the same thing.
Cheers,
Colin
thanks for reply @colin
i have same problem
i use this code:-
i work with visual studio 2017.
pdfMake.fonts = { Arial: { normal: 'arial.ttf', bold: 'arialbd.ttf', italics: 'ariali.ttf', bolditalics: 'arialbi.ttf' }, }; // and $('#mytable').dataTable({ "bDestroy": true, "lengthMenu": [[10, 25, 50, 75, -1], [10, 25, 50, 75, "All"]], order: [[0, 'asc']], paging: true, searching: true, "dom": 'Blfrtip', "buttons": [ { extend: 'pdf', text: 'Export PDF', exportOptions: { columns: ':visible' }, customize: function (doc) { doc.defaultStyle.font = 'Arial'; } )}// this give my this error
No unicode cmap for font
at t.registerTTF (pdfmake.min.js:14)
at new t (pdfmake.min.js:14)
at r.font (pdfmake.min.js:13)
at r.getFont (pdfmake.min.js:10)
at r.widthOfString (pdfmake.min.js:10)
at pdfmake.min.js:12
at Array.forEach (<anonymous>)
at u (pdfmake.min.js:12)
at r.buildInlines (pdfmake.min.js:12)
at r.measureLeaf (pdfmake.min.js:10)
That error is also in this thread. The issue was raised with PDFmake, and they suggested updating, so would be worth trying that. If no joy, maybe reply back to the PDFmake thread.
Colin
Sir @colin thanks for reply
i review this thread but no one give any solution
i use this for Arabic language can you help me for any library in datatable to solve this issue
There are a few threads discussing that, try this one here.
Colin