Rotate Text Isn't Working

I’m trying to find a way to rotate and align text 90 degrees. I need to rotate a paragraph of text and have the ability to align that paragraph vertically and horizontally within a specified area. I’ve tried a few things and couldn’t get the text to rotate properly.

Please let me know if there’s anything I am doing wrong or that I need to correct. Thanks in advance.

ConsoleApp4.zip (2.5 KB)

@bhasdenadvent

Thank you for contacting support.

Would you please share a sample file as expected output so that we may investigate accordingly.

AcroRd32_ZwBpfI73fH.png (1.2 KB)

We’re trying to rotate the text like in the example attached.

@bhasdenadvent

Please try using below code snippet and then share your kind feedback with us.

// Instantiate Document Object
Document doc = new Document();
// Add a page to pages collection of document
Page page = doc.Pages.Add();
Aspose.Pdf.Table table = new Aspose.Pdf.Table();
// Create text fragment
TextFragment tf = new TextFragment("This is a test. Try 1.");
tf.TextState.Font = FontRepository.FindFont("Arial");
tf.TextState.FontSize = 9;
tf.TextState.Rotation = 270;
Aspose.Pdf.Row row = table.Rows.Add();
row.MinRowHeight = 500;
Aspose.Pdf.Cell cell = row.Cells.Add();
cell.Paragraphs.Add(tf);
page.Paragraphs.Add(table);
// Save resultant PDF file
doc.Save(dataDir + "Rotate_19.8.pdf");