how to change the font in a PDF report datatables js?

0

I have the following doubt.

How do I change the font, etc. in a PDF report datatables js

Thank you very much. this is what I have

buttons: [
        {

            extend: 'colvis',
            extend: 'pdfHtml5', 

            header: true,
            //title: 'SYSCOMBUS - SISTEMA DE CONTROL DE COMBUSTIBLE',
            orientation: '',
            pageSize: 'letter',
            fontSize: '6',
            exportOptions : {
              columns : [0,1,2,3,4,5,6], 
                stripHtml : false 
                },
            customize: function ( doc ) {
                 doc.styles.tableHeader = {
                     fillColor:'#525659',
                     color:'#FFF',
                     fontSize: '8',
                     alignment: 'left',
                     bold: true 

                  }, //para cambiar el backgorud del escabezado
                 doc.defaultStyle.fontSize = 9;
                 doc.pageMargins = [50,50,30,30];//left,top,right,bottom

                doc.content[1].margin = [ 5, 0, 0, 5], // margenes para la datables
    
asked by Jesus Andres Soto 18.08.2018 в 06:44
source

2 answers

0

As you indicate the fontSize for example, you can also indicate the fontFamily. For example: font-family: Verdana, "Times New Roman", sans-serif;

Information that could help you: enter the description of the link here

I hope it's helpful, if you do not know exactly what you need, you can comment to see if I can help better. Greetings!

    
answered by 18.08.2018 в 17:36
0

try this.

doc.defaultStyle.font = 'Arial';

This line causes you to change the font format.

Luck.

    
answered by 05.09.2018 в 23:24