Pdf Export Theme Borders

Hello Support Team,
I've tried setting the border style for the records in my pdf export.
I've found the setting of the border style in the javascript documentation here: Pdf Export Documentation

Yet, this seems to do nothing. Am I doing something wrong? I could not find any other reference to this functionality or which values I can enter into lineStyle for example.

Below is a code snippet of the exportProperties I set:

var exportProperties = {

          fileName: "angebote.pdf",
          pageOrientation: 'Landscape',
          pageSize: 'A4',
          theme: {
                  record: { fontSize: 6, borders: { color: '#222222', lineStyle: 'Thin' }},
                  header: { fontSize: 6, bold: true }
          }

}

Thanks in Advance,

Lukas Knapp


1 Reply

SK Sujith Kumar Rajkumar Syncfusion Team July 29, 2021 10:16 AM UTC

Hi Lukas, 
 
Greetings from Syncfusion support. 
 
You can set the borders in pdf export by using the border property as demonstrated in the below code snippet, 
 
grid.toolbarClick = function (args) { 
        if (args.item.id === 'Grid_pdfexport') { 
            var exportProperties = { 
                theme: { 
                    header: { 
                        border: { color: '#15e183', dashStyle: 'Solid', lineStyle: 'Thick', width: 3 } 
                    }, 
                    record: { 
                        border: { color: '#15e183', dashStyle: 'Solid', lineStyle: 'Thin', width: 1 } 
                    }, 
                    caption: { 
                        border: { color: '#0000FF', dashStyle: 'Solid', lineStyle: 'Thick', width: 2 } 
                    } 
                } 
            }; 
            grid.pdfExport(exportProperties); 
        } 
}; 
 
This is wrongly mentioned as ‘borders’ in the documentation link and we apologize the inconvenience caused. We have logged an internal documentation task to check and resolve this and it will be updated online in any of our upcoming releases. 
 
Please find the below sample prepared based on this for your reference, 
 
 
Also you can find the list of properties that can be assigned in the pdf export properties from the below API links, 
 
 
Please get back to us if you require any further assistance. 
 
Regards, 
Sujith R 


Loader.
Up arrow icon