diff --git a/PROMS/Volian.Print.Library/Rtf2Pdf.cs b/PROMS/Volian.Print.Library/Rtf2Pdf.cs index ce4852fe..ee770ac8 100644 --- a/PROMS/Volian.Print.Library/Rtf2Pdf.cs +++ b/PROMS/Volian.Print.Library/Rtf2Pdf.cs @@ -244,7 +244,7 @@ namespace Volian.Print.Library if (ex == value) return true; return false; } - public static float FigureAt(PdfContentByte cb, iTextSharp.text.Image image, float x, float y, float width, float height, string debugText, float yBottommargin, bool hasBorder, int itmID) + public static float FigureAt(PdfContentByte cb, iTextSharp.text.Image image, float x, float y, float width, float height, string debugText, float yBottommargin, bool hasBorder, int itmID, float sixLinesPerInch) { if (cb.PdfDocument.PageNumber != _lastPageNum) // C2018-004 create meta file for baseline compares { @@ -254,7 +254,7 @@ namespace Volian.Print.Library VlnSvgPageHelper _MyPageHelper = cb.PdfWriter.PageEvent as VlnSvgPageHelper; PdfLayer textLayer = _MyPageHelper == null ? null : _MyPageHelper.TextLayer; float left = x + Offset.X; - float top = y + Offset.Y+ 12; + float top = y + Offset.Y + sixLinesPerInch; float bottom = top - height; image.ScaleAbsoluteWidth(width); image.ScaleAbsoluteHeight(height); @@ -286,7 +286,7 @@ namespace Volian.Print.Library DrawPdfDebug(cb, left, top, left + width, top-height, dbt, 0); } - return bottom; + return bottom; } private static float _GridTopAdjust = -10; public static float GridTopAdjust diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index b984423f..6ddb3fb4 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -1352,7 +1352,7 @@ namespace Volian.Print.Library // B2017-241 Adjust Bottom Message Location for the figure MyPageHelper.BottomContent = yLocation - (Height * MyPageHelper.YMultiplier); // B2017-112 Adjust Image Size by Scaler (Used for Facing Pages - Sup Info) - retval = Rtf2Pdf.FigureAt(cb, it_image, XOffset + MyItemInfo.FormatStepData.Font.CharsToTwips, yLocation, Width * MyPageHelper.YMultiplier * ImageScaler, Height * MyPageHelper.YMultiplier * ImageScaler, DebugInfo, yBottomMargin, !MyItemInfo.FormatStepData.Type.Contains("Borderless"), MyItemInfo.ItemID); // C2018-004 added ItemID for create meta file for baseline compares + retval = Rtf2Pdf.FigureAt(cb, it_image, XOffset + MyItemInfo.FormatStepData.Font.CharsToTwips, yLocation, Width * MyPageHelper.YMultiplier * ImageScaler, Height * MyPageHelper.YMultiplier * ImageScaler, DebugInfo, yBottomMargin, !MyItemInfo.FormatStepData.Type.Contains("Borderless"), MyItemInfo.ItemID, SixLinesPerInch); // C2018-004 added ItemID for create meta file for baseline compares } catch { @@ -1407,7 +1407,7 @@ namespace Volian.Print.Library } // B2017-241 Adjust Bottom Message Location for the figure MyPageHelper.BottomContent = yLocation - (Height * MyPageHelper.YMultiplier); - retval = Rtf2Pdf.FigureAt(cb, it_image, XOffset + MyItemInfo.FormatStepData.Font.CharsToTwips, yLocation, Width * MyPageHelper.YMultiplier, Height * MyPageHelper.YMultiplier, DebugInfo, yBottomMargin, !MyItemInfo.FormatStepData.Type.Contains("Borderless"), MyItemInfo.ItemID); + retval = Rtf2Pdf.FigureAt(cb, it_image, XOffset + MyItemInfo.FormatStepData.Font.CharsToTwips, yLocation, Width * MyPageHelper.YMultiplier, Height * MyPageHelper.YMultiplier, DebugInfo, yBottomMargin, !MyItemInfo.FormatStepData.Type.Contains("Borderless"), MyItemInfo.ItemID, SixLinesPerInch); } } // The following code was added to fix B2016-219 (for VCS, the centerline drew through a figure). The 'top' value was taken from the code @@ -3954,7 +3954,7 @@ namespace Volian.Print.Library } yoff = AdjustLocIfLongerRNO(itemInfo, yoff, yoffRightParent); bool noborder = MyItemInfo.FormatStepData.Type.ToUpper().Contains("BORDERLESS"); - yoff += (Height + ((noborder ? 2 : 3) * SixLinesPerInch)); + yoff += (Height + SixLinesPerInch); // B2019-059 only one extra line after a figure (does not matter if it has a border or not) CalculateXOffsetGridOrFigure(itemInfo, maxRNO, formatInfo); } catch (Exception ex)