View form Export to PDF , css width property is not working

I am trying to export form into pdf, want to set width of columns before export,

.k-pdf-export .fd-datatable table
{
 border: 1px solid black;
  width: 500px !important;
}
.k-pdf-export .fd-datatable table tr td:nth-child(2)
.k-pdf-export .fd-datatable table tr th:nth-child(2)
{
 border: 1px solid red;
background-color:lightblue;
  width: 100px;
}

Only background-color:lightblue; and border is working .

In table I have 6 columns, I want to show all in exported PDF, So want to adjust width, so it can fit inside the page, ( but width is not working with either Table, th, td)
is there any thing additional need to do ?

Hello @sanaullah102,

You can try changing the column width with CSS:

.fd-datatable table colgroup col:nth-of-type(0) {
   width: 50px !important;
}

.fd-datatablee table colgroup col:nth-of-type(1) {
   width: 50px !important;
}

.fd-datatable table colgroup col:nth-of-type(2) {
   width: 50px !important;
}

Or using the JavaScript code from this post: