diff --git a/PROMS/Volian.Print.Library/Grid2Pdf.cs b/PROMS/Volian.Print.Library/Grid2Pdf.cs index 14f63429..0c2a62b8 100644 --- a/PROMS/Volian.Print.Library/Grid2Pdf.cs +++ b/PROMS/Volian.Print.Library/Grid2Pdf.cs @@ -57,6 +57,9 @@ namespace Volian.Print.Library } public partial class vlnCell { + #region Log4Net + private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + #endregion public bool ShowDetails { get { return MyTable.ShowDetails; } } private static float YAdjust_h = 0; // 0 @@ -289,11 +292,20 @@ namespace Volian.Print.Library //if(ShowDetails) Console.WriteLine("vvvvvvlnTable============{0}===============", ItemID); ItemInfo myItemInfo = myFlexGrid.GetMyItemInfo(); ItemID = myItemInfo.ItemID; + Path = myItemInfo.ShortPath; DebugInfo = string.Format("DebugID = {0}, ID={1} Type={2} TypeName='{3}' StepLevel={4} ShortPath={5} Width={6} Left={7} YOffset={8}", 0, myItemInfo.ItemID, myItemInfo.FormatStepType, myItemInfo.FormatStepData == null ? "NoStepData" : myItemInfo.FormatStepData.Type, myItemInfo.StepLevel, myItemInfo.ShortPath, Width, XOffset, YOffset); } #endregion + private string _Path; + +public string Path +{ + get { return _Path; } + set { _Path = value; } +} + #region Constructors public vlnTable(VlnFlexGrid myFlexGrid, iTextSharp.text.pdf.PdfContentByte myContentByte) { @@ -1367,7 +1379,9 @@ namespace Volian.Print.Library // B2019-093 missing table cell text when printing South Texas FSG-20 step 1 // Added two more to the last parameter of SetSimplColun (it's the ury value - upper y value) // this will have the cell text print a little more toward the top of the cell - myColumnText1.SetSimpleColumn(1 + left + x, top - y - h, left + x + w - 2, 3 + top - y - hAdjust - adjustTextLocation); // 2 == Default Padding + //myColumnText1.SetSimpleColumn(1 + left + x, top - y - h, left + x + w - 2, 3 + top - y - hAdjust - adjustTextLocation); // 2 == Default Padding + // B2019-109 Adjusted width of cell to match edit cell + myColumnText1.SetSimpleColumn(.5F + left + x, top - y - h, left + x + w - 1.5F, 3 + top - y - hAdjust - adjustTextLocation); // 2 == Default Padding // B2018-003 - RHM 20180319 Change Debug Output string dbg = string.Format("Row={0}, Col={1}, Leading={2}, SpacingBefore={3}", r1, c1, MyPara.TotalLeading, MyPara.SpacingBefore); // B2018-033 VCS SAG-6 Steps 3 and 9 and SACRG1 Step 13 @@ -1405,7 +1419,12 @@ namespace Volian.Print.Library } } float posBefore = myColumnText1.YLine; // RHM20150429 - Table Scrunch - myColumnText1.Go(); + int cellStatus = myColumnText1.Go(); // B2019-109 Add to Error Log if cell too small + if (cellStatus != 1) + { + //System.Windows.Forms.MessageBox.Show("Cell width too narrow \r\n" + MyTable.Path, "Narrow Cell", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation); + _MyLog.WarnFormat("\r\n=-=-=-= Cell Width too narrow, text is wrapping ItemID={0} Location={1}, Row={2}, Col={3}, Status={4}",MyTable.ItemID, MyTable.Path, r1, c1, cellStatus); + } float posAfter = myColumnText1.YLine; // RHM20150429 - Table Scrunch // B2018-033 Removed debug printout //if(ShowDetails)Console.WriteLine("ToPDF posBefore,posAfter,difference={0},{1},{2},{3}",