i have problem with exporting arabic data to pdf it show symbol

i have problem with exporting arabic data to pdf it show symbol

rondikrondik Posts: 4Questions: 1Answers: 0
edited December 2021 in DataTables

this is my code

$(document).ready(function() {
    $('#example tfoot th').each( function () {
        var title = $(this).text();
        if (title != '') {
        $(this).html( '<input type="text" placeholder="'+title+'" />' );
            }
    } );
    var table=$('#example').DataTable();
    table.columns().every( function () {
        var that = this;
 
        $( 'input', this.footer() ).on( 'keyup change', function () {
            that
                .search( this.value )
                .draw();
        } );
    } );
} );

    $('#example').DataTable( {

bLengthChange: false,
        dom: 'Blfrtip',

        buttons: [
            {
                extend: 'copyHtml5',
                exportOptions: {
                    columns: [ ':visible' ]
                }
            },
            {
                extend: 'csvHtml5',
                exportOptions: {
                    columns: [ ':visible' ]
                }
            },
            {
                extend: 'excelHtml5',
                exportOptions: {
                    columns: ':visible'
                }
            },
            {
                extend: 'pdfHtml5',
                
                               exportOptions: {
                   columns: [ ':visible' ],

                        
                    

                    


                }
            },

            {
                
                extend:'colvis',
                
                
                
            },


        ]

        
        




       
    });

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

This question has accepted answers - jump to:

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    That will be a font issue. This thread should help, it's asking the same thing. Also, this is specific for Arabic.

    Cheers,

    Colin

  • rondikrondik Posts: 4Questions: 1Answers: 0

    i try it but it does not work

  • rondikrondik Posts: 4Questions: 1Answers: 0

    when i use the
    pdfMake.fonts = {
    Arial: {
    normal: 'arial.ttf',
    bold: 'arialbd.ttf',
    italics: 'ariali.ttf',
    bolditalics: 'arialbi.ttf'
    }
    };

    the pdf export button does not work

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. 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.

    Cheers,

    Colin

  • rondikrondik Posts: 4Questions: 1Answers: 0
    edited December 2021

    my pdf export button does not work when i use pdfmake.font

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    As I said above, if you can create a test case, we're happy to take a look,

    Colin

Sign In or Register to comment.