/// <summary>Filter a TextRenderInfo object</summary> /// <param name="text">the TextRenderInfo to be filtered</param> public virtual PdfCleanUpFilter.FilterResult <PdfArray> FilterText(TextRenderInfo text) { PdfTextArray textArray = new PdfTextArray(); if (IsTextNotToBeCleaned(text)) { return(new PdfCleanUpFilter.FilterResult <PdfArray>(false, new PdfArray(text.GetPdfString()))); } foreach (TextRenderInfo ri in text.GetCharacterRenderInfos()) { if (IsTextNotToBeCleaned(ri)) { textArray.Add(ri.GetPdfString()); } else { textArray.Add(new PdfNumber(-ri.GetUnscaledWidth() * 1000f / (text.GetFontSize() * text.GetHorizontalScaling () / 100))); } } return(new PdfCleanUpFilter.FilterResult <PdfArray>(true, textArray)); }