From 4686415f987df578661336737e1a8a62f332c50c Mon Sep 17 00:00:00 2001 From: Rich Date: Fri, 23 Jun 2017 19:19:42 +0000 Subject: [PATCH] C2017-018 Output column headings for inconcistent Page Number transitions, Open Pass 2 Page Number PDF File if the user chooses to create a Pass 2 PDF. C2017-018 Output column headings for inconcistent Page Number transitions. --- PROMS/Volian.Print.Library/PromsPrinter.cs | 17 ++++++++++++++--- PROMS/Volian.Print.Library/vlnParagraph.cs | 3 ++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs index 12fce136..443c9f41 100644 --- a/PROMS/Volian.Print.Library/PromsPrinter.cs +++ b/PROMS/Volian.Print.Library/PromsPrinter.cs @@ -234,7 +234,8 @@ namespace Volian.Print.Library + "\r\nIt shows the page numbers of the locations that are referenced by transitions." + "\r\nThis list, along with the PDF, can help you to determine the cause of the inconsistent page numbers." + "\r\n\r\nDo you want to also review the PDF output prior to the second pass printing?" - + "\r\n\r\n------------------------------\r\n" + pnProbl, + // C2017-018 Output Column Headers for Inconsistent Page Transitions + + "\r\n\r\nItemID\tTransition Destination\tPage Pass 1\t Page Pass 2\r\n\r\n" + pnProbl, "Inconsistent Transition Page Numbers", MessageBoxButtons.YesNo, MessageBoxIcon.Question); } return DialogResult.No; @@ -266,12 +267,20 @@ namespace Volian.Print.Library _RemoveTrailingHardReturnsAndManualPageBreaks = removeTrailngHardReturnsAndManualPageBreaks; //_MyReaderHelper.LoadTree(myItem); } + // Pass 1 PDF Name private string _BeforePageNumberPdf = null; public string BeforePageNumberPdf { get { return _BeforePageNumberPdf; } set { _BeforePageNumberPdf = value; } } + // Pass 2 PDF Name + private string _BeforePageNumber2Pdf = null; + public string BeforePageNumber2Pdf + { + get { return _BeforePageNumber2Pdf; } + set { _BeforePageNumber2Pdf = value; } + } public string Print(string pdfFolder, bool makePlacekeeper, bool makeContinuousActionSummary) { if (_MyItem is ProcedureInfo) @@ -302,7 +311,8 @@ namespace Volian.Print.Library string retstr = Print(_MyItem as ProcedureInfo, pdfFolder + @"\PageNumberPass1", false, false); if (retstr == null) return null; BeforePageNumberPdf = retstr; - ProcedureInfo.RefreshPageNumTransitions(_MyItem as ProcedureInfo); + BeforePageNumber2Pdf = null; // C2017-018 Initialize Pass 2 PDF Name + ProcedureInfo.RefreshPageNumTransitions(_MyItem as ProcedureInfo); _MyReaderHelper = new ReaderHelper(this); retstr = Print(_MyItem as ProcedureInfo, pdfFolder, makePlacekeeper, makeContinuousActionSummary); if (TransPageNumProblems.Count > 0) @@ -312,7 +322,8 @@ namespace Volian.Print.Library DirectoryInfo di1 = new DirectoryInfo(pdfFolder + @"\PageNumberPass2"); if (!di1.Exists) di1.Create(); FileInfo fi = new FileInfo(retstr); - FileInfo fidest = new FileInfo(di1.FullName + @"\" + fi.Name); + // Save Pass 2 PDF Name + FileInfo fidest = new FileInfo(BeforePageNumber2Pdf = di1.FullName + @"\" + fi.Name); if (fidest.Exists) fidest.Delete(); try { diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 221ef77e..c301d4de 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -487,7 +487,8 @@ namespace Volian.Print.Library else if (MyItemInfo.PageNumberUsed != 0 && MyItemInfo.PageNumberUsed != pagenumTran) { if (PromsPrinter.TransPageNumProblems == null) PromsPrinter.TransPageNumProblems = new List(); - string pnErr = string.Format("{0} {1} {2} {3}", MyItemInfo.ItemID, MyItemInfo.ShortPath, MyItemInfo.PageNumberUsed, pagenumTran); + // C2017-018 Insert tabs between columns + string pnErr = string.Format("{0}\t{1}\t{2}\t{3}", MyItemInfo.ItemID, MyItemInfo.ShortPath, MyItemInfo.PageNumberUsed, pagenumTran); PromsPrinter.TransPageNumProblems.Add(pnErr); } MyItemInfo.PageNumberNextPass = pagenumTran;