diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 0e1aeaf9..e032cb84 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -323,7 +323,15 @@ namespace Volian.Print.Library // extra blank line at the top of the page. if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.CustomSpacing && PartsAbove[0].YOffset + yTopMargin == yPageStart && PartsAbove[0].IParagraph.Content == " ") - yPageStart = yTopMargin + YOffset; + { + if (MyItemInfo.IsHigh && ((YOffset - YTopMost) > SixLinesPerInch)) + { + //Console.WriteLine("==> {0} {1} MOST {2} DIF {3}", MyItemInfo.ShortPath, YOffset, YTopMost, YOffset - YTopMost); + yPageStart = yTopMargin + YTopMost; + } + else + yPageStart = yTopMargin + YOffset; + } else yPageStart = PartsAbove.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin); } @@ -2265,6 +2273,12 @@ namespace Volian.Print.Library XOffset -= (XOffset - (XOffset * (float)MyItemInfo.FormatStepData.Font.CPI / 12)); } XOffset -= 12; // This makes the 16bit & 32bit align very closely. + // if outside of the page margins then center within the page margins + float xOffset2 = (float)itemInfo.MyDocStyle.Layout.LeftMargin; + float xWidth2 = (float)itemInfo.MyDocStyle.Layout.PageWidth; + if (XOffset + Width > xOffset2 + xWidth2) + XOffset = xOffset2 / 2 + xWidth2 / 2 - Width / 2; + } // 05/14/12 - The PosAdjust is a format flag from 16bit. For WCN2, it appears that this amount equals // the amount of difference from a 10 CPI to a 12 CPI font. See comment above.