
NOTICE: All information contained herein is, and remains
the property of TechnoCore.
The intellectual and technical concepts contained
herein are proprietary to TechnoCore and dissemination of this information or reproduction of this material
is strictly forbidden unless prior written permission is obtained
from TechnoCore.
The ObjTextCode128 object is a utility for generating Code 128 barcodes. It uses the python-barcode library to create the barcode as an SVG image, which is then encoded in Base64 and embedded directly into an <img> tag as a data URI.
This approach is self-contained, requires no external API calls, and ensures that barcodes are generated locally and reliably.
Process(Param1: str, ...)This method takes a string of text and generates a Code 128 barcode image from it.
Parameters:
Param1 (str): The text or data to be encoded into the barcode.Returns:
<img> tag with the Base64-encoded SVG barcode embedded in its src attribute. If an error occurs, it will return a descriptive error message.Example Usage:
barcode_generator = ObjProcessText()
barcode_html = barcode_generator.Process(Param1="AXION-12345")
print(barcode_html)
This would output an <img> tag similar to this (Base64 data truncated for brevity):
<img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZ...>" alt="Barcode for AXION-12345">