Created
October 24, 2023 13:30
-
-
Save bjoerntx/379d406398c294223d4a65e31faa8d41 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(); | |
TXTextControl.Selection selection = new TXTextControl.Selection(); | |
selection.Text = "Hello, PDF/A!"; | |
selection.FontSize = 360; | |
selection.FontName = "Celtic Garamond the 2nd"; | |
selection.ForeColor = System.Drawing.Color.Red; | |
tx.Selection = selection; | |
try | |
{ | |
tx.Save("output.pdf", TXTextControl.StreamType.AdobePDFA); | |
} catch (Exception ex) | |
{ | |
Console.WriteLine(ex.ToString()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment