How to apply rotation to cells


I want the final output like this. Cell_rotation.pdf (2.0 KB)

I tried the below code snippet to apply the rotation to text fragment but it does not look proper for 90 or 270 degree rotation. It does look properly rotated for 45 degrees.

private static void rotateCell() {
	//Add page to PDF object
	Page page = document.getPages().add();
	// rotate text
	TextFragment fragment = new TextFragment("rotated text");
	//create a table object
	Table table1 = new Table();
	//Specify the columns width information for table object
	table1.setColumnWidths("200 200");
	//Add Paragraph
	Row row2 = table1.getRows().add();
	Cell cell1Row2 = row2.getCells().add();
	// Save the resultant PDF document"E:\\Pdfs\\AsposeTests\\Rotation_Output.pdf");

This is output of above code snippet - Rotation_Output.pdf (2.0 KB)


I request you to try to set minimum row height with below code and share your feedback.