Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active February 14, 2022 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/9a255ec2f369ef9058382d51a52bad2c to your computer and use it in GitHub Desktop.
Save bjoerntx/9a255ec2f369ef9058382d51a52bad2c to your computer and use it in GitHub Desktop.
// new non-UI ServerTextControl
using (TXTextControl.ServerTextControl tx = new TXTextControl.ServerTextControl()) {
tx.Create();
// create a new Barcode object
TXTextControl.Barcode.TXBarcodeControl txBarcode1 =
new TXTextControl.Barcode.TXBarcodeControl();
var sBarcodeText = "www.textcontrol.com";
txBarcode1.BarcodeType =
TXTextControl.Barcode.BarcodeType.QRCode;
txBarcode1.UpperTextLength = sBarcodeText.Length;
txBarcode1.Text = sBarcodeText;
txBarcode1.Name = "uniqueId";
// create a Barcode frame object
TXTextControl.DataVisualization.BarcodeFrame bf =
new TXTextControl.DataVisualization.BarcodeFrame(txBarcode1);
// add the frame with the Barcode to the document
tx.Barcodes.Add(bf, -1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment