B2017-012 Embedded Figure resizes on Facing Page
B2017-016 Equations and Visio Drawings resizes on Facing Page Releated issue where Equipment Lists containing Embedded Figures, Equations and Visio Drawings were overlapping with procedure text. Handle Embedded Figures, Equations and Visio Drawings when the Facing Page resize was occuring Figures were not being handled properly for Facing Page font resize
This commit is contained in:
@@ -641,7 +641,8 @@ namespace Volian.Print.Library
|
||||
System.Drawing.Image image = new System.Drawing.Bitmap((int)Width, (int)Height);
|
||||
System.Drawing.Graphics gr = System.Drawing.Graphics.FromImage(image);
|
||||
myRtb.RenderClipped(gr, new System.Drawing.Rectangle(0, 0, (int)Width, (int)Height));
|
||||
retval = Rtf2Pdf.RtfRawAt(cb, image, XOffset + MyItemInfo.FormatStepData.Font.CharsToTwips, yLocation, Width * MyPageHelper.YMultiplier, Height * MyPageHelper.YMultiplier, DebugInfo, yBottomMargin, !MyItemInfo.FormatStepData.Type.ToUpper().Contains("BORDERLESS"));
|
||||
// B2017-116 Adjust Image Size by Scaler (Used for Facing Pages - Sup Info)
|
||||
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)
|
||||
{
|
||||
@@ -1251,6 +1252,15 @@ namespace Volian.Print.Library
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
private float _ImageScaler = 1F;
|
||||
/// <summary>
|
||||
/// Scaler used to adjust the Image Size on Sup Info (Facing Pages)
|
||||
/// </summary>
|
||||
public float ImageScaler
|
||||
{
|
||||
get { return _ImageScaler; }
|
||||
set { _ImageScaler = value; }
|
||||
}
|
||||
//private bool _TextDebug = false; //true; this will turn on a writeline with debug in DrawText()
|
||||
private float DrawFigure(PdfContentByte cb, float yBottomMargin, float yLocation, float yPageStart, float yTopMargin)
|
||||
{
|
||||
@@ -1275,7 +1285,8 @@ namespace Volian.Print.Library
|
||||
Height = ic.Image_Height;
|
||||
}
|
||||
iTextSharp.text.Image it_image = iTextSharp.text.Image.GetInstance(idata);
|
||||
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"));
|
||||
// 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"));
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -4822,6 +4833,8 @@ namespace Volian.Print.Library
|
||||
if (chld != null && chld.MyContent.Type == MyItemInfo.MyContent.Type) return 0;
|
||||
}
|
||||
if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch;
|
||||
// If the next table child is a figure, equation or a visio drawing add a blank line
|
||||
if (MyItemInfo.Tables != null && MyItemInfo.Tables.Count > 0 && MyItemInfo.Tables[0].MyContent.MyGrid == null) return SixLinesPerInch;
|
||||
// Pagination issue to be used with yEndsWithBlankLine in Pagination code, but not checked in yet.
|
||||
//if (MyItemInfo.Ordinal % everyNLines == 0 || MyItemInfo.NextItem == null) return SixLinesPerInch;
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user