Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.
Wed Oct 28, 2015 2:08 am
I have used the SimpleList demo code to create a numbered list. I would like to increase the line spacing between each line of the text. Is there a way to do so? I see that DrawString() supports this using the format parameter but I can't see an equivalent for sortedList.Draw().
Any advice?
Thanks
Julian
-
julians26
-
- Posts: 8
- Joined: Thu Oct 15, 2015 1:26 am
Wed Oct 28, 2015 5:50 am
Hi,
Thanks for your inquiry.
Please try the below code snippet:
- Code: Select all
PdfStringFormat format = new PdfStringFormat(PdfTextAlignment.Left);
format.LineSpacing = 20;
sortedList.StringFormat = format;
sortedList.Draw(page, 0, y);
Best Regards,
Amy
E-iceblue support team
-
amy.zhao
-
- Posts: 2772
- Joined: Wed Jun 27, 2012 8:50 am
Fri Oct 30, 2015 6:42 am
Thanks Amy, worked perfectly.
Regards
Julian
-
julians26
-
- Posts: 8
- Joined: Thu Oct 15, 2015 1:26 am
Fri Oct 30, 2015 7:44 am
Hi Julian,
Thanks for your message.
Welcome to write to us again if you have further issues. We are here to help you.
Best Regards,
Amy
E-iceblue support team
-
amy.zhao
-
- Posts: 2772
- Joined: Wed Jun 27, 2012 8:50 am