예제 #1
0
        // Token: 0x06007027 RID: 28711 RVA: 0x00203768 File Offset: 0x00201968
        private DocumentPage FormatPage(int pageNumber)
        {
            Invariant.Assert(this._brt.HasPageBreakRecord(pageNumber), "BreakRecord for specified page number does not exist.");
            PageBreakRecord  pageBreakRecord  = this._brt.GetPageBreakRecord(pageNumber);
            FlowDocumentPage flowDocumentPage = new FlowDocumentPage(this._document.StructuralCache);
            Size             size             = this.ComputePageSize();
            Thickness        pageMargin       = this._document.ComputePageMargin();
            PageBreakRecord  brOut            = flowDocumentPage.FormatFinite(size, pageMargin, pageBreakRecord);

            flowDocumentPage.Arrange(size);
            this._brt.UpdateEntry(pageNumber, flowDocumentPage, brOut, flowDocumentPage.DependentMax);
            return(flowDocumentPage);
        }
예제 #2
0
        /// <summary>
        /// Format the page identified by the pageNumber parameter.
        /// </summary>
        private DocumentPage FormatPage(int pageNumber)
        {
            FlowDocumentPage page;
            PageBreakRecord  breakRecordIn, breakRecordOut;
            Thickness        pageMargin;
            Size             pageSize;

            Invariant.Assert(_brt.HasPageBreakRecord(pageNumber), "BreakRecord for specified page number does not exist.");

            breakRecordIn = _brt.GetPageBreakRecord(pageNumber);
            page          = new FlowDocumentPage(_document.StructuralCache);
            pageSize      = ComputePageSize();
            pageMargin    = _document.ComputePageMargin();

            breakRecordOut = page.FormatFinite(pageSize, pageMargin, breakRecordIn);
            page.Arrange(pageSize);

            // NOTE: May execute external code, so it is possible to get
            //       an exception here.
            _brt.UpdateEntry(pageNumber, page, breakRecordOut, page.DependentMax);
            return(page);
        }