B2017-186 - Print SAMGs with Facing Pages and Page Number Transitions
This commit is contained in:
parent
5e80643686
commit
27ef564484
@ -284,35 +284,52 @@ namespace Volian.Print.Library
|
|||||||
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)
|
||||||
{
|
{ // B2017-186 First do Procedures that don't have page number transitions
|
||||||
if ((_MyItem as ProcedureInfo).ProcHasSupInfoData)
|
if (!(_MyItem.ActiveFormat.PlantFormat.FormatData.TransData.UseTransitionModifier ||
|
||||||
{
|
|
||||||
// Use two passes to print facing page supplemental information for SAMGs
|
|
||||||
// First pass gets pagination for the step sections and stores the associated supplemental information ids in
|
|
||||||
// the list StepSectPageBreaksForSupInfo off of the section object
|
|
||||||
// Second pass prints the supplemental information pdfs using the list generated in the first pass to know where to do the
|
|
||||||
// supplemental information page breaks & then merges in those pages when printing the step sections.
|
|
||||||
SupInfoPrintType = E_SupInfoPrintType.DoPageBreaks;
|
|
||||||
string retstr = Print(_MyItem as ProcedureInfo, pdfFolder, false, false);
|
|
||||||
if (retstr == null) return null;
|
|
||||||
SupInfoPrintType = E_SupInfoPrintType.Merge;
|
|
||||||
return Print(_MyItem as ProcedureInfo, pdfFolder, false, false);
|
|
||||||
}
|
|
||||||
else if (!(_MyItem.ActiveFormat.PlantFormat.FormatData.TransData.UseTransitionModifier ||
|
|
||||||
_MyItem.ActiveFormat.PlantFormat.FormatData.TransData.UseSpecificTransitionModifier))
|
_MyItem.ActiveFormat.PlantFormat.FormatData.TransData.UseSpecificTransitionModifier))
|
||||||
return Print(_MyItem as ProcedureInfo, pdfFolder, makePlacekeeper, makeContinuousActionSummary);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
|
// B2017-186 Do Facing Page SAMGs
|
||||||
|
if ((_MyItem as ProcedureInfo).ProcHasSupInfoData)
|
||||||
|
{
|
||||||
|
// Use two passes to print facing page supplemental information for SAMGs
|
||||||
|
// First pass gets pagination for the step sections and stores the associated supplemental information ids in
|
||||||
|
// the list StepSectPageBreaksForSupInfo off of the section object
|
||||||
|
// Second pass prints the supplemental information pdfs using the list generated in the first pass to know where to do the
|
||||||
|
// supplemental information page breaks & then merges in those pages when printing the step sections.
|
||||||
|
SupInfoPrintType = E_SupInfoPrintType.DoPageBreaks;
|
||||||
|
string retstr = Print(_MyItem as ProcedureInfo, pdfFolder, false, false);
|
||||||
|
if (retstr == null) return null;
|
||||||
|
SupInfoPrintType = E_SupInfoPrintType.Merge;
|
||||||
|
return Print(_MyItem as ProcedureInfo, pdfFolder, false, false);
|
||||||
|
}
|
||||||
|
else // B2017-186 Neither Facing Pages or Page Number Transitions
|
||||||
|
return Print(_MyItem as ProcedureInfo, pdfFolder, makePlacekeeper, makeContinuousActionSummary);
|
||||||
|
}
|
||||||
|
else // B2017-186 Page Number Transitions
|
||||||
|
{
|
||||||
|
string retstr;
|
||||||
// if the plant uses transition modifiers and/or page num in transition format,
|
// if the plant uses transition modifiers and/or page num in transition format,
|
||||||
// need to do two passes. First pass, sets the pagenumbers for each item,
|
// need to do two passes. First pass, sets the pagenumbers for each item,
|
||||||
// 2nd pass fills in the page numbers in transitions.
|
// 2nd pass fills in the page numbers in transitions.
|
||||||
DirectoryInfo di = new DirectoryInfo(pdfFolder + @"\PageNumberPass1");
|
DirectoryInfo di = new DirectoryInfo(pdfFolder + @"\PageNumberPass1");
|
||||||
if (!di.Exists) di.Create();
|
if (!di.Exists) di.Create();
|
||||||
string retstr = Print(_MyItem as ProcedureInfo, pdfFolder + @"\PageNumberPass1", false, false);
|
if ((_MyItem as ProcedureInfo).ProcHasSupInfoData)// B2017-186 Adds Facing Page Code to Page Number Transition Code
|
||||||
|
{
|
||||||
|
// Use two passes to print facing page supplemental information for SAMGs
|
||||||
|
// First pass gets pagination for the step sections and stores the associated supplemental information ids in
|
||||||
|
// the list StepSectPageBreaksForSupInfo off of the section object
|
||||||
|
// Second pass prints the supplemental information pdfs using the list generated in the first pass to know where to do the
|
||||||
|
// supplemental information page breaks & then merges in those pages when printing the step sections.
|
||||||
|
SupInfoPrintType = E_SupInfoPrintType.DoPageBreaks;
|
||||||
|
retstr = Print(_MyItem as ProcedureInfo, pdfFolder, false, false);
|
||||||
|
if (retstr == null) return null;
|
||||||
|
SupInfoPrintType = E_SupInfoPrintType.Merge;
|
||||||
|
}
|
||||||
|
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
|
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);
|
||||||
if (TransPageNumProblems.Count > 0)
|
if (TransPageNumProblems.Count > 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user