PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Strikeout MigraDoc Text with AddFormattedText()
https://forum.pdfsharp.net/viewtopic.php?f=4&t=1021
Page 1 of 1

Author:  jro280 [ Wed Jan 13, 2010 7:28 pm ]
Post subject:  Strikeout MigraDoc Text with AddFormattedText()

AddFormattedText() allows you to format the text as Bold, Italic, NotBold, NotItalic, NoUnderline, Underline.

It would be nice if you could also Strikeout text using this function.

My project requires one of two paragraphs to appear as strikeout text according to the IF...ELSE statement, but I have to draw each line of text using PDFsharp to strikeout. It does not flow as nicely with the rest of document where I use MigraDoc Paragraphs.

Author:  Thomas Hoevel [ Thu Jan 14, 2010 9:50 am ]
Post subject:  Re: Strikeout MigraDoc Text with AddFormattedText()

I put it on the wish list.
Not my area of expertise, but I hope it's easy to implement.

Author:  jro280 [ Thu Jan 14, 2010 11:37 pm ]
Post subject:  Re: Strikeout MigraDoc Text with AddFormattedText()

Minor thing, but just thought I would pass the word along, thanks! great product!

Author:  Doomic [ Tue May 10, 2011 2:56 pm ]
Post subject:  Re: Strikeout MigraDoc Text with AddFormattedText()

I had the same issue and resolved it by ussing the underline property and duplicated it.
pdf and rtf render both works now!
here is the path file.

Attachments:
File comment: Strike through path
Strikethrough.zip [3.38 KiB]
Downloaded 716 times

Author:  DaveR [ Mon Apr 23, 2012 1:35 pm ]
Post subject:  Re: Strikeout MigraDoc Text with AddFormattedText()

Can the patch be made part of the standard product for people like me who don't know how to apply it?

Author:  Doomic [ Tue Apr 24, 2012 8:25 pm ]
Post subject:  Re: Strikeout MigraDoc Text with AddFormattedText()

i don't know anymore how i made the patch. I do also not have the code with me, because it was from my other employer
but if you can't get it work you can always open it with notpad and read the lines. There will be something about linenumbers and what you should add.

about your PM. How to use the patch.
Same as you use underline, you can now use strikethrough.
the API will normaly add a line under the text if you use underline. The thing i have made was drawing the same line, but a few pixels higher, when you use strikethrough.

hopes it helps you.
otherwise i should start work again with migradoc to explain it in details. However, at the moment i have no project running where i could use migradoc for.

Author:  pistoletov [ Fri May 25, 2018 8:54 am ]
Post subject:  Re: Strikeout MigraDoc Text with AddFormattedText()

Doomic wrote:

about your PM. How to use the patch.
Same as you use underline, you can now use strikethrough.
the API will normaly add a line under the text if you use underline. The thing i have made was drawing the same line, but a few pixels higher, when you use strikethrough.

Does it work in page preview in WinForms? I apllied patch to Migradoc. Code build fine but i did not see strikethrough in document.
i use this code - paragraph.Format.Font.Striketrough = FontLineStyle.Dotted;

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/