Created
February 15, 2018 14:21
-
-
Save bjoerntx/d2db4338fd0b8fc72961ef726f2c74f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add a header | |
textControl1.Sections.GetItem().HeadersAndFooters.Add(HeaderFooterType.Header); | |
// retrieve the inserted header | |
HeaderFooter hed = textControl1.Sections.GetItem().HeadersAndFooters.GetItem( | |
HeaderFooterType.Header); | |
// create a new TextFrame | |
TextFrame frame = new TextFrame(new Size(3000, 3000)); | |
// add the TextFrame to the header | |
hed.TextFrames.Add(frame, | |
textControl1.InputPosition.Page, // fixed on page | |
new Point(0, 2000), | |
TextFrameInsertionMode.BelowTheText | TextFrameInsertionMode.FixedOnPage); | |
// add text to TextFrame | |
frame.Selection.Text = "New TextFrame"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment