From 82824f8853704a1d4095cdfd181874cc9ef00e1d Mon Sep 17 00:00:00 2001 From: Kathy Date: Fri, 3 Jun 2016 14:44:03 +0000 Subject: [PATCH] B2016-142: old indent characters causing forced pagination and missing text from pdf --- PROMS/Volian.Print.Library/vlnPrintObject.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/PROMS/Volian.Print.Library/vlnPrintObject.cs b/PROMS/Volian.Print.Library/vlnPrintObject.cs index b15cfd04..db1e743b 100644 --- a/PROMS/Volian.Print.Library/vlnPrintObject.cs +++ b/PROMS/Volian.Print.Library/vlnPrintObject.cs @@ -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)