Last active
January 28, 2022 08:20
-
-
Save bjoerntx/31aa6a8fe5bfb670178b4bcbd97f1e95 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
[HttpGet] | |
public IActionResult AddWatermark() | |
{ | |
byte[] bDocument; | |
// create a ServerTextControl | |
using (TXTextControl.ServerTextControl tx = new TXTextControl.ServerTextControl()) { | |
tx.Create(); | |
tx.PageUnit = TXTextControl.MeasuringUnit.Twips; | |
// load the template | |
tx.Load("App_Data/nda.tx", TXTextControl.StreamType.InternalUnicodeFormat); | |
AddWatermark(tx, "App_Data/draft.svg"); | |
// save in the internal format | |
tx.Save(out bDocument, TXTextControl.BinaryStreamType.InternalUnicodeFormat); | |
} | |
return Ok(bDocument); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment