internal override bool AddToPage(RPLWriter rplWriter, PageContext pageContext, double pageLeft, double pageTop, double pageRight, double pageBottom, RepeatState repeatState)
 {
     if (HitsCurrentPage(pageLeft, pageTop, pageRight, pageBottom))
     {
         WriteStartItemToStream(rplWriter, pageContext);
         OmitBorderOnPageBreak(rplWriter, pageLeft, pageTop, pageRight, pageBottom);
         List <PageItem> list = null;
         if (m_children != null)
         {
             double pageLeft2   = Math.Max(0.0, pageLeft - base.ItemPageSizes.Left);
             double pageTop2    = Math.Max(0.0, pageTop - base.ItemPageSizes.Top);
             double pageRight2  = pageRight - base.ItemPageSizes.Left;
             double pageBottom2 = pageBottom - base.ItemPageSizes.Top;
             double num         = 0.0;
             list = new List <PageItem>();
             for (int i = 0; i < m_children.Length; i++)
             {
                 PageItem pageItem = m_children[i];
                 if (pageItem == null)
                 {
                     continue;
                 }
                 if (pageItem.AddToPage(rplWriter, pageContext, pageLeft2, pageTop2, pageRight2, pageBottom2, repeatState))
                 {
                     if (pageItem.ContentOnPage)
                     {
                         list.Add(pageItem);
                     }
                     if (pageItem.Release(pageBottom2, pageRight2))
                     {
                         if (repeatState == RepeatState.None && (pageItem.ContentOnPage || !pageContext.ConsumeWhitespace || m_bottomPadding <= 0.0))
                         {
                             m_children[i] = null;
                         }
                     }
                     else
                     {
                         num = Math.Max(num, pageItem.OriginalRight);
                     }
                 }
                 else
                 {
                     num = Math.Max(num, pageItem.OriginalRight);
                 }
             }
             m_rightPadding = Math.Max(0.0, OriginalRight - num);
         }
         WriteEndItemToStream(rplWriter, list);
         return(true);
     }
     return(false);
 }