C2024-002-Print-Section
This commit is contained in:
parent
d6cb841d46
commit
9a546064cf
@ -775,7 +775,7 @@ namespace VEPROMS
|
||||
// B2021-102 put in the using for better memory management
|
||||
using (frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked, cbxOrPgBrk.Checked,
|
||||
cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, myPDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom - 50),
|
||||
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd, watermarkColor))//;//C2018-009 print PROMS version
|
||||
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd, watermarkColor, PntSectID))//;//C2018-009 print PROMS version
|
||||
{
|
||||
frmStatus.CloseWhenDone = true;
|
||||
Application.DoEvents();
|
||||
@ -856,7 +856,7 @@ namespace VEPROMS
|
||||
// B2016-249 Output Procedure to folder associated with Parent Child
|
||||
using (frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked,
|
||||
cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, GetMultiunitPDFPath(), cbd, txbPDFName.Text,
|
||||
new Point(Left, Bottom - 50), swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd, watermarkColor)) // ;//C2018-009 print PROMS version
|
||||
new Point(Left, Bottom - 50), swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd, watermarkColor, PntSectID)) // ;//C2018-009 print PROMS version
|
||||
{
|
||||
frmStatus.PntSectID = PntSectID;
|
||||
frmStatus.CloseWhenDone = true;
|
||||
@ -1009,7 +1009,7 @@ namespace VEPROMS
|
||||
// B2018-124 use text of watermark form drop down list instead of enum value
|
||||
using (frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked, cbxOrPgBrk.Checked,
|
||||
cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, GetMultiunitPDFPath(), cbd, txbPDFName.Text, new Point(Left, Bottom - 50),
|
||||
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, false, tbBlankPage.Text, _MergedPfd, watermarkColor))//; //C2018-009 print PROMS version
|
||||
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, false, tbBlankPage.Text, _MergedPfd, watermarkColor, PntSectID))//; //C2018-009 print PROMS version
|
||||
{
|
||||
frmStatus.MakePlaceKeeper = swtbtnGeneratePlacekeeper.Value;
|
||||
frmStatus.MakeContinuousActionSummary = cbxGenerateConActSum.Checked;
|
||||
|
@ -97,7 +97,7 @@ namespace VEPROMS
|
||||
get { return _pntSectID; }
|
||||
set { _pntSectID = value; }
|
||||
}
|
||||
public frmPDFStatusForm(ItemInfo myItem, string rev, string watermark, bool debugOutput, bool origPgBrk, bool openPDF, bool overWrite, string pdfPath, ChangeBarDefinition cbd, string pdfFile, Point newLocation, bool insertBlankPages, bool allOrAuto, string prefix, bool saveLinks, int removeTrailingHardReturnsAndManualPageBreaks, bool showPROMSVer, bool didAll, string blankPageText, MergedPdf mergedPdf, string watermarkColor)
|
||||
public frmPDFStatusForm(ItemInfo myItem, string rev, string watermark, bool debugOutput, bool origPgBrk, bool openPDF, bool overWrite, string pdfPath, ChangeBarDefinition cbd, string pdfFile, Point newLocation, bool insertBlankPages, bool allOrAuto, string prefix, bool saveLinks, int removeTrailingHardReturnsAndManualPageBreaks, bool showPROMSVer, bool didAll, string blankPageText, MergedPdf mergedPdf, string watermarkColor, int PntSectID = -1)
|
||||
{
|
||||
// B2021-088 moved this if/else from CreatePDF() so that the Approval logic will have access to this logic
|
||||
ProcedureInfo MyProcedure = myItem as ProcedureInfo;
|
||||
@ -282,7 +282,7 @@ namespace VEPROMS
|
||||
cachePartInfo = PartInfo.CacheList;
|
||||
}
|
||||
|
||||
_PdfFile = MyPromsPrinter.Print(PDFPath, MakePlaceKeeper, MakeContinuousActionSummary, MakeTimeCriticalActionSummary);
|
||||
_PdfFile = MyPromsPrinter.Print(PDFPath, MakePlaceKeeper, MakeContinuousActionSummary, MakeTimeCriticalActionSummary, PntSectID);
|
||||
|
||||
ProfileTimer.Pop(profileDepth);
|
||||
|
||||
|
@ -1210,7 +1210,7 @@ namespace VEPROMS
|
||||
prnDlg.SelectedSlave = args.UnitIndex;
|
||||
prnDlg.MySessionInfo = MySessionInfo;
|
||||
prnDlg.SetupForProcedure(); // Setup filename
|
||||
prnDlg.QPCreatePDF(); // Create Print report
|
||||
prnDlg.ShowDialog(this); // Create Print report
|
||||
|
||||
si2.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user