It is very strange since text with spaces must be equal or more then the same text without spaces.
- Code: Select all
string file = GetFile(fileName, System.Reflection.MethodBase.GetCurrentMethod());
LicenceManager.SetSpireDoc();
LicenceManager.SetSpirePdf();
List<Paragraph> wrongParagraps = new List<Paragraph>();
Document document = new Document(file) { UseNewEngine = true };
foreach (Section section in document.Sections)
{
foreach (Paragraph paragraph in section.Paragraphs)
{
if (paragraph.CharCount <= paragraph.CharCountIncludeSpace)
{
}
else
{
wrongParagraps.Add(paragraph);
}
}
}
foreach (var item in wrongParagraps)
{
Console.WriteLine(item.Text);
}
document.Close();
document.Dispose();