Compare commits

...

4 Commits

6 changed files with 26 additions and 6 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -345,6 +345,12 @@ namespace Volian.Print.Library
// will skip certain logic if CAS Only or CTS Only
public PromsPrinterPrintType PromsPrinterPrintType { get; set; } = PromsPrinterPrintType.Normal;
//B2025-054 Wrong Page Numbers in CAS Summary
// when section title continued and CAS
// Flag for when should build the CAS_CTAS
//to avoid overwriting data
public bool ShouldPrint_CAS_CTAS { get; set; } = true;
public PromsPrinter(ItemInfo myItem, string rev, string watermark, bool debugOutput, bool origPgBrk, string backgroundFolder, bool openPDF, bool overWrite,
ChangeBarDefinition cbd, String pdfFile, bool insertBlankPages, bool batchPrint, string prefix, bool saveLinks, int removeTrailngHardReturnsAndManualPageBreaks, string blankPageText, bool didAll, MergedPdf mergedPdf, string watermarkColor, int PrtSectID = -1)
{

View File

@@ -2162,12 +2162,12 @@ namespace Volian.Print.Library
//B2025-048 Problem with Printing CAS Steps
// skip this if printing CAS or CTAS - was causing it to
// skip/overwrite data
if (doSectionTitleContinued && MyPromsPrinter.PromsPrinterPrintType == PromsPrinterPrintType.Normal)
if (doSectionTitleContinued)
{
vlnParagraph sectContPara;
string contMsg = (MyItemInfo.ActiveSection != null) ? MyItemInfo.ActiveSection.MyDocStyle.Continue.SectionTitle.AppendToTitle : ""; // C2018-003 fixed use of getting the active section
// For Calvert, the xoffset will be the highest level sections xoffset (there are metasections,
// don't use their xoffset or the continue message is indented too much)
// For Calvert, the xoffset will be the highest level sections xoffset (there are metasections,
// don't use their xoffset or the continue message is indented too much)
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert)
{
float secContinueTabXoff = (float)MyItemInfo.MyDocStyle.Layout.LeftMargin;
@@ -2187,6 +2187,12 @@ namespace Volian.Print.Library
// get to the correct section for the message, i.e. if on a section, the message should be the parent
// section (not the activesection which is myself); if on a step, the message should be the active section
ItemInfo sectForCont = MyItemInfo.IsSection && MyItemInfo.MyParent.IsSection ? MyItemInfo.MyParent : MyItemInfo.ActiveSection;
//B2025-054 Wrong Page Numbers in CAS Summary
// when section title continued and CAS
//to avoid overwriting data
// - this will be built at a different call to vlnParagraph
if (MyPromsPrinter.PromsPrinterPrintType != PromsPrinterPrintType.Normal)
MyPromsPrinter.ShouldPrint_CAS_CTAS = false;
sectContPara = new vlnParagraph(MyParent.MyParent, cb, sectForCont, MyParent.XOffset, 0, 0, 0, MyParent.MyItemInfo.ActiveFormat, null, (contMsg == null || contMsg == "") ? " (Continued)" : contMsg, 0, false, MyPromsPrinter);
if (sectContPara.PartsLeft.Count > 0)
{
@@ -2197,7 +2203,7 @@ namespace Volian.Print.Library
vt.XOffset = secContinueTabXoff;
vt.Width = secContinueXoff - secContinueTabXoff;
sectContPara.XOffset = secContinueXoff;
if ((wd + 12) > secContinueXoff - secContinueTabXoff) // 12 is 2 characters
if ((wd + 12) > secContinueXoff - secContinueTabXoff) // 12 is 2 characters
{
float dif = wd + 12 - (secContinueXoff - secContinueTabXoff);
vt.Width += dif;
@@ -2212,12 +2218,20 @@ namespace Volian.Print.Library
}
else
{
//B2025-054 Wrong Step Numbers
// when section title continued and CAS
//to avoid overwriting data
// - this will be built at a different call to vlnParagraph
if (MyPromsPrinter.PromsPrinterPrintType != PromsPrinterPrintType.Normal)
MyPromsPrinter.ShouldPrint_CAS_CTAS = false;
sectContPara = new vlnParagraph(MyParent.MyParent, cb, MyItemInfo.ActiveSection, MyParent.XOffset, 0, 0, 0, MyParent.MyItemInfo.ActiveFormat, null, (contMsg == null || contMsg == "") ? " (Continued)" : contMsg, 0, false, MyPromsPrinter);
float mytmpfloat = sectContPara.ParagraphToPdf(cb, yTopMargin, yTopMargin, yBottomMargin);
if (sectContPara.SectionContinuePrinted)
yPageStart -= sectContPara.Height + SixLinesPerInch;
}
}
//out of section title section - reset this back to true (default)
MyPromsPrinter.ShouldPrint_CAS_CTAS = true;
// see if this hls has footnotes, add to the footnote datastructure for processing at end of page.
if (MyItemInfo.IsHigh && MyPageHelper.NotesToFootNotesHLS.ContainsKey(MyItemInfo.ItemID)) AddFootNote(cb);
@@ -3596,11 +3610,11 @@ namespace Volian.Print.Library
BuildPlacekeeper(parent, itemInfo);
// Save step text information to be used to create a Continuous Action Summary
BuildContinuousActionSummary(parent, itemInfo);
if (MyPromsPrinter.ShouldPrint_CAS_CTAS) BuildContinuousActionSummary(parent, itemInfo);
// F2022-024 Time Critical Step
// Save step text information to be used to create a Time Critical Action Summary
BuildTimeCriticalActionSummary(parent, itemInfo);
if (MyPromsPrinter.ShouldPrint_CAS_CTAS) BuildTimeCriticalActionSummary(parent, itemInfo);
if (itemInfo.ActiveFormat.MyStepSectionLayoutData.BoxLeftAdj != null)
_MyBoxLeftAdj = float.Parse(itemInfo.ActiveFormat.MyStepSectionLayoutData.BoxLeftAdj);