BarcodeFrame Object
Description
A BarcodeFrame object represents a barcode and its layout in a Text Control document. A barcode can be positioned in the document like an image or a text frame, either geometrically or as a single character. Geometrically its position can either be relative to a paragraph to which it is anchored or relative to the complete document. Additionally the BarcodeFrame object handles the positioning of the barcode in the document.
Syntax
BarcodeFrameExamples
The following example demonstrates BarcodeFrame in a practical document-editing workflow. A BarcodeFrame object represents a barcode and its layout in a Text Control document. A barcode can be positioned in the document like an image or a text frame, either geometrically or as a single character. Geometrically its position can either be relative to a paragraph to which it is anchored or relative to the complete document. Additionally the BarcodeFrame object handles the positioning of the barcode in the document.
function inspectBarcodeFrame(barcodeFrame) {
console.log("BarcodeFrame object:", barcodeFrame);
}Members
Properties
| Property | Description |
|---|---|
| barcode | The barcode control associated with the barcode frame. |
Methods
| Method | Description |
|---|---|
| changeZOrder | Changes the frame's z-order. (Inherited from FrameBase.) |
| getAlignment | Gets the frame's horizontal alignment when it is anchored to a paragraph. (Inherited from FrameBase.) |
| getBounds | Gets the frame's bounding rectangle relative to the upper left corner of the document. (Inherited from FrameBase.) |
| getDescriptiveText | Gets the descriptive text for the frame. An empty string indicates that the frame has no such text. (Inherited from FrameBase.) |
| getID | Gets an identifier for the frame. A value of zero indicates that the image, text frame, chart, barcode or drawing has no identifier. (Inherited from FrameBase.) |
| getInsertionMode | Gets a value determining whether the frame is treated as a single character or the document's text either flows around or overwrites the frame. If the document's text flows around or overwrites the frame, this property also determines whether the image, text frame, chart, barcode or drawing is moved with the text or fixed positioned on a page. (Inherited from FrameBase.) |
| getLocation | Gets, in twips, the frame's current location. If the image, text frame, chart, barcode or drawing is anchored to a paragraph, the location is relative to the paragraph. Otherwise, it is relative to the document. If the frame has a horizontal alignment or if it is inserted inline, this property returns zero. This property cannot be set for images, text frames, charts, barcodes or drawings which are inserted inline. (Inherited from FrameBase.) |
| getMoveable | Gets whether a frame can be moved in the document at run time with the built-in mouse interface. (Inherited from FrameBase.) |
| getName | Gets the name for the frame. An empty string indicates that the frame has no name. (Inherited from FrameBase.) |
| getSize | Gets the frame's size in twips. (Inherited from FrameBase.) |
| getSizeable | Gets whether the frame can be resized at run time with the built-in mouse interface. (Inherited from FrameBase.) |
| getTextDistances | Gets the distances, in twips, between the frame and the document's text. (Inherited from FrameBase.) |
| getTextPosition | Gets the frame's character position in the document's text (one-based). (Inherited from FrameBase.) |
| refresh | Refreshes the barcode. |
| setAlignment | Sets the frame's horizontal alignment when it is anchored to a paragraph. (Inherited from FrameBase.) |
| setDescriptiveText | Sets a descriptive text for the frame. An empty string or null can be used to delete a previously set text. (Inherited from FrameBase.) |
| setID | Sets an identifier for the frame. It must be a one-based value. A value of zero indicates that the image, text frame, chart, barcode or drawing has no identifier. Zero can also be used to delete a previously set identifier. (Inherited from FrameBase.) |
| setInsertionMode | Sets a value determining whether the frame is treated as a single character or the document's text either flows around or overwrites the frame. If the document's text flows around or overwrites the frame, this property also determines whether the image, text frame, chart, barcode or drawing is moved with the text or fixed positioned on a page. (Inherited from FrameBase.) |
| setLocation | Sets, in twips, the frame's current location. If the image, text frame, chart, barcode or drawing is anchored to a paragraph, the location is relative to the paragraph. Otherwise, it is relative to the document. If the frame has a horizontal alignment or if it is inserted inline, this property returns zero. This property cannot be set for images, text frames, charts, barcodes or drawings which are inserted inline. (Inherited from FrameBase.) |
| setMoveable | Sets whether a frame can be moved in the document at run time with the built-in mouse interface. (Inherited from FrameBase.) |
| setName | Sets a name for the frame. An empty string indicates that the frame has no name. An empty string can also be used to delete a previously set name. (Inherited from FrameBase.) |
| setSize | Sets the frame's size in twips. For images this property is read only. To change the size of an image in a document, use the setHorizontalScaling and setVerticalScaling methods. (Inherited from FrameBase.) |
| setSizeable | Sets whether the frame can be resized at run time with the built-in mouse interface. (Inherited from FrameBase.) |
| setTextDistances | Sets the distances, in twips, between the frame and the document's text. If a value is set to -1, it is not changed. (Inherited from FrameBase.) |