Added check for even page number before printing Auto Table of Contents to determine if blank page should be printed. B2016-181
This commit is contained in:
parent
a5707e2cdf
commit
36e4b0c3ab
@ -807,12 +807,15 @@ namespace Volian.Print.Library
|
||||
_MyHelper.FinalMessageSectionID = finalMessageSectionID; // set VlnSvgPageHelper with the finalMessageSectionID
|
||||
|
||||
if (mySection.IsAutoTOCSection)
|
||||
{
|
||||
if (cb.PdfWriter.CurrentPageNumber % 2 == 0 && !_MyHelper.CreatingFoldoutPage && InsertBlankPages) // Bug Fix: B2016-181 - add blank page if page count is even
|
||||
{
|
||||
_MyHelper.OnBlankPage = true;
|
||||
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
|
||||
NewPage();
|
||||
}
|
||||
GenerateTOC(mySection, myProcedure, cb, _TextLayer);
|
||||
// is this the right place for PlaceKeeper?
|
||||
// I think we need to check if the actual PlaceKeeper section has the PlaceKeeper flag set (for auto generation)
|
||||
// users can turn this off and edit the section manaully in 16-bit.
|
||||
//else if (mySection.IsPlacekeeperSection)
|
||||
// GeneratePlaceKeeper(mySection, myProcedure, cb, _TextLayer);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mySection.IsStepSection)
|
||||
@ -1096,22 +1099,6 @@ namespace Volian.Print.Library
|
||||
//_MyLog.InfoFormat("NewPage 4 {0}", cb.PdfWriter.CurrentPageNumber);
|
||||
_NoBreakYOffset = 0;
|
||||
}
|
||||
//private void GeneratePlaceKeeper(SectionInfo pkSection, ProcedureInfo myProcedure, PdfContentByte cb, PdfLayer textLayer)
|
||||
//{
|
||||
// iTextSharp.text.pdf.PdfWriter writer = cb.PdfWriter;
|
||||
// float _PointsPerPage = 792;
|
||||
// float yTopMargin = _PointsPerPage - (float)pkSection.MyDocStyle.Layout.TopMargin;
|
||||
// float yBottomMargin = Math.Max(0, yTopMargin - (float)pkSection.MyDocStyle.Layout.PageLength); // - 2 * vlnPrintObject.SixLinesPerInch);
|
||||
// if (textLayer != null) cb.BeginLayer(textLayer);
|
||||
// PlacekeeperData pkdata = pkSection.ActiveFormat.PlantFormat.FormatData.SectData.AccSectionData.PlacekeeperData;
|
||||
// ItemInfo procItem = ItemInfo.Get(myProcedure.ItemID);
|
||||
// lastyLocation = 0;
|
||||
// AddSectionToPK(pkSection, procItem, pkdata, cb, yTopMargin, 0);
|
||||
// if (textLayer != null) cb.EndLayer();
|
||||
// cb.PdfDocument.NewPage();
|
||||
// //_MyLog.InfoFormat("NewPage 4 {0}", cb.PdfWriter.CurrentPageNumber);
|
||||
// _NoBreakYOffset = 0;
|
||||
//}
|
||||
float lastyLocation = 0;
|
||||
private string GetRtfToC(string txt, TableOfContentsData tOfCData)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user