} // Write string to Str Buffer ( for Tj ) public void FlushStrBuffer() { if (StrBuffer.Count == 0) { return; } if (LastFont != CurFont || LastFontSize != FontSize) { if (!Fonts.Contains(CurFont.Obj)) { Fonts.Add(CurFont.Obj); } TSW("/F" + CurFont.Obj + " " + FontSize + " Tf"); LastFont = CurFont; LastFontSize = FontSize; } bool useHex = false; foreach (byte b in StrBuffer) { if (b < 32 || b >= 128) { useHex = true; break; } } if (useHex) { TS.WriteByte((byte)'<'); foreach (byte b in StrBuffer) { int x = b >> 4; x += x < 10 ? 48 : 55; TS.WriteByte((byte)x); x = b & 15; x += x < 10 ? 48 : 55; TS.WriteByte((byte)x); } TSW("> Tj"); } else { TS.WriteByte((byte)'('); foreach (byte b in StrBuffer) { if (b == (byte)'(' || b == (byte)')' || b == (byte)'\\') { TS.WriteByte((byte)'\\'); } TS.WriteByte(b); } TSW(") Tj"); } StrBuffer.Clear(); }
public void Clear() { LocalList.Clear(); _dataSource.ClearList <TT>(Name); }