B2019-145: landscape watermark misprint

This commit is contained in:
Kathy Ruffing 2019-10-02 12:36:03 +00:00
parent c332a62370
commit 003fac949c
2 changed files with 11 additions and 1 deletions

View File

@ -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)

View File

@ -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<string> _AllowedWatermarks = new List<string>();
//public List<string> 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);