C2022-004 Print Unit Designator Watermark on Approved PDF
This commit is contained in:
parent
5ea862fb5d
commit
4e2b669199
@ -1221,12 +1221,20 @@ namespace VEPROMS
|
||||
//make pdf with promsprinter and get byte stream
|
||||
// Moved to end so that Item and Content are saved at the same time
|
||||
//UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, myDTS);
|
||||
string watermarkColor = "Blue"; // this is the default watermark color
|
||||
string waterMark = Stage.GetJustStage(RevStage).IsApproved > 0 ? null : Stage.GetJustStage(RevStage).Name;
|
||||
// C2022-004 - BNPP if doing an approval stage, and the format file uses the UseUnitWatermarkOnApproved format flag (<PrintData UseUnitWatermarkOnApproved = "true"\>)
|
||||
// then use the Unit Designator watermark
|
||||
if (waterMark == null && MyProcedures[0].ProcInfo.ActiveFormat.PlantFormat.FormatData.PrintData.UseUnitWatermarkOnApproved)
|
||||
{
|
||||
waterMark = "Unit Designator";
|
||||
frmPDFStatusForm.SetUnitWatermark(MyProcedures[0].ProcInfo, ref waterMark, ref watermarkColor);
|
||||
}
|
||||
//ProcedureInfo myproc = pi;
|
||||
//frmPDFStatusForm frm = new frmPDFStatusForm(myproc, ap.RevNumber, /* revdate change: ap.RevDate.ToString("MM/dd/yyyy") ,*/ waterMark, false, false, ViewPDF, true, VlnSettings.TemporaryFolder, new ChangeBarDefinition(pi.MyDocVersion.MyConfig as DocVersionConfig, pi.ActiveFormat), pdfTmp, location);
|
||||
//myproc.ChangeBarDate = myDTS;
|
||||
frmPDFStatusForm frm = new frmPDFStatusForm(pi, ap.RevNumAndDate, /* revdate change: ap.RevDate.ToString("MM/dd/yyyy") ,*/ waterMark, false, false, ViewPDF, true, VlnSettings.TemporaryFolder, new ChangeBarDefinition(pi.MyDocVersion.MyConfig as DocVersionConfig, pi.ActiveFormat), pdfTmp, location, pi.MyDocVersion.DocVersionConfig.Print_AddBlankPagesWhenUsingDuplexFoldouts, true, "", false, 0, false,
|
||||
MyProcedures.Count > (MyProcedures[0].ProcInfo.MyDocVersion.Procedures.Count / 4), pi.MyDocVersion.DocVersionConfig.Print_DuplexBlankPageText, null); // C2019-004: Allow user to define duplex lank page text at the docversion level
|
||||
MyProcedures.Count > (MyProcedures[0].ProcInfo.MyDocVersion.Procedures.Count / 4), pi.MyDocVersion.DocVersionConfig.Print_DuplexBlankPageText, null, watermarkColor); // C2019-004: Allow user to define duplex lank page text at the docversion level
|
||||
frm.AllowAllWatermarks = true;
|
||||
frm.CloseWhenDone = !ViewPDF;
|
||||
frm.DocReplace = new Dictionary<int, byte[]>(); // will hold the Word Attachments with resolved ROs
|
||||
|
Loading…
x
Reference in New Issue
Block a user