Skip to content

Instantly share code, notes, and snippets.

View bjoerntx's full-sized avatar
👨‍💻
Building web apps

Bjoern Meyer bjoerntx

👨‍💻
Building web apps
View GitHub Profile
using (TXTextControl.ServerVisualisation.TextViewGenerator tx =
new TXTextControl.ServerVisualisation.TextViewGenerator())
{
tx.Create();
tx.Load("nda_revised.docx", TXTextControl.StreamType.WordprocessingML);
tx.IsTrackChangesEnabled = true;
tx.UserNames = new string[] { "AI Generated" };
tx.Paragraphs[10].Select();
using (TXTextControl.ServerVisualisation.TextViewGenerator tx =
new TXTextControl.ServerVisualisation.TextViewGenerator())
{
tx.Create();
tx.Load("nda_revised.docx", TXTextControl.StreamType.WordprocessingML);
tx.IsTrackChangesEnabled = true;
tx.UserNames = new string[] { "AI Generated" };
tx.Paragraphs[10].Select();
void ComposeHeader(IContainer container)
{
var titleStyle = TextStyle.Default.FontSize(20).SemiBold().FontColor(Colors.Blue.Medium);
container.Row(row =>
{
row.RelativeItem().Column(column =>
{
column.Item().Text($"Invoice #{Model.InvoiceNumber}").Style(titleStyle);
using TXTextControl;
using (ServerTextControl tx = new ServerTextControl()) {
tx.Create();
LoadSettings loadSettings = new LoadSettings()
{
MasterPassword = "123"
};
using TXTextControl;
using (ServerTextControl tx = new ServerTextControl()) {
tx.Create();
// Load an encrypted document protected with a password
tx.Load("encrypted-document.tx", StreamType.InternalUnicodeFormat);
// Trying to save the document as PDF
try {
using TXTextControl;
using (ServerTextControl tx = new ServerTextControl()) {
tx.Create();
// Load an encrypted document protected with a password
tx.Load("encrypted-document.tx", StreamType.InternalUnicodeFormat);
tx.Save("results.pdf", StreamType.AdobePDF);
}
@Html.TXTextControl().TextControl(settings => {
settings.UserNames = new string[] { "developer@textcontrol.com" };
}).LoadText(sDocument, TXTextControl.Web.BinaryStreamType.InternalUnicodeFormat).Render()
@Html.TXTextControl().TextControl(settings => {
settings.UserNames = new string[] { "developer@textcontrol.com" };
}).LoadText(sDocument, TXTextControl.Web.BinaryStreamType.InternalUnicodeFormat).Render()
using TXTextControl;
using (ServerTextControl tx = new ServerTextControl())
{
tx.Create();
// Add a header
tx.Sections.GetItem().HeadersAndFooters.Add(HeaderFooterType.Header);
// Get the header/footer object
using TXTextControl;
using (TXTextControl.ServerTextControl tx = new TXTextControl.ServerTextControl())
{
tx.Create();
tx.Tables.Add(5, 5, 10);
// Set the table border style
Table table = tx.Tables.GetItem(10);