Created
May 24, 2022 13:34
-
-
Save bjoerntx/df61f2aeb13af9ea4737c03b8e3dce8c 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
using (TXTextControl.ServerTextControl tx = new TXTextControl.ServerTextControl()) { | |
tx.Create(); | |
// insert a table | |
tx.Tables.Add(3, 3, 10); | |
foreach (TXTextControl.TableCell tableCell in tx.Tables.GetItem(10).Cells) { | |
tableCell.Text = "Row " + | |
tableCell.Row.ToString() + | |
", Col " + tableCell.Column.ToString(); | |
tableCell.CellFormat.BottomBorderWidth = 10; | |
} | |
// create a selection object | |
TXTextControl.Selection selection = new TXTextControl.Selection() { | |
FontSize = 500, | |
Text = "Welcome to Text Control", | |
Bold = true, | |
ForeColor = System.Drawing.Color.DarkRed | |
}; | |
// apply the selection | |
tx.Selection = selection; | |
// save the document | |
tx.Save("results.pdf", TXTextControl.StreamType.AdobePDF); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment