jspdf-autotable

0

I have the following problem, I am generating PDF files from data captured in the following way:

let rows_ItemsPend = this.items.map(u => {
let Req = u[0].value;
let Requester = u[1].value;
let Service = u[2].value.toString();
let Status_Description = u[3].value;
let CreatedDate = u[4].value;
let Remaining_Time = u[5].value.toString();
let Status = u[7].value.toString();
return {
    numreq: Req,
    usuario: Requester,
    solicitud: Service,
    descrest: Status_Description,
    fechacreacion: CreatedDate,
    Tiempo_Faltante: Remaining_Time,
    Pend: Status,
        };
      });      
let pendientes =
      [
        { title: '#Reqs', dataKey: 'numreq' },
        { title: 'Requester', dataKey: 'usuario' },
        { title: 'Service', datakey: 'solicitud' },
        { title: 'Status', dataKey: 'descrest' },
        { title: 'Creation Date', dataKey: 'fechacreacion' },
        { title: 'Remaining Time', datakey: 'Tiempo_Faltante' },
        { title: 'Aprove / to Refuse', datakey: 'Pend' },
      ];

later, I created a pdf with jsPDF-autotable, as follows:

let doc = new JSPDF('landscape');

and filled a jspdf-autotable as follows:

doc.text('Summary Of Approvals', 15, 30);
doc.setFontSize(6);

 doc.autoTable(pendientes, rows_ItemsPend, {
       columnStyles: {
          id: { fillColor: 255 }
        },
        margin: { top: 35 },
        addPageContent: function (data) { 
          doc.text('', 40, 35);
        },
      });

the problem arises, because the columns:

let ServiceRequested = v[2].value;
let CreatedDate = v[4].value;
let Remaining_Time = v[6].value;

do not show the data when deploying the file, I already debugged through the firefox console and it shows me that the data is loaded well and remain in the corresponding columns, but as I mentioned, the At the moment of displaying the pdf, these are not shown. What would be the problem, that I do not see the data on the page? Note: I am using NodeJs

    
asked by Rodrigo Menares 30.10.2018 в 21:41
source

0 answers