Question

I am using itext 2.1.7 library , and want to use that only. However I noticed whenever I create the PdfPTable which has the row headers of the table increase in words , they get scrambled.

For Example , My table header : Total Power For Customer.(Here it gets displayed : Total Powe , r For Customer) , I mean it takes new line after Powe. It cuts the word.

enter image description here

These are the headers for PdfPTable , I have not used any formatting so I am just using ,

Table table = new Table(12);
        table.addCell("Total Power Consumed");
document.add(table);

There are other columns as well! No Special formatting done.

Are there any good formatting options available for itext 2.1.7.(com.lowagie)

However I have used jqgrid as well but jqgrid manages it , if width does not suit it takes new line at adjust it accordingly.

Downvoting for this question does not help , because this is a valid question , I suppose.

Was it helpful?

Solution

You could try table.addCell("Total Power\nConsumed");

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top