jspdf autotable blank cell

jspdf autotable blank cell

i m using jsPDF auto table plugin
i need to set null in the cell while printing on pdf where html table contain &nbsp
here is code but its not inserting null
  1. <script>
            function generate() {

                var doc = new jsPDF('l', 'mm', "a4");

                var res = doc.autoTableHtmlToJson(document.getElementById("printJS-form"));
              //  doc.autoTable(res.columns, res.data, { margin: { top: 80 } });

                var header = function (data) {
                  //doc.setFontSize(10);

                   // doc.setTextColor(0);
                    //doc.setFontStyle('bold');
                    //doc.setFillColor(110, 214, 84);
                    //   doc.setFontSize(0)


                   // doc.

                    //doc.addImage(headerImgData, 'JPEG', data.settings.margin.left, 20, 50, 50);
                 //   doc.text("Testing Report", data.settings.margin.left, 50);
                };


                var options = {
                    tableWidth: 'wrap',
                    didDrawPage: header,
                    margin: {
                        top: 10,
                        bottom: 40,
                        left: 1,
                        right: 1,
                        //width: 120
                       


                    },
                  
                    //bodyStyles: {
                    //    text: { minCellWidth: '10' }
                    //},
                   
                   

                    columnStyles: {

                        0: { cellWidth: 15 }, //frequency
                        1: { cellWidth: 22}, //task name
                        2: { cellWidth: 8.5 }, // shift
                        3: { cellWidth: 10.5}, //range
                        4: { cellWidth: 7.2 },
                        5: { cellWidth: 7.2 },
                        6: { cellWidth: 7.2 },
                        7: { cellWidth: 7.2 },
                        8: { cellWidth: 7.2 },
                        9: { cellWidth: 7.2 },
                        10: { cellWidth: 7.2 },
                        11: { cellWidth: 7.2 },
                        12: { cellWidth: 7.2 },
                        13: { cellWidth: 7.2 },
                        14: { cellWidth: 7.2 },
                        15: { cellWidth: 7.2 },
                        16: { cellWidth: 7.2 },
                        17: { cellWidth: 7.2 },
                        18: { cellWidth: 7.2 },
                        19: { cellWidth: 7.2 },
                        20: { cellWidth: 7.2 },
                        21: { cellWidth: 7.2 },
                        22: { cellWidth: 7.2 },
                        23: { cellWidth: 7.2 },
                        24: { cellWidth: 7.2 },
                        25: { cellWidth: 7.2 },
                        26: { cellWidth: 7.2 },
                        27: { cellWidth: 7.2 },
                        28: { cellWidth: 7.2 },
                        29: { cellWidth: 7.2 },
                        30: { cellWidth: 7.2 },
                        31: { cellWidth: 7.2 },
                        32: { cellWidth: 7.2 },
                        33: { cellWidth: 7.2 },
                        34: { cellWidth: 7.2 },




                        // etc
                    },


                    tableWidth: 'auto',
                    headStyles: { minCellHeight: 8, fontSize: 6.5, text: { minCellWidth: 'wrap' } },
                    bodyStyles: {
                        minCellHeight: 8, fontSize: 6.5,
                        margin: {
                            top: 10,
                            bottom: 40,
                            left: 1,
                            right:1,
                            //width: 120
                            minCellWidth: 'auto'


                        },
                    }
                  //  startY: doc.autoTableEndPosY() + 20
                };

                //doc.autoTable(res.columns, res.data, options);
                doc.autoTable(res.columns, res.data, options, {
                    tableLineColor: [189, 195, 199],

                    createdCell: function(cell, data) {
                        if (!cell.raw) {
                            cell.text = 'erum';
                        }
                    //var tdElement = cell.raw;
                    //console.log(tdElement)
                    //if (tdElement.classList.contains('blank')) {
                    //    cell.text = 'erum'
                    //}
                    //if (typeof cell.raw === 'undefined')
                    //{

                    //    cell.raw.text = "erum";
                   
                },
                //styles: {
                //    overflow: 'linebreak', columnWidth: 'wrap', font: 'arial',
                //    fontSize: 10,
                //    cellPadding: 8, overflowColumns: 'linebreak'
                //},
                });

                doc.save("table.pdf");
            }
        </script>
  1. <td class="blank"  style="width:4rem;padding:0rem!important;text-align: center;border:0px;color: black;max-width:4rem;">
                                       
                                       &nbsp;


                                    </td>