C2024-002-Print-Section
This commit is contained in:
@@ -323,7 +323,7 @@ namespace Volian.Print.Library
|
||||
set { _MergedPdf = value; }
|
||||
}
|
||||
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)
|
||||
ChangeBarDefinition cbd, String pdfFile, bool insertBlankPages, bool batchPrint, string prefix, bool saveLinks, int removeTrailngHardReturnsAndManualPageBreaks, string blankPageText, bool didAll, MergedPdf mergedPdf, string watermarkColor, int PntSectID = -1)
|
||||
{
|
||||
Prefix = prefix; // RHM20150506 Multiline ItemID TextBox
|
||||
_MyItem = myItem;
|
||||
@@ -348,6 +348,7 @@ namespace Volian.Print.Library
|
||||
_DidAll = didAll;
|
||||
_MergeNotIncluded = false;
|
||||
_MergedPdf = mergedPdf;
|
||||
_pntSectID = PntSectID;
|
||||
//_MyReaderHelper.LoadTree(myItem);
|
||||
}
|
||||
// Pass 1 PDF Name
|
||||
@@ -367,7 +368,7 @@ namespace Volian.Print.Library
|
||||
// B2019-152: MergedLandscapePages is a dictionary whose key is the pdf file name & values are all of the page numbers
|
||||
// in that pdf that should have landscaped page numbers. These are added when the page is finished (onEndPage)
|
||||
public static Dictionary<string, List<int>> MergedLandscapePages = null;
|
||||
public string Print(string pdfFolder, bool makePlacekeeper, bool makeContinuousActionSummary, bool makeTimeCriticalActionSummary)
|
||||
public string Print(string pdfFolder, bool makePlacekeeper, bool makeContinuousActionSummary, bool makeTimeCriticalActionSummary, int PntSectID = -1)
|
||||
{
|
||||
if (_MyItem is ProcedureInfo)
|
||||
{
|
||||
@@ -805,20 +806,23 @@ namespace Volian.Print.Library
|
||||
int cnt = 0;
|
||||
foreach (SectionInfo mySection in myProcedure.Sections)
|
||||
{
|
||||
if (!mySection.MyDocStyle.IsStepSection && !mySection.IsAutoTOCSection)
|
||||
if (PntSectID == -1 || (PntSectID > -1 && mySection.ItemID == PntSectID))
|
||||
{
|
||||
VEPROMS.CSLA.Library.Document.ConvertWordSectionToDOCX((ItemInfo)mySection); // B2023-093 Convert a Word section to the DOCX Word format if needed before printing
|
||||
}
|
||||
//C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
|
||||
if ((myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts && (mySection.MyConfig as SectionConfig).Section_IsFoldout == "Y")
|
||||
|| (myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && (mySection.MyConfig as SectionConfig).Section_IsFoldout == "Y"))
|
||||
{
|
||||
// if floating foldouts, need a list of sections & foldoutreaders. Just do first for now.
|
||||
if (!mySection.MyDocStyle.IsStepSection && !mySection.IsAutoTOCSection)
|
||||
{
|
||||
VEPROMS.CSLA.Library.Document.ConvertWordSectionToDOCX((ItemInfo)mySection); // B2023-093 Convert a Word section to the DOCX Word format if needed before printing
|
||||
}
|
||||
//C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
|
||||
if ((myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts && (mySection.MyConfig as SectionConfig).Section_IsFoldout == "Y")
|
||||
|| (myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && (mySection.MyConfig as SectionConfig).Section_IsFoldout == "Y"))
|
||||
{
|
||||
// if floating foldouts, need a list of sections & foldoutreaders. Just do first for now.
|
||||
|
||||
_MyFoldoutSection.Add(mySection);
|
||||
string foldoutPdf = PrintProcedureOrFoldout(myProcedure, mySection, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\Foldout" + cnt.ToString() + @".pdf", false, false, false);
|
||||
_MyFoldoutReader.Add(foldoutPdf != null ? new PdfReader(foldoutPdf) : null);
|
||||
cnt++;
|
||||
_MyFoldoutSection.Add(mySection);
|
||||
string foldoutPdf = PrintProcedureOrFoldout(myProcedure, mySection, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\Foldout" + cnt.ToString() + @".pdf", false, false, false);
|
||||
_MyFoldoutReader.Add(foldoutPdf != null ? new PdfReader(foldoutPdf) : null);
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2980,7 +2984,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user