diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs index 180bdeea..bb54f062 100644 --- a/PROMS/Volian.Print.Library/PromsPrinter.cs +++ b/PROMS/Volian.Print.Library/PromsPrinter.cs @@ -1770,6 +1770,7 @@ namespace Volian.Print.Library { System.Drawing.Drawing2D.Matrix myMatrix = new System.Drawing.Drawing2D.Matrix(0, 1, -1, 0, cb.PdfDocument.PageSize.Height, 0); cb.Transform(myMatrix); + _MyHelper.IsWatermarkLandscape = true; // B2019-145: watermark on landscape page } } else @@ -1864,6 +1865,7 @@ namespace Volian.Print.Library OnStatusChanged("StepSection converted to PDF " + section.ShortPath, PromsPrinterStatusType.BuildStep); //pt.Description = "End"; ProfileTimer.Pop(profileDepth); + _MyHelper.IsWatermarkLandscape = false; } private void GenerateSuppInfoPdf(vlnParagraph vlnParagraph, float yTopMargin, float yBottomMargin) diff --git a/PROMS/Volian.Svg.Library/iTextSharp.cs b/PROMS/Volian.Svg.Library/iTextSharp.cs index 32d9a40a..8b1d204c 100644 --- a/PROMS/Volian.Svg.Library/iTextSharp.cs +++ b/PROMS/Volian.Svg.Library/iTextSharp.cs @@ -896,6 +896,14 @@ namespace Volian.Svg.Library get { return _IsLandscape; } set { _IsLandscape = value; } } + // B2019-145: added the following property so that the code would know that an adjustment should be made to print the watermark + // in landscape mode. Note that 'IsLandscape' could not be used because it also does the pagelist items. + private bool _IsWatermarkLandscape; + public bool IsWatermarkLandscape + { + get { return _IsWatermarkLandscape; } + set { _IsWatermarkLandscape = value; } + } // B2018-124 we no longer need is list was not hanling "Information Only" water mark //private List _AllowedWatermarks = new List(); //public List AllowedWatermarks @@ -1112,7 +1120,7 @@ namespace Volian.Svg.Library //if (!AllowAllWatermarks && !AllowedWatermarks.Contains(Watermark)) return; -- B2018-124 not needed anymore with above if statement - this does not hanle "Information Only" cb.SaveState(); if (_WatermarkLayer != null) cb.BeginLayer(_WatermarkLayer); - if (IsLandscape) + if (IsLandscape || IsWatermarkLandscape) // B2019-145: Added for printing landscape watermark on step section pages. { // The watermark needs to be rotated back for landscape pagelist - B2016-191 //double a = -33 * (Math.PI / 180);