From 8d9d19db7d4a0f11152c607ca6bc717bf43d5e88 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 24 Apr 2020 13:12:19 +0000 Subject: [PATCH] =?UTF-8?q?B2020-059=20=E2=80=93=20the=201st=20AER=20sub-s?= =?UTF-8?q?tep=20was=20printing=20on=20the=20HLS=20text=20when=20the=20las?= =?UTF-8?q?t=20table=20in=20the=20RNO=20was=20compressed.=20(Barakah=20dat?= =?UTF-8?q?a)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Print.Library/Rtf2Pdf.cs | 16 ++++++++++------ PROMS/Volian.Print.Library/VlnSvgPageHelper.cs | 12 ++++++++++++ PROMS/Volian.Print.Library/vlnParagraph.cs | 2 ++ 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/PROMS/Volian.Print.Library/Rtf2Pdf.cs b/PROMS/Volian.Print.Library/Rtf2Pdf.cs index 3ce7aa72..129a1510 100644 --- a/PROMS/Volian.Print.Library/Rtf2Pdf.cs +++ b/PROMS/Volian.Print.Library/Rtf2Pdf.cs @@ -189,12 +189,20 @@ namespace Volian.Print.Library Volian.Base.Library.BaselineMetaFile.WriteLine("Page Change from {0} to {1}", _lastPageNum, cb.PdfDocument.PageNumber); _lastPageNum = cb.PdfDocument.PageNumber; } + VlnSvgPageHelper _MyPageHelper = cb.PdfWriter.PageEvent as VlnSvgPageHelper; + PdfLayer textLayer = _MyPageHelper == null ? null : _MyPageHelper.TextLayer; + float left = x + Offset.X; + float top = y + Offset.Y; + // B2020-059 - Barakah 1T4-OP-EOP-AC-0001 Instructions and Contingency Actions section step 6 last table in RNO is compressed - cause first bullet substep in AER to print on top HLS text + // AdjustedTable and AdjustedTableYtop are set in vlnParagraph.cs DrawGrid() + if (_MyPageHelper.AdjustedTable != null && _MyPageHelper.AdjustedTableYtop > y) + top += _MyPageHelper.TableAdjustment;// RHM20150525 - Table Scrunch //B2020-059 if (iParagraph.Chunks.Count > 0) { if (itmID == null) - Volian.Base.Library.BaselineMetaFile.WriteLine("TX x={0} Y={1} W={2} H={3}", x, y, width, height); + Volian.Base.Library.BaselineMetaFile.WriteLine("TX x={0} Y={1} W={2} H={3}", left-Offset.X, top-Offset.Y, width, height); else - Volian.Base.Library.BaselineMetaFile.WriteLine("TX x={0} Y={1} W={2} H={3} ItmID={4}", x, y, width, height, itmID); + Volian.Base.Library.BaselineMetaFile.WriteLine("TX x={0} Y={1} W={2} H={3} ItmID={4}", left - Offset.X, top - Offset.Y, width, height, itmID); foreach (Chunk chk1 in iParagraph) { //Object obj = chk1.Attributes["UNDERLINE"]; @@ -214,10 +222,6 @@ namespace Volian.Print.Library chk.Attributes.Add("NoSplit", false); } } - VlnSvgPageHelper _MyPageHelper = cb.PdfWriter.PageEvent as VlnSvgPageHelper; - PdfLayer textLayer = _MyPageHelper == null ? null : _MyPageHelper.TextLayer; - float left = x + Offset.X; - float top = y + Offset.Y + _MyPageHelper.TableAdjustment;// RHM20150525 - Table Scrunch float right = left + width; float bottom = top - height; ColumnText myColumnText = new ColumnText(cb); diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index f67495ff..c87ec5a0 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -20,6 +20,18 @@ namespace Volian.Print.Library get { return _TableAdjustment; } set { _TableAdjustment = value; } } + private vlnParagraph _AdjustedTable; // B2020-059 - save info of table that was compressed (set in vlnParagraph.cs DrawGrid() and used in RTF2PDF.cs TextAt()) + public vlnParagraph AdjustedTable + { + get { return _AdjustedTable; } + set { _AdjustedTable = value; } + } + private float _AdjustedTableYtop; + public float AdjustedTableYtop // B2020-059 - save the Ytop of the compressed table (set in vlnParagraph.cs DrawGrid() and used in RTF2PDF.cs TextAt()) + { + get { return _AdjustedTableYtop; } + set { _AdjustedTableYtop = value; } + } private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private pkParagraphs _MyPlacekeepers = new pkParagraphs(); public pkParagraphs MyPlacekeepers diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 12605547..8f1a460c 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -925,6 +925,8 @@ namespace Volian.Print.Library MyGrid.TooBig = SixLinesPerInch + MyGrid.Height * MyPageHelper.YMultiplier - (yLocation - yBottomMargin - ySizeBtmCtnMess); float heightAfter = (MyGrid.Height + 4) * MyPageHelper.YMultiplier; // B2020-014 added parenthesis was calculating wrong for 7lpi Callaway FSG-7 Attachment 7 MyPageHelper.TableAdjustment += (heightBefore - heightAfter); + MyPageHelper.AdjustedTable = this; // B2020-059 - save the information of the table that is being compressed (used in RTF2PDF.cs TextAt()) + MyPageHelper.AdjustedTableYtop = yLocation; // B2020-059 save the top location of the compressed table (used in RTF2PDF.cs TextAt()) //B2018-092 Determine if the Table is too big by checking it including either 6 LPI or 7 LPI as appropriate if (heightAfter * MyPageHelper.YMultiplier < (yLocation - yBottomMargin - ySizeBtmCtnMess)) {