diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 7990257c..cddb94b6 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -450,7 +450,7 @@ namespace Volian.Print.Library // extra space between it and the previous step. The 16bit code uses the value of the extra space // from the high level step format regardless of what type of high level step it is. Also, if there // is caution or note above it, this space is not added: - yPageStart -= ((!MyItemInfo.IsHigh || ChildrenAbove == null) ? 0 : MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[2].StepLayoutData.STExtraSpace ?? 0); + yPageStart -= ((!MyItemInfo.IsHigh || ChildrenAbove == null || MyItemInfo.MyPrevious==null) ? 0 : MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[2].StepLayoutData.STExtraSpace ?? 0); yPageStart = ParagraphToPdf(cb, yPageStart, yTopMargin, yBottomMargin); yPageStart = ChildrenRight.ToPdf(cb, yPageStart, yTopMargin, yBottomMargin); yPageStart = ChildrenBelow.ToPdf(cb, yPageStart, yTopMargin, yBottomMargin); @@ -918,10 +918,17 @@ namespace Volian.Print.Library if (itemInfo.Tables != null) { bool aerTableOrFigure = itemInfo.FormatStepData.Type.Contains("AER"); + // get the first table & see if it is borderless. If borderless, 16bit code removed a + // line (yoffset) before printing it: + float yoffadj = 0; + VlnFlexGrid fg = new VlnFlexGrid(1, 1); + fg.LoadGrid(itemInfo.Tables[0]); + if (fg.BorderStyle == C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.None) yoffadj = -SixLinesPerInch; + if(!aerTableOrFigure && itemInfo.RNOLevel == 0) // Centered Table - yoff = ChildrenBelow.Add(cb, itemInfo.Tables, XOffset, yOffRight, yOffRight, rnoLevel, maxRNO, formatInfo); + yoff = ChildrenBelow.Add(cb, itemInfo.Tables, XOffset, yOffRight + yoffadj, yOffRight + yoffadj, rnoLevel, maxRNO, formatInfo); else // AER or RNO Table - yoff = ChildrenBelow.Add(cb, itemInfo.Tables, XOffset, yoff, yOffRight, rnoLevel, maxRNO, formatInfo); + yoff = ChildrenBelow.Add(cb, itemInfo.Tables, XOffset, yoff + yoffadj, yOffRight + yoffadj, rnoLevel, maxRNO, formatInfo); } // Look for the meta section case where the 'Editable' flag is set to 'N', which means that