BarcodeCollection Object
Description
Contains all barcodes in a document represented through objects of the type BarcodeFrame.
Syntax
BarcodeCollectionExamples
The following example demonstrates BarcodeCollection in a practical document-editing workflow. It contains all barcodes in a document represented through objects of the type BarcodeFrame.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.barcodes.getItem(
function(barcodeFrame) {
if (!barcodeFrame) {
console.warn("No barcode frame was returned.");
return;
}
console.log("get item result:", barcodeFrame);
},
onTxError,
25
);Members
Methods
| Method | Description |
|---|---|
| addAnchored | Creates and inserts a new barcode which is anchored to the specified text position. It has the specified horizontal alignment and a textflow which is given through the insertionMode parameter. Anchored barcodes are moved with the text. |
| addAnchoredAtLocation | Inserts a new barcode which is anchored to the specified text position. It has the specified location relative to the paragraph it is anchored to and a textflow which is given through the insertionMode parameter. Anchored barcode are moved with the text. |
| addAtFixedPositionInDocument | Creates and inserts a new barcode which has a fixed geometrical position in the document. This position is specified through a location relative to the top left corner of the complete document. All gaps between the pages must be included. |
| addAtFixedPositionOnPage | Inserts a new image which has a fixed geometrical position in the document. This position is specified through a page number and a location on this page. |
| addInline | Creates and inserts a new barcode inline, which means that it is treated in the text like a single character. The barcode is inserted at the specified text input position. |
| addWithMouse | Inserts a barcode with the built-in mouse interface. The barcode's size is determined through the end-user. A cross cursor indicates where the barcode can be inserted. Changing the document aborts the insertion process. |
| clear | Removes all objects from the collection and from the document. (Inherited from FrameBaseCollection.) |
| getItem | Gets the barcode selected by the user or the barcode with the specified identifier. |
| getItemByName | Gets the barcode with the specified name. |
| remove | Removes a barcode. |