I managed to get it to work, although if I had the time, I would have done it a little better than what I did, actually creating a code branch and executing it correctly, but considering the time constraints, it works well for you.
FYI, this is how I ended up doing this to do what I wanted:
In my grid options, I disabled the CSV export options in the grid menu (because I only implemented the changes for the PDF).
I made a copy of exporter.js, named it custom.exporter.js and changed my link to point to a new file.
In custom.exporter.js, I made a copy of the getData function and named it getGridRows. getGridRows is the same as getData, except that it just returns a rows object without any material that gets columns and so on. At the moment, I am encoding it to work with a well-known set of columns, so I do not need this.
I changed the pdfExport function as follows:
pdfExport: function (grid, rowTypes, colTypes) { var self = this; var exportData = self.getGridRows(grid, rowTypes, colTypes); var docContent = []; $(exportData).each(function () { docContent.push( { table: { headerRows: 1, widths: [70, 80, 150, 180], body: [ [{ text: 'Job Raised', bold: true, fillColor: 'lightgray' }, { text: 'Job Number', bold: true, fillColor: 'lightgray' }, { text: 'Client', bold: true, fillColor: 'lightgray' }, { text: 'Job Title', bold: true, fillColor: 'lightgray' }], [formattedDateTime(this.entity.JobDate,false), this.entity.JobNumber, this.entity.Client, this.entity.JobTitle], ] } }); var subGridContentBody = []; subGridContentBody.push([{ text: 'Defect', bold: true, fillColor: 'lightgray' }, { text: 'Vendor', bold: true, fillColor: 'lightgray' }, { text: 'Status', bold: true, fillColor: 'lightgray' }, { text: 'Sign off', bold: true, fillColor: 'lightgray' }]); $(this.entity.Defects).each(function () { subGridContentBody.push([this.DefectName, this.DefectVendor, this.DefectStatus, '']); }); docContent.push({ table: { headerRows: 1, widths: [159, 150, 50, 121], body: subGridContentBody } }); docContent.push({ text: '', margin: 15 }); }); var docDefinition = { content: docContent } if (self.isIE()) { self.downloadPDF(grid.options.exporterPdfFilename, docDefinition); } else { pdfMake.createPdf(docDefinition).open(); } }