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.
This commit is contained in:
Rich 2017-06-23 19:19:42 +00:00
parent a882e4f33d
commit 4686415f98
2 changed files with 16 additions and 4 deletions

View File

@ -234,7 +234,8 @@ namespace Volian.Print.Library
+ "\r\nIt shows the page numbers of the locations that are referenced by transitions." + "\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\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\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); "Inconsistent Transition Page Numbers", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
} }
return DialogResult.No; return DialogResult.No;
@ -266,12 +267,20 @@ namespace Volian.Print.Library
_RemoveTrailingHardReturnsAndManualPageBreaks = removeTrailngHardReturnsAndManualPageBreaks; _RemoveTrailingHardReturnsAndManualPageBreaks = removeTrailngHardReturnsAndManualPageBreaks;
//_MyReaderHelper.LoadTree(myItem); //_MyReaderHelper.LoadTree(myItem);
} }
// Pass 1 PDF Name
private string _BeforePageNumberPdf = null; private string _BeforePageNumberPdf = null;
public string BeforePageNumberPdf public string BeforePageNumberPdf
{ {
get { return _BeforePageNumberPdf; } get { return _BeforePageNumberPdf; }
set { _BeforePageNumberPdf = value; } 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) public string Print(string pdfFolder, bool makePlacekeeper, bool makeContinuousActionSummary)
{ {
if (_MyItem is ProcedureInfo) if (_MyItem is ProcedureInfo)
@ -302,6 +311,7 @@ namespace Volian.Print.Library
string retstr = Print(_MyItem as ProcedureInfo, pdfFolder + @"\PageNumberPass1", false, false); string retstr = Print(_MyItem as ProcedureInfo, pdfFolder + @"\PageNumberPass1", false, false);
if (retstr == null) return null; if (retstr == null) return null;
BeforePageNumberPdf = retstr; BeforePageNumberPdf = retstr;
BeforePageNumber2Pdf = null; // C2017-018 Initialize Pass 2 PDF Name
ProcedureInfo.RefreshPageNumTransitions(_MyItem as ProcedureInfo); ProcedureInfo.RefreshPageNumTransitions(_MyItem as ProcedureInfo);
_MyReaderHelper = new ReaderHelper(this); _MyReaderHelper = new ReaderHelper(this);
retstr = Print(_MyItem as ProcedureInfo, pdfFolder, makePlacekeeper, makeContinuousActionSummary); retstr = Print(_MyItem as ProcedureInfo, pdfFolder, makePlacekeeper, makeContinuousActionSummary);
@ -312,7 +322,8 @@ namespace Volian.Print.Library
DirectoryInfo di1 = new DirectoryInfo(pdfFolder + @"\PageNumberPass2"); DirectoryInfo di1 = new DirectoryInfo(pdfFolder + @"\PageNumberPass2");
if (!di1.Exists) di1.Create(); if (!di1.Exists) di1.Create();
FileInfo fi = new FileInfo(retstr); 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(); if (fidest.Exists) fidest.Delete();
try try
{ {

View File

@ -487,7 +487,8 @@ namespace Volian.Print.Library
else if (MyItemInfo.PageNumberUsed != 0 && MyItemInfo.PageNumberUsed != pagenumTran) else if (MyItemInfo.PageNumberUsed != 0 && MyItemInfo.PageNumberUsed != pagenumTran)
{ {
if (PromsPrinter.TransPageNumProblems == null) PromsPrinter.TransPageNumProblems = new List<string>(); if (PromsPrinter.TransPageNumProblems == null) PromsPrinter.TransPageNumProblems = new List<string>();
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); PromsPrinter.TransPageNumProblems.Add(pnErr);
} }
MyItemInfo.PageNumberNextPass = pagenumTran; MyItemInfo.PageNumberNextPass = pagenumTran;