//
        // private implementation
        //

        private PDFPageNumberData GetPageDataWithGroup(int pageIndex, PDFPageNumberGroup grp)
        {
            string label             = grp.GetPageLabel(pageIndex);
            string lastLabel         = grp.GetPageLabel(this.TotalPages);
            int    grpNum            = pageIndex + grp.NumberStart;
            int    lastGrpNum        = this.TotalPages + 1;
            int    globalPageNum     = pageIndex + 1;
            int    globalLastPageNum = _totalpages + 1;

            PDFPageNumberData data = new PDFPageNumberData(grp)
            {
                Label           = label,
                LastLabel       = lastLabel,
                GroupNumber     = grpNum,
                GroupLastNumber = lastGrpNum,
                PageNumber      = globalPageNum,
                LastPageNumber  = globalLastPageNum
            };

            return(data);
        }
        private PDFPageNumberData GetPageDataWithRegistration(int pageindex, PDFPageNumberRegistration reg)
        {
            string label     = reg.GetPageLabel(pageindex);
            string lastLabel = reg.GetPageLabel(reg.LastPageIndex);

            int grpNum            = (pageindex - reg.FirstPageIndex) + 1;
            int lastGrpNum        = (reg.LastPageIndex - reg.FirstPageIndex) + 1;
            int globalPageNum     = pageindex + 1;
            int globalLastPageNum = _totalpages + 1;

            PDFPageNumberData data = new PDFPageNumberData(reg.Group)
            {
                Label           = label,
                LastLabel       = lastLabel,
                GroupNumber     = grpNum,
                GroupLastNumber = lastGrpNum,
                PageNumber      = globalPageNum,
                LastPageNumber  = globalLastPageNum
            };

            return(data);
        }