diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs index 2f383a63..1acd04f7 100644 --- a/PROMS/Volian.Print.Library/PromsPrinter.cs +++ b/PROMS/Volian.Print.Library/PromsPrinter.cs @@ -908,9 +908,19 @@ namespace Volian.Print.Library public void CreateWordDocPdf(PdfContentByte cb, SectionInfo mySection) { if (mySection.PageNumber == -1) // If page num transition goes to a section, need the pagenumber of section. - mySection.PageNumber = _MyHelper.CurrentPageNumber; + { + if ((mySection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DontCountFoldoutPgs) == E_DocStructStyle.DontCountFoldoutPgs) + mySection.PageNumber = _MyHelper.CurrentPageNumberNoFoldouts; + else + mySection.PageNumber = _MyHelper.CurrentPageNumber; + } else - mySection.PageNumberNextPass = _MyHelper.CurrentPageNumber; + { + if ((mySection.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DontCountFoldoutPgs) == E_DocStructStyle.DontCountFoldoutPgs) + mySection.PageNumberNextPass = _MyHelper.CurrentPageNumberNoFoldouts; + else + mySection.PageNumberNextPass = _MyHelper.CurrentPageNumber; + } int profileDepth = ProfileTimer.Push(">>>> CreateWordDocPdf"); _MyHelper.MySection = mySection; try