Created
October 23, 2023 09:48
-
-
Save bjoerntx/44316dd79a2b75553baa63c6af6e6886 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(); | |
string html = File.ReadAllText("sample.html"); | |
string appendHtml = "<html><body><h1>Appended</h1></body></html>"; | |
// load HTML string | |
tx.Load(html, TXTextControl.StringStreamType.HTMLFormat); | |
tx.Select(17, 0); | |
tx.Selection.Load(appendHtml, TXTextControl.StringStreamType.HTMLFormat); | |
// save as PDF | |
tx.Save("output.pdf", TXTextControl.StreamType.AdobePDF); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment