Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Mon Jan 10, 2011 4:56 am

Hello,
Can I align Word text with Spire.DOC?
What formats does it supports?
THANKS!

ted
 
Posts: 7
Joined: Tue Dec 21, 2010 9:01 am

Tue Jan 11, 2011 1:47 am

Yes, you can. The Spire.DOC supports align left, align right, align center and justify. If you want to you can follow the source codes below:
paragraph1.Format.HorizontalAlignment = HorizontalAlignment.Left.
This will make the text to align left.
paragraph2.Format.HorizontalAlignment = HorizontalAlignment.Center.
This will make the text to align center.
paragraph3.Format.HorizontalAlignment = HorizontalAlignment.Right.
This will make the text to align right.
paragraph4.Format.HorizontalAlignment = HorizontalAlignment.Justify.
This will make the text to justify.
e-iceblue support
User avatar

iceblue support
 
Posts: 240
Joined: Tue Dec 21, 2010 2:56 am

Return to Spire.Doc

cron