public virtual void RenderText(TextRenderInfo renderInfo) { if (renderInfo.PdfString.ToUnicodeString().Length == 0) { return; } // if true, than clipping path was completely cleaned if (newClippingPath.IsEmpty()) { LineSegment baseline = renderInfo.GetUnscaledBaseline(); chunks.Add(new PdfCleanUpContentChunk.Text(renderInfo.PdfString, baseline.GetStartPoint(), baseline.GetEndPoint(), false, strNumber)); } else { foreach (TextRenderInfo ri in renderInfo.GetCharacterRenderInfos()) { bool isAllowed = filter.AllowText(ri); LineSegment baseline = ri.GetUnscaledBaseline(); chunks.Add(new PdfCleanUpContentChunk.Text(ri.PdfString, baseline.GetStartPoint(), baseline.GetEndPoint(), isAllowed, strNumber)); } } ++strNumber; }
public void RenderText(TextRenderInfo renderInfo) { var a = renderInfo.GetBaseline(); var ascentLine = renderInfo.GetAscentLine(); var a2 = renderInfo.GetSingleSpaceWidth(); var descentLine = renderInfo.GetDescentLine(); var a4 = renderInfo.GetUnscaledBaseline(); var a5 = renderInfo.GetFont(); var a6 = renderInfo.GetRise(); var a7 = renderInfo.GetText(); bool flag1 = this.result.Length == 0; bool flag2 = false; LineSegment baseline = renderInfo.GetBaseline(); Vector startPoint = baseline.GetStartPoint(); Vector endPoint = baseline.GetEndPoint(); if (!flag1) { Vector v = startPoint; Vector lastStart = this.lastStart; Vector lastEnd = this.lastEnd; if ((double)(lastEnd.Subtract(lastStart).Cross(lastStart.Subtract(v)).LengthSquared / lastEnd.Subtract(lastStart).LengthSquared) > 1.0) { flag2 = true; } } RectangleF rectCurrent = getRenderRectangleF(renderInfo); if (flag2) { this.AppendTextChunk('\n'); } //else if (!flag1 && this.result[this.result.Length - 1] != ' ' && (renderInfo.GetText().Length > 0 && renderInfo.GetText()[0] != ' ') && (double)this.lastEnd.Subtract(startPoint).Length > (double)renderInfo.GetSingleSpaceWidth() / 2.0) // this.AppendTextChunk(' '); this.AppendTextChunk(renderInfo.GetText()); this.lastStart = startPoint; this.lastEnd = endPoint; }