C2020-002 Logic to use either the Letter or A4 paper size
This commit is contained in:
@@ -1381,8 +1381,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
private void ResetDocStyleAndValues(ref float yTopMargin, ref float yBottomMargin)
|
||||
{
|
||||
//float _PointsPerPage = PDFPageSize.PaperSizePoints(MyItemInfo.ActiveFormat.PlantFormat.FormatData.PDFPageSize.PaperSize); // A4 paper logic
|
||||
float _PointsPerPage = 792;
|
||||
float _PointsPerPage = PDFPageSize.PaperSizePoints(MyItemInfo.ActiveFormat.PlantFormat.FormatData.PDFPageSize.PaperSize); // C2020-002 paper size is now set in the format files
|
||||
// if this document style has another style that is for pages other than first, we need to
|
||||
// reset the document style off of this section AND reset docstyle values used.
|
||||
// C2018-003 fixed use of getting the active section
|
||||
@@ -1706,8 +1705,7 @@ namespace Volian.Print.Library
|
||||
if (MyItemInfo.IsSection && MyParent != null && MyParent.MyItemInfo.IsSection && (MyItemInfo as SectionInfo).IsSeparatePagination())
|
||||
{
|
||||
RefreshDocStyle();
|
||||
//yTopMargin = PDFPageSize.PaperSizePoints(MyItemInfo.ActiveFormat.PlantFormat.FormatData.PDFPageSize.PaperSize) - (float)MyItemInfo.ActiveSection.MyDocStyle.Layout.TopMargin; // C2018-003 fixed use of getting the active section // A4 paper logic
|
||||
yTopMargin = 792 - (float)MyItemInfo.ActiveSection.MyDocStyle.Layout.TopMargin; // C2018-003 fixed use of getting the active section
|
||||
yTopMargin = PDFPageSize.PaperSizePoints(MyItemInfo.ActiveFormat.PlantFormat.FormatData.PDFPageSize.PaperSize) - (float)MyItemInfo.ActiveSection.MyDocStyle.Layout.TopMargin; // C2018-003 fixed use of getting the active section // C2020-002 paper size is now set in the format files
|
||||
yBottomMargin = Math.Max(0, yTopMargin - (float)MyItemInfo.ActiveSection.MyDocStyle.Layout.PageLength); // C2018-003 fixed use of getting the active section
|
||||
yPageStart = yTopMargin;
|
||||
}
|
||||
@@ -2803,8 +2801,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
if (MyItemInfo.ActiveSection != null && (MyItemInfo.ActiveSection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PrintSectOnFirst) == E_DocStructStyle.DSS_PrintSectOnFirst) // C2018-003 fixed use of getting the active section
|
||||
{
|
||||
//float localYTopMargin = PDFPageSize.PaperSizePoints(MyItemInfo.ActiveFormat.PlantFormat.FormatData.PDFPageSize.PaperSize) - (float)MyItemInfo.ActiveSection.MyDocStyle.Layout.TopMargin; // A4 paper logic
|
||||
float localYTopMargin = 792 - (float)MyItemInfo.ActiveSection.MyDocStyle.Layout.TopMargin;
|
||||
float localYTopMargin = PDFPageSize.PaperSizePoints(MyItemInfo.ActiveFormat.PlantFormat.FormatData.PDFPageSize.PaperSize) - (float)MyItemInfo.ActiveSection.MyDocStyle.Layout.TopMargin; // C2020-002 paper size is now set in the format files
|
||||
yBtmMarginForMsg = Math.Max(0, localYTopMargin - (float)MyItemInfo.ActiveSection.MyDocStyle.Layout.PageLength);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user