Fix the RTF for grid cells so that Text is set to use a Text font rather than a Symbol font.
Added some debug code for testing the function above. After the code was finished, the debug code was commented-out.
This commit is contained in:
@@ -242,8 +242,27 @@ namespace Volian.Print.Library
|
||||
if (c > '\x7F' && c != '\xA0' && c != '\xB0') return true;
|
||||
return false;
|
||||
}
|
||||
// The funcction below was used for the first few lines of DoVisitText which have been commented-out
|
||||
//private object FixText(string str)
|
||||
//{
|
||||
// StringBuilder sb = new StringBuilder();
|
||||
// foreach (char c in str)
|
||||
// if (c < ' ' || c > '\xFF')
|
||||
// sb.Append(string.Format("[{0}]", (int)c));
|
||||
// else
|
||||
// sb.Append(c);
|
||||
// return sb.ToString();
|
||||
//}
|
||||
protected override void DoVisitText(IRtfVisualText visualText)
|
||||
{
|
||||
//Code to find text (non-symbol) being output with a symbol font
|
||||
//if(visualText.Format.Font.Name=="VESymbFix" && visualText.Text.Length > 1)
|
||||
//{
|
||||
// string s = visualText.Text;
|
||||
// s=s.Replace("a","").Replace("b","");
|
||||
// if(s!=visualText.Text)
|
||||
// Console.WriteLine("{0}-{1}-{2}-{3}", visualText.Format.Font.Name, (int)(visualText.Text[0]),visualText.Text.Length,FixText(visualText.Text));
|
||||
//}
|
||||
int profileDepth = ProfileTimer.Push(">>>> DoVisitText");
|
||||
if (visualText.Format.IsHidden)
|
||||
{
|
||||
@@ -294,7 +313,6 @@ namespace Volian.Print.Library
|
||||
}
|
||||
ProfileTimer.Pop(profileDepth);
|
||||
}
|
||||
|
||||
private void AdjustChunk(IRtfVisualText visualText, iTextSharp.text.Font font, Chunk chk)
|
||||
{
|
||||
if (visualText.Format.BackgroundColor.AsDrawingColor.ToArgb() != System.Drawing.Color.White.ToArgb())
|
||||
|
Reference in New Issue
Block a user