From 59e3f077e22ae45085f4daa84770a8df5ebeda3c Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 31 Mar 2020 13:42:20 +0000 Subject: [PATCH] B2020-041: exponent prints with character codes in psi (and any pagelist item) --- PROMS/Volian.Svg.Library/iTextSharp.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Svg.Library/iTextSharp.cs b/PROMS/Volian.Svg.Library/iTextSharp.cs index 8b1d204c..cd684d44 100644 --- a/PROMS/Volian.Svg.Library/iTextSharp.cs +++ b/PROMS/Volian.Svg.Library/iTextSharp.cs @@ -703,8 +703,15 @@ namespace Volian.Svg.Library int stindx = text.IndexOf("\\"); while (stindx != -1) { - if (stindx+2 < text.Length-1 && text.ToUpper().IndexOf("UL",stindx+1)==stindx+1) //don't replace it - stindx = text.IndexOf("\\",stindx+1); + if ((stindx + 2 < text.Length - 1 && text.ToUpper().IndexOf("UL", stindx + 1) == stindx + 1) || //don't replace it + // B2020-041: PSI (this happened for all pagelist items) print doesn't resolve super/sub script, bold, italics: + (stindx + 2 < text.Length - 1 && text.ToUpper().IndexOf("UP", stindx + 1) == stindx + 1) || + (stindx + 2 < text.Length - 1 && text.ToUpper().IndexOf("B ", stindx + 1) == stindx + 1) || + (stindx + 2 < text.Length - 1 && text.ToUpper().IndexOf("B0", stindx + 1) == stindx + 1) || + (stindx + 2 < text.Length - 1 && text.ToUpper().IndexOf("DN", stindx + 1) == stindx + 1) || + (stindx + 2 < text.Length - 1 && text.ToUpper().IndexOf("I ", stindx + 1) == stindx + 1) || + (stindx + 2 < text.Length - 1 && text.ToUpper().IndexOf("I0", stindx + 1) == stindx + 1)) + stindx = text.IndexOf("\\", stindx + 1); else { text = text.Remove(stindx,1);