B2023-005: Beaver Valley CAS page, second page print of watermark is out of place
This commit is contained in:
parent
ae831eac62
commit
7cf1d0e072
@ -1397,9 +1397,11 @@ namespace Volian.Print.Library
|
|||||||
// next page - this fixes an issue where the page we inserted for the backside of the previous section was the larger page
|
// next page - this fixes an issue where the page we inserted for the backside of the previous section was the larger page
|
||||||
// size (11x17 vs 8x11)
|
// size (11x17 vs 8x11)
|
||||||
bool pageForNextSection = (ii == sectPageCount - 1 && !InsertBlankPages);
|
bool pageForNextSection = (ii == sectPageCount - 1 && !InsertBlankPages);
|
||||||
|
_MyHelper.SpecialCAS = false;
|
||||||
if (mySection.MyDocStyle.DontInsertBlankPages && ii == sectPageCount - 1) // C2023-001 beaver valley CAS section type (has hard page break for back of page)
|
if (mySection.MyDocStyle.DontInsertBlankPages && ii == sectPageCount - 1) // C2023-001 beaver valley CAS section type (has hard page break for back of page)
|
||||||
{
|
{
|
||||||
pageForNextSection = true;
|
pageForNextSection = true;
|
||||||
|
_MyHelper.SpecialCAS = true; // B2023-005: Beaver Valley - flag to rotate watermark on 2nd CAS page
|
||||||
}
|
}
|
||||||
NewPage(pageForNextSection); // Word Document
|
NewPage(pageForNextSection); // Word Document
|
||||||
//_MyLog.InfoFormat("NewPage 3 {0}", cb.PdfWriter.CurrentPageNumber);
|
//_MyLog.InfoFormat("NewPage 3 {0}", cb.PdfWriter.CurrentPageNumber);
|
||||||
|
@ -921,6 +921,12 @@ namespace Volian.Svg.Library
|
|||||||
}
|
}
|
||||||
public class SvgPageHelper : PdfPageEventHelper
|
public class SvgPageHelper : PdfPageEventHelper
|
||||||
{
|
{
|
||||||
|
private bool _SpecialCAS; // B2023-005: CAS page, rotate watermark
|
||||||
|
public bool SpecialCAS
|
||||||
|
{
|
||||||
|
get { return _SpecialCAS; }
|
||||||
|
set { _SpecialCAS = value; }
|
||||||
|
}
|
||||||
private bool _IsLandscape;
|
private bool _IsLandscape;
|
||||||
public bool IsLandscape
|
public bool IsLandscape
|
||||||
{
|
{
|
||||||
@ -1189,7 +1195,16 @@ 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"
|
//if (!AllowAllWatermarks && !AllowedWatermarks.Contains(Watermark)) return; -- B2018-124 not needed anymore with above if statement - this does not hanle "Information Only"
|
||||||
cb.SaveState();
|
cb.SaveState();
|
||||||
if (_WatermarkLayer != null) cb.BeginLayer(_WatermarkLayer);
|
if (_WatermarkLayer != null) cb.BeginLayer(_WatermarkLayer);
|
||||||
if (IsLandscape || IsWatermarkLandscape) // B2019-145: Added for printing landscape watermark on step section pages.
|
// B2023-005: Beaver Valley, second page of CAS page is a 'foldout' on large paper - need to rotate the
|
||||||
|
// watermark
|
||||||
|
if (SpecialCAS)
|
||||||
|
{
|
||||||
|
double a = -180 * (Math.PI / 180);
|
||||||
|
System.Drawing.Drawing2D.Matrix myMatrix = new System.Drawing.Drawing2D.Matrix((float)Math.Cos(a), (float)Math.Sin(a), (float)-Math.Sin(a), (float)Math.Cos(a), cb.PdfDocument.PageSize.Width, cb.PdfDocument.PageSize.Height);
|
||||||
|
cb.Transform(myMatrix);
|
||||||
|
|
||||||
|
}
|
||||||
|
else 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
|
// The watermark needs to be rotated back for landscape pagelist - B2016-191
|
||||||
//double a = -33 * (Math.PI / 180);
|
//double a = -33 * (Math.PI / 180);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user