B2017-241 Adjust Step Continue vertical location to account for figures

This commit is contained in:
Rich 2017-10-23 17:21:20 +00:00
parent 44b7934303
commit f624bd2487

View File

@ -652,6 +652,8 @@ namespace Volian.Print.Library
System.Drawing.Graphics gr = System.Drawing.Graphics.FromImage(image); System.Drawing.Graphics gr = System.Drawing.Graphics.FromImage(image);
myRtb.RenderClipped(gr, new System.Drawing.Rectangle(0, 0, (int)Width, (int)Height)); myRtb.RenderClipped(gr, new System.Drawing.Rectangle(0, 0, (int)Width, (int)Height));
// B2017-116 Adjust Image Size by Scaler (Used for Facing Pages - Sup Info) // B2017-116 Adjust Image Size by Scaler (Used for Facing Pages - Sup Info)
// B2017-241 Adjust Bottom Message Location for the raw figure (Equation or Visio)
MyPageHelper.BottomContent = yLocation - (.6F * Height * MyPageHelper.YMultiplier * ImageScaler);
retval = Rtf2Pdf.RtfRawAt(cb, image, XOffset + MyItemInfo.FormatStepData.Font.CharsToTwips, yLocation, Width * MyPageHelper.YMultiplier * ImageScaler, Height * MyPageHelper.YMultiplier * ImageScaler, DebugInfo, yBottomMargin, !MyItemInfo.FormatStepData.Type.ToUpper().Contains("BORDERLESS")); retval = Rtf2Pdf.RtfRawAt(cb, image, XOffset + MyItemInfo.FormatStepData.Font.CharsToTwips, yLocation, Width * MyPageHelper.YMultiplier * ImageScaler, Height * MyPageHelper.YMultiplier * ImageScaler, DebugInfo, yBottomMargin, !MyItemInfo.FormatStepData.Type.ToUpper().Contains("BORDERLESS"));
} }
catch (Exception ex) catch (Exception ex)
@ -1299,6 +1301,8 @@ namespace Volian.Print.Library
Height = ic.Image_Height; Height = ic.Image_Height;
} }
iTextSharp.text.Image it_image = iTextSharp.text.Image.GetInstance(idata); iTextSharp.text.Image it_image = iTextSharp.text.Image.GetInstance(idata);
// 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) // 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")); 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"));
} }
@ -1353,6 +1357,8 @@ namespace Volian.Print.Library
Width = sc.Step_ImageWidth; Width = sc.Step_ImageWidth;
Height = sc.Step_ImageHeight; Height = sc.Step_ImageHeight;
} }
// 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")); 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"));
} }
} }