how can use style to my PDF document

56 Views Asked by At

I have a windows form application that connects to database and collects all the data into DataTable and pass this table to PDF and creates a PDF. But I need to put some style to my table on PDF. Like header is bold. row is different color. etc. is there any way to do that?

 using (FileStream stream = new FileStream(fileName, FileMode.Create))
            {
                Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 10f, 0f);                
                PdfWriter.GetInstance(pdfDoc, stream);
                pdfDoc.Open();
                pdfDoc.Add(pdfTable);
                pdfDoc.Close();
                stream.Close();
            }
0

There are 0 best solutions below