B2016-142: old indent characters causing forced pagination and missing text from pdf

This commit is contained in:
Kathy Ruffing 2016-06-03 14:44:03 +00:00
parent eec1c7f6f9
commit 82824f8853

View File

@ -223,8 +223,18 @@ namespace Volian.Print.Library
//myColumnText.UseAscender = true;// Adjusts to the top of the text box.
int status = myColumnText.Go(true); // Check to see if it will fit on the page.
if (ColumnText.HasMoreText(status) && throwException)
{
// B2016-142: If the paragraph won't fit on page and indenting is on, remove
// indenting & try again:
if (iParagraph.FirstLineIndent < 0)
{
iParagraph.FirstLineIndent = 0;
iParagraph.IndentationLeft = 0;
return GetHeight(cb, iParagraph, suffix, width, throwException);
}
//throw (new Exception("Paragraph longer than a page"));
Console.WriteLine("Paragraph longer than a page");
}
return 792F - myColumnText.YLine; // This gives the height of the Paragraph
}
public float GetTableWidth(PdfContentByte cb, Paragraph iParagraph, float? maxWidth)