I am working with 9.1 Documents. Using the RTF sample, and the Sample Gallery with modified code to get an RTF string into a MemoryStream. That accomplishes most of what I need. But it appears that text tagged with the RTF hidden text code (e.g. {"\v eg}") is not suppressed from the report. The RTF Namespace Character properties do not include hidden. Is there a way to get hidden text suppressed, or is this a needed enhancement? I suppose in the interim, I could preprocess my text string to remove the hidden text before putting it into the memory stream. But it would be nice for the reader to at least handle the hidden text code and set a character property so I could choose to hide or show hidden text (as Word allows). With a hidden property, the OnChar handler in the RTFExample.vb could determine to not call AddContent if the character had the hidden property.
I also do not believe that the RTFReader class is dealing with the RTF spacing codes \sbN, \saN, \slN, Is that true?
For what its worth, I used the following regex to strip out the hidden text:
Dim re As System.Text.RegularExpressions.Regex = _ New System.Text.RegularExpressions.Regex("\{\\v \S*\}")Dim s As String = re.Replace(RtfTextWithHiddenCodes, "")
Hi Roy,
To be perfectly honest, I'm not an RTF export. But if RTF supports a Hidden tag and the PDF engine is not honoring it, then that sounds like a bug that could easily be fixed within the engine.
Can you provide us with a small sample project demonstrating the issue so we can check it out?