F2021-046: Cover Page – remove merge page num, but include in overall count

F2021-046: BNPP Alarm Cover Page – remove merge page num, but include in overall count
This commit is contained in:
Kathy Ruffing 2021-09-27 15:42:31 +00:00
parent c183ddd2e9
commit cc6f0ed9fd
4 changed files with 26 additions and 2 deletions

Binary file not shown.

View File

@ -842,6 +842,11 @@ namespace VEPROMS
// pdf name from printing has the path, remove it.
string pdfname = locpdfname.Substring(locpdfname.LastIndexOf(@"\") + 1);
MergedPdfProc mpp = new MergedPdfProc(myProc.DisplayText, pdfname);
// F2021-046: flag if cover page section doesn't print page number on first page of merged pdf:
if (myProc.Sections != null)
{
foreach (ItemInfo ii in myProc.Sections) if (ii.MyDocStyle != null && ii.MyDocStyle.CoverNoMergedPageNum) mpp.FirstPageNoPageNum = true;
}
if (_MergedPfd.MergedPdfs == null) _MergedPfd.MergedPdfs = new List<MergedPdfProc>();
mpp.PageCount = PromsPrinter.ProcPageCount;
_MergedPfd.MergedPdfs.Add(mpp);

View File

@ -361,6 +361,18 @@ namespace VEPROMS.CSLA.Library
}
}
#endregion
#region CoverNoMergedPageNum
[Category("Miscellaneous")]
[Description("Cover Page Do Not Show Page Count")]
private LazyLoad<bool> _CoverNoMergedPageNum; // F2021-046: flag if cover page section doesn't print page number on first page of merged pdf:
public bool CoverNoMergedPageNum
{
get
{
return LazyLoad(ref _CoverNoMergedPageNum, "@CoverNoMergedPageNum");
}
}
#endregion
#region AlignHLSTabWithSect
[Category("Miscellaneous")]
[Description("Align HLS Tab With Sect")]

View File

@ -32,6 +32,12 @@ namespace Volian.Print.Library
get { return _PdfFileName; }
set { _PdfFileName = value; }
}
private bool _FirstPageNoPageNum = false;
public bool FirstPageNoPageNum
{
get { return _FirstPageNoPageNum; }
set { _FirstPageNoPageNum = value; }
}
public MergedPdfProc(string title, string pfname)
{
_Title = title;
@ -141,7 +147,8 @@ namespace Volian.Print.Library
doc.SetPageSize(paperSize);
doc.NewPage();
PdfImportedPage page = writer.GetImportedPage(reader, currentPageNumber); // gets a page that is 'ready' to be written to combined pdf
if (doPageNum) // get the string & fill in with <page> and <of> numbers
// F2021-046: flag if cover page section doesn't print page number on first page of merged pdf:
if (doPageNum && (!(mpp.FirstPageNoPageNum && currentPageNumber == 1))) // get the string & fill in with <page> and <of> numbers
{
bool landscape = false;
if (LandscapePages != null && LandscapePages.Contains(currentPageNumber - 1)) landscape = true;