Improved accounting for bottom continue messages for pagination
Bottom Message (below text) fix and pagination improvements Include RNO separator in ‘BottomContent’ calculation Reset ‘BottomContent’ for each page & added ruler for bottom of page
This commit is contained in:
parent
65bfcdb9b8
commit
06ba7bf825
@ -196,7 +196,8 @@ namespace Volian.Print.Library
|
|||||||
else
|
else
|
||||||
firstStepChild = firstStepChild.MyParent.ChildrenBelow[firstStepChild.MyParent.ChildrenBelow.Count - 1];
|
firstStepChild = firstStepChild.MyParent.ChildrenBelow[firstStepChild.MyParent.ChildrenBelow.Count - 1];
|
||||||
float ySizeIncludingFirstStep = firstStepChild.YSize + (firstStepChild.YTopMost - YTopMost);
|
float ySizeIncludingFirstStep = firstStepChild.YSize + (firstStepChild.YTopMost - YTopMost);
|
||||||
bool firstSubstepExceedsSpaceAvailable = ySizeIncludingFirstStep > yWithinMargins;
|
float ySizeBtmCtnMess = GetBottomContinueMessageSize(MyItemInfo.MyDocStyle);
|
||||||
|
bool firstSubstepExceedsSpaceAvailable = ySizeIncludingFirstStep > (yWithinMargins - ySizeBtmCtnMess);
|
||||||
if (KeepStepsOnPage && firstSubstepExceedsSpaceAvailable && !isFirstChild)
|
if (KeepStepsOnPage && firstSubstepExceedsSpaceAvailable && !isFirstChild)
|
||||||
KeepStepsOnPage = false;
|
KeepStepsOnPage = false;
|
||||||
if (ySizeIncludingFirst == YSize) KeepStepsOnPage = false;
|
if (ySizeIncludingFirst == YSize) KeepStepsOnPage = false;
|
||||||
@ -404,6 +405,8 @@ namespace Volian.Print.Library
|
|||||||
float mySize7LPI = mySize; // +SixLinesPerInch;
|
float mySize7LPI = mySize; // +SixLinesPerInch;
|
||||||
if (_Match16BitPagination) mySize7LPI += SixLinesPerInch;
|
if (_Match16BitPagination) mySize7LPI += SixLinesPerInch;
|
||||||
float tableSpaceAvailable = TableSpaceAvailable;// RHM20150525 - Table Scrunch
|
float tableSpaceAvailable = TableSpaceAvailable;// RHM20150525 - Table Scrunch
|
||||||
|
float ySizeBtmCtnMess1 = GetBottomContinueMessageSize(MyItemInfo.MyDocStyle);
|
||||||
|
if (KeepStepsOnPage && ySizeIncludingFirst > (yWithinMargins - ySizeBtmCtnMess1)) KeepStepsOnPage = false;
|
||||||
if (!KeepWithHeader && !KeepStepsOnPage && mySize - SixLinesPerInch + yEndMsg - tableSpaceAvailable <= yPageSizeNextPage) // if the entire step can fit on one page, do a page break
|
if (!KeepWithHeader && !KeepStepsOnPage && mySize - SixLinesPerInch + yEndMsg - tableSpaceAvailable <= yPageSizeNextPage) // if the entire step can fit on one page, do a page break
|
||||||
{
|
{
|
||||||
// Don't want extra line before step
|
// Don't want extra line before step
|
||||||
@ -720,8 +723,7 @@ namespace Volian.Print.Library
|
|||||||
//while ((YSize - yTop) >= ySpaceOnCurPage)
|
//while ((YSize - yTop) >= ySpaceOnCurPage)
|
||||||
// Pagination Fix Break1LineShort3b
|
// Pagination Fix Break1LineShort3b
|
||||||
DocStyle docstyle = MyItemInfo.MyDocStyle;
|
DocStyle docstyle = MyItemInfo.MyDocStyle;
|
||||||
string myBottomMsg = docstyle.Continue.Bottom.Message;
|
float myBottomMsgSpace = GetBottomContinueMessageSize(docstyle);
|
||||||
float myBottomMsgSpace = ((myBottomMsg ?? "") != "") ? 2 * SixLinesPerInch : 0;
|
|
||||||
switch (docstyle.Continue.Bottom.Location)
|
switch (docstyle.Continue.Bottom.Location)
|
||||||
{
|
{
|
||||||
case E_ContBottomLoc.BottomOfPage: // place continue message at bottom of page
|
case E_ContBottomLoc.BottomOfPage: // place continue message at bottom of page
|
||||||
@ -1093,6 +1095,16 @@ namespace Volian.Print.Library
|
|||||||
ProfileTimer.Pop(profileDepth);
|
ProfileTimer.Pop(profileDepth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private float GetBottomContinueMessageSize(DocStyle docstyle)
|
||||||
|
{
|
||||||
|
float myBottomMsgSpace = 0;
|
||||||
|
docstyle = MyItemInfo.MyDocStyle;
|
||||||
|
string myBottomMsg = docstyle.Continue.Bottom.Message;
|
||||||
|
myBottomMsgSpace = ((myBottomMsg ?? "") != "") ? 2 * SixLinesPerInch : 0;
|
||||||
|
if (myBottomMsg != null && myBottomMsg.Contains("par")) myBottomMsgSpace += SixLinesPerInch;
|
||||||
|
return myBottomMsgSpace;
|
||||||
|
}
|
||||||
|
|
||||||
private bool JustATableThatWillFit(vlnParagraph paraBreak, float ypagesize)
|
private bool JustATableThatWillFit(vlnParagraph paraBreak, float ypagesize)
|
||||||
{
|
{
|
||||||
if (paraBreak.MyItemInfo.MyContent.Text.Replace(" ", "").Replace(@"\u160?", "").Replace(@"\'A0", "") != "") return false;
|
if (paraBreak.MyItemInfo.MyContent.Text.Replace(" ", "").Replace(@"\u160?", "").Replace(@"\'A0", "") != "") return false;
|
||||||
|
@ -241,7 +241,12 @@ namespace Volian.Print.Library
|
|||||||
DrawChangeBars(writer.DirectContent);
|
DrawChangeBars(writer.DirectContent);
|
||||||
DrawMessages(writer.DirectContent);
|
DrawMessages(writer.DirectContent);
|
||||||
if (!CreatingFoldoutPage)
|
if (!CreatingFoldoutPage)
|
||||||
|
{
|
||||||
DrawRuler(writer.DirectContent);
|
DrawRuler(writer.DirectContent);
|
||||||
|
float x = MySection == null ? 555 : (float)MySection.MyDocStyle.Layout.PageWidth;
|
||||||
|
DrawBottomRuler(writer.DirectContent, x / 2 - 144); //aer column
|
||||||
|
DrawBottomRuler(writer.DirectContent, x - 144); //rno column
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -308,11 +313,48 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
PageListTopCheckOffHeader = null;
|
PageListTopCheckOffHeader = null;
|
||||||
PageListLastCheckOffHeader = null;
|
PageListLastCheckOffHeader = null;
|
||||||
|
BottomContent = null;
|
||||||
YMultiplier = 1;
|
YMultiplier = 1;
|
||||||
PrintedAPage = true;
|
PrintedAPage = true;
|
||||||
ProfileTimer.Pop(profileDepth);
|
ProfileTimer.Pop(profileDepth);
|
||||||
}
|
}
|
||||||
|
private void DrawBottomRuler(PdfContentByte cb, float x)
|
||||||
|
{
|
||||||
|
VlnSvgPageHelper myPageHelper = cb.PdfWriter.PageEvent as VlnSvgPageHelper;
|
||||||
|
if (myPageHelper.DebugLayer != null)
|
||||||
|
{
|
||||||
|
cb.BeginLayer(myPageHelper.DebugLayer);
|
||||||
|
cb.SaveState();
|
||||||
|
cb.SetLineWidth(.1F);
|
||||||
|
cb.SetColorStroke(new Color(System.Drawing.Color.Plum));
|
||||||
|
float height = 350;
|
||||||
|
float yTop = 350;
|
||||||
|
float yBottom = yTop - height;
|
||||||
|
cb.MoveTo(x, yTop);
|
||||||
|
cb.LineTo(x, yBottom);
|
||||||
|
if (myPageHelper.BottomContent != null)
|
||||||
|
{
|
||||||
|
cb.MoveTo(0, (float)myPageHelper.BottomContent);
|
||||||
|
cb.LineTo(792, (float)myPageHelper.BottomContent);
|
||||||
|
}
|
||||||
|
int i = 0;
|
||||||
|
for (float y = yBottom; y <= yTop; y += 10)
|
||||||
|
{
|
||||||
|
float w = 10;
|
||||||
|
if (i % 10 == 0) w = 30;
|
||||||
|
else if (i % 5 == 0) w = 20;
|
||||||
|
cb.SetLineWidth(w / 30);
|
||||||
|
i++;
|
||||||
|
cb.MoveTo(x + w, y);
|
||||||
|
cb.LineTo(x, y);
|
||||||
|
cb.Stroke();
|
||||||
|
}
|
||||||
|
i = 0;
|
||||||
|
cb.Stroke();
|
||||||
|
cb.RestoreState();
|
||||||
|
cb.EndLayer();
|
||||||
|
}
|
||||||
|
}
|
||||||
private void DrawVertical(PdfContentByte cb, float x, float top, float bottom)
|
private void DrawVertical(PdfContentByte cb, float x, float top, float bottom)
|
||||||
{
|
{
|
||||||
cb.SaveState();
|
cb.SaveState();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Drawing;
|
//using System.Drawing;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using iTextSharp.text.pdf;
|
using iTextSharp.text.pdf;
|
||||||
@ -935,6 +935,7 @@ namespace Volian.Print.Library
|
|||||||
// }
|
// }
|
||||||
// MyPageHelper.BottomContent = yLocation - Height;
|
// MyPageHelper.BottomContent = yLocation - Height;
|
||||||
//if (MyItemInfo.InList(39048)) Console.WriteLine("Here");
|
//if (MyItemInfo.InList(39048)) Console.WriteLine("Here");
|
||||||
|
MyPageHelper.BottomContent = yLocation - (Height * MyPageHelper.YMultiplier);
|
||||||
retval = Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, Width, 100, DebugInfo + string.Format(",YLines = {0}", YSize / SixLinesPerInch), yBottomMargin);
|
retval = Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, Width, 100, DebugInfo + string.Format(",YLines = {0}", YSize / SixLinesPerInch), yBottomMargin);
|
||||||
ProfileTimer.Pop(profileDepth);
|
ProfileTimer.Pop(profileDepth);
|
||||||
//}
|
//}
|
||||||
@ -1361,7 +1362,7 @@ namespace Volian.Print.Library
|
|||||||
//`88b ooo d8( 888 o. )88b 888 .o 888
|
//`88b ooo d8( 888 o. )88b 888 .o 888
|
||||||
// `Y8bood8P' `Y888""8o 8""888P' `Y8bod8P' o888o
|
// `Y8bood8P' `Y888""8o 8""888P' `Y8bod8P' o888o
|
||||||
case 1: // Break on High Level Step
|
case 1: // Break on High Level Step
|
||||||
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
YTopMost=OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||||
docstyle = MyItemInfo.MyDocStyle;
|
docstyle = MyItemInfo.MyDocStyle;
|
||||||
if (MyPageHelper.NotesToFootNotes != null && MyPageHelper.NotesToFootNotes.Count > 0) MyPageHelper.NotesToFootNotesYoffset = CalculateYLocation(yLocation, yTopMargin);
|
if (MyPageHelper.NotesToFootNotes != null && MyPageHelper.NotesToFootNotes.Count > 0) MyPageHelper.NotesToFootNotesYoffset = CalculateYLocation(yLocation, yTopMargin);
|
||||||
bool doSectionContinue = !MyItemInfo.IsSection && ((docstyle.StructureStyle.Style & E_DocStructStyle.BottomSectionContinue) == E_DocStructStyle.BottomSectionContinue);
|
bool doSectionContinue = !MyItemInfo.IsSection && ((docstyle.StructureStyle.Style & E_DocStructStyle.BottomSectionContinue) == E_DocStructStyle.BottomSectionContinue);
|
||||||
@ -1410,8 +1411,8 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
yPageStart = yTopMargin + YTopMost;
|
yPageStart = yTopMargin + YTopMost;
|
||||||
DoCheckOffHeader(cb, MyItemInfo, yLocation, yTopMargin, yPageStart);
|
DoCheckOffHeader(cb, MyItemInfo, yLocation, yTopMargin, yPageStart);
|
||||||
|
// KBR for WCNTRN work: SectionTopMessage(cb, yTopMargin, yLocation);
|
||||||
if (doSectionContinue ) DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle , null);
|
if (doSectionContinue) DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle , null);
|
||||||
// If "ContinueSectionHeader" (format flag) is true then print the section title with "(Continued)" appended to it
|
// If "ContinueSectionHeader" (format flag) is true then print the section title with "(Continued)" appended to it
|
||||||
if (!MyItemInfo.IsSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader && (!MyItemInfo.IsSection || MyItemInfo.IsSeparateSubsection))
|
if (!MyItemInfo.IsSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader && (!MyItemInfo.IsSection || MyItemInfo.IsSeparateSubsection))
|
||||||
{
|
{
|
||||||
@ -1432,7 +1433,7 @@ namespace Volian.Print.Library
|
|||||||
// `88b ooo d8( 888 o. )88b 888 .o .oP .o
|
// `88b ooo d8( 888 o. )88b 888 .o .oP .o
|
||||||
// `Y8bood8P' `Y888""8o 8""888P' `Y8bod8P' 8888888888
|
// `Y8bood8P' `Y888""8o 8""888P' `Y8bod8P' 8888888888
|
||||||
case 2: // Break within a Step
|
case 2: // Break within a Step
|
||||||
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
YTopMost=OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||||
docstyle = MyItemInfo.MyDocStyle;
|
docstyle = MyItemInfo.MyDocStyle;
|
||||||
bool doAlarmBox = false;
|
bool doAlarmBox = false;
|
||||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||||
@ -1549,6 +1550,7 @@ namespace Volian.Print.Library
|
|||||||
doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y") && !MyItemInfo.MyDocStyle.CancelSectTitle;
|
doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y") && !MyItemInfo.MyDocStyle.CancelSectTitle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// KBR for WCNTRN work:SectionTopMessage(cb, yTopMargin, yLocation);
|
||||||
if (!doSectionTitleContinued || !SectionShowTitles)
|
if (!doSectionTitleContinued || !SectionShowTitles)
|
||||||
addExtraLines = DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle, doThreeContinues && MyItemInfo.MyParent != null && MyItemInfo.MyParent.MyTab != null ? MyItemInfo.MyParent.MyTab.CleanText : null);
|
addExtraLines = DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle, doThreeContinues && MyItemInfo.MyParent != null && MyItemInfo.MyParent.MyTab != null ? MyItemInfo.MyParent.MyTab.CleanText : null);
|
||||||
|
|
||||||
@ -1604,7 +1606,7 @@ namespace Volian.Print.Library
|
|||||||
case 3: // Break on High Level Step (SevenLinesPerInch)
|
case 3: // Break on High Level Step (SevenLinesPerInch)
|
||||||
if (!firstHighLevelStep)
|
if (!firstHighLevelStep)
|
||||||
{
|
{
|
||||||
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
YTopMost=OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||||
if (MyPageHelper.NotesToFootNotes != null && MyPageHelper.NotesToFootNotes.Count > 0) MyPageHelper.NotesToFootNotesYoffset = CalculateYLocation(yLocation, yTopMargin);
|
if (MyPageHelper.NotesToFootNotes != null && MyPageHelper.NotesToFootNotes.Count > 0) MyPageHelper.NotesToFootNotesYoffset = CalculateYLocation(yLocation, yTopMargin);
|
||||||
MyPromsPrinter.NewPage(); // HLS (7 lpi) breakif (MyItemInfo.IsSection)
|
MyPromsPrinter.NewPage(); // HLS (7 lpi) breakif (MyItemInfo.IsSection)
|
||||||
//_MyLog.InfoFormat("NewPage 12 {0}", cb.PdfWriter.CurrentPageNumber);
|
//_MyLog.InfoFormat("NewPage 12 {0}", cb.PdfWriter.CurrentPageNumber);
|
||||||
@ -1731,7 +1733,7 @@ namespace Volian.Print.Library
|
|||||||
MyPageHelper.ParaBreaks[0] == this)
|
MyPageHelper.ParaBreaks[0] == this)
|
||||||
{
|
{
|
||||||
ShowPageBreak(1, CheckForCompression("PageBreakOnStep/Caution/Note HLS"), "Yes", YTop - YBottomMost, yTopMargin - yBottomMargin, yTopMargin - yBottomMargin, false);
|
ShowPageBreak(1, CheckForCompression("PageBreakOnStep/Caution/Note HLS"), "Yes", YTop - YBottomMost, yTopMargin - yBottomMargin, yTopMargin - yBottomMargin, false);
|
||||||
OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
YTopMost=OutputOtherPageSteps(cb, YTopMost, yPageStart, yTopMargin, yBottomMargin);
|
||||||
MyPageHelper.BottomMessage = null;
|
MyPageHelper.BottomMessage = null;
|
||||||
MyPageHelper.TopMessage = null;
|
MyPageHelper.TopMessage = null;
|
||||||
MyPromsPrinter.NewPage();
|
MyPromsPrinter.NewPage();
|
||||||
@ -1846,6 +1848,29 @@ namespace Volian.Print.Library
|
|||||||
ProfileTimer.Pop(profileDepth);
|
ProfileTimer.Pop(profileDepth);
|
||||||
return yPageStart;
|
return yPageStart;
|
||||||
}
|
}
|
||||||
|
// KBR: WCNTRN work
|
||||||
|
//private void SectionTopMessage(PdfContentByte cb, float yTopMargin, float yLocation)
|
||||||
|
//{
|
||||||
|
// if (MyItemInfo.MyDocStyle.SectTop != null && MyItemInfo.MyDocStyle.SectTop.Message != null)
|
||||||
|
// {
|
||||||
|
// float sectMsgY = CalculateYLocation(YTop, yTopMargin);
|
||||||
|
// if (MyPageHelper.YMultiplier != 1)
|
||||||
|
// {
|
||||||
|
// sectMsgY = -1 + yTopMargin - (yTopMargin - yLocation) * MyPageHelper.YMultiplier;
|
||||||
|
// }
|
||||||
|
// VE_Font sctMsgFont = MyItemInfo.MyDocStyle.SectTop.Font;
|
||||||
|
// string scttop = null;
|
||||||
|
// if (!MyItemInfo.IsStepSection && MyItemInfo.MyDocStyle.SectTop.Message != null)
|
||||||
|
// scttop = MyItemInfo.MyDocStyle.SectTop.Message.Replace("%s", (MyItemInfo.ActiveSection as SectionInfo).DisplayNumber);
|
||||||
|
// else
|
||||||
|
// scttop = (MyItemInfo as SectionInfo).DisplayNumber;
|
||||||
|
// float scttopWidth = scttop.Length * 6;
|
||||||
|
// float ctr = (float)MyItemInfo.MyDocStyle.SectTop.Margin;
|
||||||
|
// float sctcntrX = (float)MyItemInfo.MyDocStyle.Layout.LeftMargin + ctr - (scttopWidth / 2);
|
||||||
|
// vlnText mySectMsg = new vlnText(cb, this, scttop, scttop, sctcntrX, sectMsgY, sctMsgFont);
|
||||||
|
// PartsLeft.Add(mySectMsg);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
// Added to try to resolve a problem when printing FNP-1-FRP-I.3 Attachment 3 Table 1.
|
// Added to try to resolve a problem when printing FNP-1-FRP-I.3 Attachment 3 Table 1.
|
||||||
// May be needed to evaluate this problem in the future.
|
// May be needed to evaluate this problem in the future.
|
||||||
//private void CompareSectionInfo(SectionInfo si, SectionInfo si1)
|
//private void CompareSectionInfo(SectionInfo si, SectionInfo si1)
|
||||||
@ -2128,7 +2153,9 @@ namespace Volian.Print.Library
|
|||||||
switch (docstyle.Continue.Bottom.Location)
|
switch (docstyle.Continue.Bottom.Location)
|
||||||
{
|
{
|
||||||
case E_ContBottomLoc.EndOfText: // place continue string at end of text
|
case E_ContBottomLoc.EndOfText: // place continue string at end of text
|
||||||
msg_yLocation = msg_yLocation + yLocation - SixLinesPerInch;
|
// msg_yLocation accounts for extra lines in message from docstyle; and BottomContent is the actual
|
||||||
|
// location of the last line of text on page.
|
||||||
|
msg_yLocation = msg_yLocation + ((float)MyPageHelper.BottomContent - (SixLinesPerInch * MyPageHelper.YMultiplier));
|
||||||
float tableSpaceAvailable = TableSpaceAvailable;// RHM20150525 - Table Scrunch
|
float tableSpaceAvailable = TableSpaceAvailable;// RHM20150525 - Table Scrunch
|
||||||
if (yBottomMargin + (docstyle.Layout.FooterLength ?? 0) > msg_yLocation)
|
if (yBottomMargin + (docstyle.Layout.FooterLength ?? 0) > msg_yLocation)
|
||||||
{ // Adjusted Continue Message Y Offset
|
{ // Adjusted Continue Message Y Offset
|
||||||
@ -2168,7 +2195,6 @@ namespace Volian.Print.Library
|
|||||||
_MyLog.WarnFormat("**** BOTTOM CONTINUE MESSAGE NOT CODED FOR LOCATION {0}*****", docstyle.Continue.Bottom.Location);
|
_MyLog.WarnFormat("**** BOTTOM CONTINUE MESSAGE NOT CODED FOR LOCATION {0}*****", docstyle.Continue.Bottom.Location);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
MyPageHelper.BottomContent = null;// RHM20150525 - Table Scrunch
|
|
||||||
if (!PageBreakOnStep)
|
if (!PageBreakOnStep)
|
||||||
{
|
{
|
||||||
float xoffB = 0;
|
float xoffB = 0;
|
||||||
@ -2271,23 +2297,28 @@ namespace Volian.Print.Library
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void OutputOtherPageSteps(PdfContentByte cb, float YTopMost, float yPageStart, float yTopMargin, float yBottomMargin)
|
private float OutputOtherPageSteps(PdfContentByte cb, float YTopMost, float yPageStart, float yTopMargin, float yBottomMargin)
|
||||||
{
|
{
|
||||||
|
float retval = YTopMost;
|
||||||
// Find any items remaining in MyPageHelper.MyParagraphs that should be printed on this page.
|
// Find any items remaining in MyPageHelper.MyParagraphs that should be printed on this page.
|
||||||
vlnParagraphs process = new vlnParagraphs(null);
|
vlnParagraphs process = new vlnParagraphs(null);
|
||||||
foreach (vlnParagraph vPara in MyPageHelper.MyParagraphs.Values)
|
foreach (vlnParagraph vPara in MyPageHelper.MyParagraphs.Values)
|
||||||
{
|
{
|
||||||
|
if (vPara.MyItemInfo.InList(3351)) Console.WriteLine("here");
|
||||||
//if (!vPara.Processed && ((vPara.YOffset + vPara.Height) < YTopMost))
|
//if (!vPara.Processed && ((vPara.YOffset + vPara.Height) < YTopMost))
|
||||||
if (!vPara.Processed && ((vPara.YOffset) < YTopMost))
|
if (!vPara.Processed && ((vPara.YOffset + vPara.Height) < YTopMost))
|
||||||
if (this.MyItemInfo.ItemID != vPara.MyItemInfo.ItemID) // RHM20150507 Table Scrunch
|
if (this.MyItemInfo.ItemID != vPara.MyItemInfo.ItemID) // RHM20150507 Table Scrunch
|
||||||
process.Add(vPara);
|
process.Add(vPara);
|
||||||
else // RHM20150507 Table Scrunch
|
else // RHM20150507 Table Scrunch
|
||||||
_MyLog.WarnFormat("Step Could Have Fit {0}, {1}",MyItemInfo.ItemID,MyItemInfo.ShortPath);
|
_MyLog.WarnFormat("Step Could Have Fit {0}, {1}", MyItemInfo.ItemID, MyItemInfo.ShortPath);
|
||||||
|
else if (!vPara.Processed && ((vPara.YOffset) < YTopMost))
|
||||||
|
retval = Math.Min(retval, vPara.YOffset);
|
||||||
}
|
}
|
||||||
foreach (vlnParagraph vPara in process)
|
foreach (vlnParagraph vPara in process)
|
||||||
{
|
{
|
||||||
vPara.ParagraphToPdf(cb, yPageStart, yTopMargin, yBottomMargin);
|
vPara.ParagraphToPdf(cb, yPageStart, yTopMargin, yBottomMargin);
|
||||||
}
|
}
|
||||||
|
return retval;
|
||||||
}
|
}
|
||||||
private float _YVeryTop = -1;
|
private float _YVeryTop = -1;
|
||||||
public float YVeryTop
|
public float YVeryTop
|
||||||
@ -4060,20 +4091,20 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
stText = " ";
|
stText = " ";
|
||||||
// turn underline off
|
// turn underline off
|
||||||
myFont = new System.Drawing.Font(myFont.FontFamily, myFont.Size, FontStyle.Regular); //myFont.Style. | FontStyle.Underline);
|
myFont = new System.Drawing.Font(myFont.FontFamily, myFont.Size, System.Drawing.FontStyle.Regular); //myFont.Style. | FontStyle.Underline);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
stText = vlntxt.StartText;
|
stText = vlntxt.StartText;
|
||||||
|
|
||||||
if (itemInfo.IsHigh && itemInfo.MyDocStyle.UndSpecialStepsFoldout)
|
if (itemInfo.IsHigh && itemInfo.MyDocStyle.UndSpecialStepsFoldout)
|
||||||
{
|
{
|
||||||
myFont = new System.Drawing.Font(myFont.FontFamily, myFont.Size, myFont.Style | FontStyle.Underline);
|
myFont = new System.Drawing.Font(myFont.FontFamily, myFont.Size, myFont.Style | System.Drawing.FontStyle.Underline);
|
||||||
stText = stText.Replace(@"\ulnone ", "");
|
stText = stText.Replace(@"\ulnone ", "");
|
||||||
stText = stText.Replace(@"\ulnone", "");
|
stText = stText.Replace(@"\ulnone", "");
|
||||||
}
|
}
|
||||||
if (stText.Contains("{IND}")) stText = stText.Replace("{IND}", "\x5");
|
if (stText.Contains("{IND}")) stText = stText.Replace("{IND}", "\x5");
|
||||||
if (itemInfo.IsSection && itemInfo.ActiveFormat.PlantFormat.FormatData.SectData.SectionNumber.Level0Big && itemInfo.MyParent.IsProcedure)
|
if (itemInfo.IsSection && itemInfo.ActiveFormat.PlantFormat.FormatData.SectData.SectionNumber.Level0Big && itemInfo.MyParent.IsProcedure)
|
||||||
myFont = new System.Drawing.Font(myFont.FontFamily, 14, myFont.Style | FontStyle.Bold);
|
myFont = new System.Drawing.Font(myFont.FontFamily, 14, myFont.Style | System.Drawing.FontStyle.Bold);
|
||||||
_RtfSB.Append(AddFontTable(myFont));
|
_RtfSB.Append(AddFontTable(myFont));
|
||||||
_RtfSB.Append(stText);
|
_RtfSB.Append(stText);
|
||||||
if (_MyItemInfo.IsStep && !itemInfo.FormatStepData.UseSmartTemplate && _MyItemInfo.FormatStepData.Suffix != null && _MyItemInfo.FormatStepData.Suffix != "")
|
if (_MyItemInfo.IsStep && !itemInfo.FormatStepData.UseSmartTemplate && _MyItemInfo.FormatStepData.Suffix != null && _MyItemInfo.FormatStepData.Suffix != "")
|
||||||
|
@ -74,6 +74,7 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, Width, 100, "", yBottomMargin);
|
Rtf2Pdf.TextAt(cb, IParagraph, XOffset, yLocation, Width, 100, "", yBottomMargin);
|
||||||
|
MyPageHelper.BottomContent = yLocation-SixLinesPerInch;
|
||||||
return yPageStart;
|
return yPageStart;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user