Live barcode API
Insert and inspect document barcodes
Build a 1D or 2D barcode, insert it at the caret, and select any barcode in the document to inspect and update its live properties.
Select a barcodeClick a barcode in the document to inspect and edit it.
Selected barcode
Barcode
QR code
Value
Symbology-
Text position-
Frame size-
Object ID-
Barcodes in this text part
0 barcodes
Reading the barcode collection...
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Barcodes are editable document objects
TX Text Control embeds barcode objects directly in Word-compatible documents. Their encoded value, symbology, appearance, name, and placement remain available to editing and reporting APIs.
Barcode collection
TXTextControl.barcodes
Insertion
BarcodeCollection.addInline
Layout object
BarcodeFrame
Barcode data
BarcodeFrame.barcode
How it works
BarcodeCollection.addInline creates a barcode from a BarcodeType and an encoded string. Passing -1 as the text position inserts the object at the current caret position.
The callback receives a BarcodeFrame. Members inherited from FrameBase, such as getName, getSize, and getTextPosition, describe how the object participates in the document. The frame's barcode property exposes the associated Barcode object, where getText, setText, getBarcodeType, and setShowText control the rendered code.
The barcodeSelected and barcodeDeselected events synchronize the inspector with the editor. BarcodeCollection.forEach builds the collection overview from the active text part without hard-coded entries.
TXTextControl.barcodes.addInline(
barcodeFrame => barcodeFrame.setName(
"Invoice QR",
() => console.log("Barcode named"),
showBarcodeError),
showBarcodeError,
TXTextControl.BarcodeType.QRCode,
"INV-1048",
-1);
NuGet packages
TXTextControl.TextControl.Core.SDK
34.0.4
Provides the core document model and server-side document processing APIs.
dotnet add package TXTextControl.TextControl.Core.SDK --version 34.0.4
Provides the browser-based TX Text Control document editor and JavaScript API.
dotnet add package TXTextControl.Web --version 34.4.0
TXTextControl.Web.DocumentEditor.Backend
34.4.0
Hosts the WebSocket-based backend used by the browser document editor.
dotnet add package TXTextControl.Web.DocumentEditor.Backend --version 34.4.0