PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
Underline to end of line https://forum.pdfsharp.net/viewtopic.php?f=2&t=3377 |
Page 1 of 1 |
Author: | klivzez [ Thu Jun 09, 2016 1:33 pm ] |
Post subject: | Underline to end of line |
Hi. How can i do underline to end of line? some text . . . . . . . . . . . . | - end of Page (document.DefaultPageSetup.RightMargin) Dotes mean space. I want see this some text________________| I tryed to use TabStops but underline's line is upper TabStop's line paragraph = section.AddParagraph("Hello, World!"); paragraph.Format.TabStops.ClearAll(); paragraph.Format.TabStops.AddTabStop("16cm", TabAlignment.Right, TabLeader.Lines); paragraph.AddTab(); Another question. Can i change distance from text and underline? Thank you. |
Author: | Thomas Hoevel [ Thu Jun 09, 2016 1:58 pm ] |
Post subject: | Re: Underline to end of line |
Hi! I think using a TabStop would be a clean way of doing this. If lines are at different heights then please use the Issue Submission Template so we can investigate this. viewtopic.php?f=2&t=832 Another option could be a bottom border of the paragraph. |
Author: | klivzez [ Thu Jun 09, 2016 2:57 pm ] | ||
Post subject: | Re: Underline to end of line | ||
I prepared mdddl file with my problem. I noticed that different font names have different gap between underline and text. Is any way to changing this gap? Thank you.
|
Author: | Thomas Hoevel [ Thu Jun 09, 2016 3:03 pm ] |
Post subject: | Re: Underline to end of line |
klivzez wrote: Is any way to changing this gap? MigraDoc is Open Source, so there is a way to change it.But AFAIK the current implementation calculates the position automatically, based on font information. |
Author: | Thomas Hoevel [ Thu Jun 09, 2016 3:35 pm ] |
Post subject: | Re: Underline to end of line |
klivzez wrote: I prepared mdddl file with my problem. Thanks.Lines are at different positions and have different widths. I'll ask Stefan on Monday about it. Maybe we can fix this with version 1.50 stable. |
Author: | Thomas Hoevel [ Mon Jun 13, 2016 1:16 pm ] |
Post subject: | Re: Underline to end of line |
The reason for the different look: the underlined tab will emit underscore characters ("_"), but for underlined text a line will be drawn. That's the old implementation and we will not change this for PDFsharp 1.50 stable. The method "void RenderTabLeader(TabOffset tabOffset)" in class ParagraphRenderer draws the tabulator. It would be nicer to draw a line with the width and position of underlined text. Feel free to implement this if you like - and please share your code if you do. I cannot do it during my working hours - at least not this month. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |