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
|
// B2021-102 put in the using for better memory management
|
||||||
using (frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked, cbxOrPgBrk.Checked,
|
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),
|
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;
|
frmStatus.CloseWhenDone = true;
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
@ -856,7 +856,7 @@ namespace VEPROMS
|
|||||||
// B2016-249 Output Procedure to folder associated with Parent Child
|
// B2016-249 Output Procedure to folder associated with Parent Child
|
||||||
using (frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked,
|
using (frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked,
|
||||||
cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, GetMultiunitPDFPath(), cbd, txbPDFName.Text,
|
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.PntSectID = PntSectID;
|
||||||
frmStatus.CloseWhenDone = true;
|
frmStatus.CloseWhenDone = true;
|
||||||
@ -1009,7 +1009,7 @@ namespace VEPROMS
|
|||||||
// B2018-124 use text of watermark form drop down list instead of enum value
|
// 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,
|
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),
|
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.MakePlaceKeeper = swtbtnGeneratePlacekeeper.Value;
|
||||||
frmStatus.MakeContinuousActionSummary = cbxGenerateConActSum.Checked;
|
frmStatus.MakeContinuousActionSummary = cbxGenerateConActSum.Checked;
|
||||||
|
@ -97,7 +97,7 @@ namespace VEPROMS
|
|||||||
get { return _pntSectID; }
|
get { return _pntSectID; }
|
||||||
set { _pntSectID = value; }
|
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
|
// B2021-088 moved this if/else from CreatePDF() so that the Approval logic will have access to this logic
|
||||||
ProcedureInfo MyProcedure = myItem as ProcedureInfo;
|
ProcedureInfo MyProcedure = myItem as ProcedureInfo;
|
||||||
@ -282,7 +282,7 @@ namespace VEPROMS
|
|||||||
cachePartInfo = PartInfo.CacheList;
|
cachePartInfo = PartInfo.CacheList;
|
||||||
}
|
}
|
||||||
|
|
||||||
_PdfFile = MyPromsPrinter.Print(PDFPath, MakePlaceKeeper, MakeContinuousActionSummary, MakeTimeCriticalActionSummary);
|
_PdfFile = MyPromsPrinter.Print(PDFPath, MakePlaceKeeper, MakeContinuousActionSummary, MakeTimeCriticalActionSummary, PntSectID);
|
||||||
|
|
||||||
ProfileTimer.Pop(profileDepth);
|
ProfileTimer.Pop(profileDepth);
|
||||||
|
|
||||||
|
@ -1210,7 +1210,7 @@ namespace VEPROMS
|
|||||||
prnDlg.SelectedSlave = args.UnitIndex;
|
prnDlg.SelectedSlave = args.UnitIndex;
|
||||||
prnDlg.MySessionInfo = MySessionInfo;
|
prnDlg.MySessionInfo = MySessionInfo;
|
||||||
prnDlg.SetupForProcedure(); // Setup filename
|
prnDlg.SetupForProcedure(); // Setup filename
|
||||||
prnDlg.QPCreatePDF(); // Create Print report
|
prnDlg.ShowDialog(this); // Create Print report
|
||||||
|
|
||||||
si2.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
si2.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||||
}
|
}
|
||||||
|
@ -323,7 +323,7 @@ namespace Volian.Print.Library
|
|||||||
set { _MergedPdf = value; }
|
set { _MergedPdf = value; }
|
||||||
}
|
}
|
||||||
public PromsPrinter(ItemInfo myItem, string rev, string watermark, bool debugOutput, bool origPgBrk, string backgroundFolder, bool openPDF, bool overWrite,
|
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
|
Prefix = prefix; // RHM20150506 Multiline ItemID TextBox
|
||||||
_MyItem = myItem;
|
_MyItem = myItem;
|
||||||
@ -348,6 +348,7 @@ namespace Volian.Print.Library
|
|||||||
_DidAll = didAll;
|
_DidAll = didAll;
|
||||||
_MergeNotIncluded = false;
|
_MergeNotIncluded = false;
|
||||||
_MergedPdf = mergedPdf;
|
_MergedPdf = mergedPdf;
|
||||||
|
_pntSectID = PntSectID;
|
||||||
//_MyReaderHelper.LoadTree(myItem);
|
//_MyReaderHelper.LoadTree(myItem);
|
||||||
}
|
}
|
||||||
// Pass 1 PDF Name
|
// 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
|
// 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)
|
// 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 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)
|
if (_MyItem is ProcedureInfo)
|
||||||
{
|
{
|
||||||
@ -805,20 +806,23 @@ namespace Volian.Print.Library
|
|||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
foreach (SectionInfo mySection in myProcedure.Sections)
|
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
|
if (!mySection.MyDocStyle.IsStepSection && !mySection.IsAutoTOCSection)
|
||||||
}
|
{
|
||||||
//C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
|
VEPROMS.CSLA.Library.Document.ConvertWordSectionToDOCX((ItemInfo)mySection); // B2023-093 Convert a Word section to the DOCX Word format if needed before printing
|
||||||
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"))
|
//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")
|
||||||
// if floating foldouts, need a list of sections & foldoutreaders. Just do first for now.
|
|| (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);
|
_MyFoldoutSection.Add(mySection);
|
||||||
string foldoutPdf = PrintProcedureOrFoldout(myProcedure, mySection, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\Foldout" + cnt.ToString() + @".pdf", false, false, false);
|
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);
|
_MyFoldoutReader.Add(foldoutPdf != null ? new PdfReader(foldoutPdf) : null);
|
||||||
cnt++;
|
cnt++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2980,7 +2984,7 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user