SetRtfDocument() public method

public SetRtfDocument ( RtfDocument doc ) : void
doc iTextSharp.text.rtf.document.RtfDocument
return void
        /**
         * Set a RtfHeaderFooter to be displayed at a certain position
         *
         * @param headerFooter The RtfHeaderFooter to display
         * @param displayAt The display location to use
         */
        public void SetHeaderFooter(RtfHeaderFooter headerFooter, int displayAt)
        {
            this.mode = MODE_MULTIPLE;
            headerFooter.SetRtfDocument(this.document);
            headerFooter.SetType(this.type);
            headerFooter.SetDisplayAt(displayAt);
            switch (displayAt)
            {
            case RtfHeaderFooter.DISPLAY_ALL_PAGES:
                headerAll = headerFooter;
                break;

            case RtfHeaderFooter.DISPLAY_FIRST_PAGE:
                headerFirst = headerFooter;
                break;

            case RtfHeaderFooter.DISPLAY_LEFT_PAGES:
                headerLeft = headerFooter;
                break;

            case RtfHeaderFooter.DISPLAY_RIGHT_PAGES:
                headerRight = headerFooter;
                break;
            }
        }
        /// <summary>
        /// Set a RtfHeaderFooter to be displayed at a certain position
        /// </summary>
        /// <param name="headerFooter">The RtfHeaderFooter to display</param>
        /// <param name="displayAt">The display location to use</param>
        public void SetHeaderFooter(RtfHeaderFooter headerFooter, int displayAt)
        {
            _mode = ModeMultiple;
            headerFooter.SetRtfDocument(_document);
            headerFooter.SetType(_type);
            headerFooter.SetDisplayAt(displayAt);
            switch (displayAt)
            {
            case RtfHeaderFooter.DISPLAY_ALL_PAGES:
                _headerAll = headerFooter;
                break;

            case RtfHeaderFooter.DISPLAY_FIRST_PAGE:
                _headerFirst = headerFooter;
                break;

            case RtfHeaderFooter.DISPLAY_LEFT_PAGES:
                _headerLeft = headerFooter;
                break;

            case RtfHeaderFooter.DISPLAY_RIGHT_PAGES:
                _headerRight = headerFooter;
                break;
            }
        }
 /**
  * Sets the RtfDocument this RtfElement belongs to
  *
  * @param doc The RtfDocument to use
  */
 public void SetRtfDocument(RtfDocument doc)
 {
     this.document = doc;
     if (headerAll != null)
     {
         headerAll.SetRtfDocument(this.document);
     }
     if (headerFirst != null)
     {
         headerFirst.SetRtfDocument(this.document);
     }
     if (headerLeft != null)
     {
         headerLeft.SetRtfDocument(this.document);
     }
     if (headerRight != null)
     {
         headerRight.SetRtfDocument(this.document);
     }
 }
 /// <summary>
 /// Sets the RtfDocument this RtfElement belongs to
 /// </summary>
 /// <param name="doc">The RtfDocument to use</param>
 public void SetRtfDocument(RtfDocument doc)
 {
     _document = doc;
     if (_headerAll != null)
     {
         _headerAll.SetRtfDocument(_document);
     }
     if (_headerFirst != null)
     {
         _headerFirst.SetRtfDocument(_document);
     }
     if (_headerLeft != null)
     {
         _headerLeft.SetRtfDocument(_document);
     }
     if (_headerRight != null)
     {
         _headerRight.SetRtfDocument(_document);
     }
 }
Ejemplo n.º 5
0
 /**
 * Set a RtfHeaderFooter to be displayed at a certain position
 *
 * @param headerFooter The RtfHeaderFooter to display
 * @param displayAt The display location to use
 */
 public void SetHeaderFooter(RtfHeaderFooter headerFooter, int displayAt)
 {
     this.mode = MODE_MULTIPLE;
     headerFooter.SetRtfDocument(this.document);
     headerFooter.SetType(this.type);
     headerFooter.SetDisplayAt(displayAt);
     switch (displayAt) {
         case RtfHeaderFooter.DISPLAY_ALL_PAGES:
             headerAll = headerFooter;
             break;
         case RtfHeaderFooter.DISPLAY_FIRST_PAGE:
             headerFirst = headerFooter;
             break;
         case RtfHeaderFooter.DISPLAY_LEFT_PAGES:
             headerLeft = headerFooter;
             break;
         case RtfHeaderFooter.DISPLAY_RIGHT_PAGES:
             headerRight = headerFooter;
             break;
     }
 }