Objo Studio desktop plugin

KCG Barcode Plugin

Installation and API guide

KCG Barcode is a managed Objo Studio desktop plugin. It generates 79 ZintNET-backed symbologies and reads common 1D and 2D barcode formats through the bundled ZXing.Net dependency, without a preinstalled native barcode library at runtime.

Overview

The package file is KCG-Barcode.objopackage. It is for Objo Studio desktop projects on Windows, macOS, and Linux. Its complete public API is KCG.Barcode.BarcodeGenerator, KCG.Barcode.BarcodeScanner, KCG.Barcode.BarcodeReadResult, and KCG.Barcode.BarcodeType.

The package identity is com.kcgsoftware.barcode. Objo tracks upgrades by this identity and its metadata version, currently 1.0.3; the distribution filename remains stable.

KCG Barcode is MIT-licensed. The archive also includes the required third-party notices for ZintNET and ZXing.Net. ZintNET and ZXing.Net are open-source and can be found on GitHub for further information.

Runtime requirement: install the package into Objo Studio; an application using the installed plugin does not need any separate library on the target computer.

Install the package

  1. Start Objo Studio and open the Plugin Manager or package-install command.
  2. Select KCG-Barcode.objopackage.
  3. Accept the installation or replacement if an earlier KCG Barcode version is installed.
  4. Restart Objo Studio, then reopen the project that will use the plugin.
After updating: if Objo reports that a new method has too many arguments, it has retained an earlier package API. Remove the old KCG Barcode package, install this package again, and restart Objo Studio.

Quick start

Add the package to an Objo desktop project, place an ImageViewer named imgBarcode on a window, then generate a Picture:

Var generator As New KCG.Barcode.BarcodeGenerator
Var picture As Picture = generator.Generate("5901234123457", KCG.Barcode.BarcodeType.EAN13, 3, 1, 0)
imgBarcode.Image = picture

Handle exceptions around generation and saving. A symbol may reject invalid data, lengths, check digits, or option combinations.

Complete API reference

All types are in the KCG.Barcode namespace. The package provides explicit shorter overloads where values can be omitted; it does not rely on optional-parameter metadata. Generation and file writing can raise a RuntimeException in Objo when data, a symbology, or an output path is invalid; handle those calls with Try…Catch.

BarcodeGenerator

Create one generator instance:

Var generator As New KCG.Barcode.BarcodeGenerator

CallReturnPurpose
DisplayName(type As BarcodeType)StringReturns a user-facing name for one generation symbology.
Generate(data, type), Generate(data, type, scale), Generate(data, type, scale, textPosition), or Generate(data, type, scale, textPosition, rotate90)PictureGenerates a barcode Picture. The shorter overloads use scale 3, text position 1, and rotation 0.
GenerateByIndex(data, symbologyIndex), GenerateByIndex(data, symbologyIndex, scale), GenerateByIndex(data, symbologyIndex, scale, textPosition), or GenerateByIndex(data, symbologyIndex, scale, textPosition, rotate90)PictureGenerates a barcode Picture from the zero-based enum index, 0–78.
SavePng(data, symbologyIndex, scale, textPosition, outputPath) or SavePng(data, symbologyIndex, scale, textPosition, outputPath, rotate90)NothingWrites a .png file.
SaveJpeg(data, symbologyIndex, scale, textPosition, outputPath) or SaveJpeg(data, symbologyIndex, scale, textPosition, outputPath, rotate90)NothingWrites a .jpg or .jpeg file.
SaveBmp(data, symbologyIndex, scale, textPosition, outputPath) or SaveBmp(data, symbologyIndex, scale, textPosition, outputPath, rotate90)NothingWrites a .bmp file.
SaveGif(data, symbologyIndex, scale, textPosition, outputPath) or SaveGif(data, symbologyIndex, scale, textPosition, outputPath, rotate90)NothingWrites a .gif file.
SaveTiff(data, symbologyIndex, scale, textPosition, outputPath) or SaveTiff(data, symbologyIndex, scale, textPosition, outputPath, rotate90)NothingWrites a .tif or .tiff file.
SavePdf(data, symbologyIndex, scale, textPosition, outputPath) or SavePdf(data, symbologyIndex, scale, textPosition, outputPath, rotate90)NothingWrites a .pdf file.
SaveSvg(data, symbologyIndex, scale, textPosition, outputPath) or SaveSvg(data, symbologyIndex, scale, textPosition, outputPath, rotate90)NothingWrites a .svg file.

scale must be 1–8 pixels per module. This validation is applied equally by Generate, GenerateByIndex, and every Save… call; values outside that range raise an error instead of creating an invalid image. textPosition is 0 for no label, 1 for below, or 2 for above; labels apply to one-row linear symbols and preserve the supplied data's case. Set rotate90 to 1 for a clockwise 90° rotation, or 0 to leave the image unrotated.

BarcodeScanner and BarcodeReadResult

Create one scanner, then pass it an ordinary Objo Picture:

Var scanner As New KCG.Barcode.BarcodeScanner
Var result As KCG.Barcode.BarcodeReadResult = scanner.Read(picture)

Call or propertyTypePurpose
New KCG.Barcode.BarcodeScannerBarcodeScannerCreates a scanner.
scanner.Read(picture As Picture)BarcodeReadResult or NothingReads the first supported barcode. It automatically attempts rotation and inversion.
result.TextString, read-onlyThe decoded text.
result.FormatString, read-onlyThe detected ZXing format name.
Var scanner As New KCG.Barcode.BarcodeScanner
Var result As KCG.Barcode.BarcodeReadResult = scanner.Read(picture)

If result <> Nothing Then
  MessageBox(result.Format + ": " + result.Text)
Else
  MessageBox("No supported barcode was found.")
End If

Use Nothing for the no-result comparison. The scanner reads a Picture; it does not open an image path or use a camera. An application may load a user-selected file into an ImageViewer first, then pass that control's Image to Read().

imgBarcode.LoadFromFile(imagePath)
Var result As KCG.Barcode.BarcodeReadResult = scanner.Read(imgBarcode.Image)

BarcodeType

BarcodeType is the 79-value generation enum listed in full below. It is used by Generate and DisplayName. The enum values are also the matching zero-based indexes for GenerateByIndex and every Save… call.

Symbology index

Use these zero-based indexes with GenerateByIndex(). The index order is also the order of BarcodeType.

  1. CodeOne — Code One
  2. Code39 — Code 39
  3. Code39Extended — Code 39 Extended
  4. LOGMARS — LOGMARS
  5. Code32 — Code 32
  6. PharmaZentralNummer — Pharmazentralnummer
  7. Pharmacode — Pharmacode
  8. Pharmacode2Track — Pharmacode 2-Track
  9. Code93 — Code 93
  10. ChannelCode — Channel Code
  11. Telepen — Telepen
  12. TelepenNumeric — Telepen Numeric
  13. Code128 — Code 128
  14. EAN14 — EAN-14
  15. SSCC18 — SSCC-18
  16. Standard2of5 — Standard 2 of 5
  17. Interleaved2of5 — Interleaved 2 of 5
  18. Industrial2of5 — Industrial 2 of 5
  19. IATA2of5 — IATA 2 of 5
  20. DataLogic2of5 — Data Logic 2 of 5
  21. ITF14 — ITF-14
  22. DeutschePostIdentCode — Deutsche Post Identcode
  23. DeutschePostLeitCode — Deutsche Post Leitcode
  24. Codabar — Codabar
  25. MSIPlessey — MSI Plessey
  26. UKPlessey — UK Plessey
  27. Code11 — Code 11
  28. ISBN — ISBN
  29. EAN13 — EAN-13
  30. EAN8 — EAN-8
  31. UPCA — UPC-A
  32. UPCE — UPC-E
  33. DatabarOmni — GS1 DataBar Omnidirectional
  34. DatabarOmniStacked — GS1 DataBar Omnidirectional Stacked
  35. DatabarStacked — GS1 DataBar Stacked
  36. DatabarTruncated — GS1 DataBar Truncated
  37. DatabarLimited — GS1 DataBar Limited
  38. DatabarExpanded — GS1 DataBar Expanded
  39. DatabarExpandedStacked — GS1 DataBar Expanded Stacked
  40. DataMatrix — Data Matrix
  41. QRCode — QR Code
  42. MicroQRCode — Micro QR Code
  43. RectangularMicroQRCode — Rectangular Micro QR Code
  44. UPNQR — UPN QR
  45. Aztec — Aztec
  46. AztecRunes — Aztec Runes
  47. MaxiCode — MaxiCode
  48. PDF417 — PDF417
  49. PDF417Truncated — PDF417 Truncated
  50. MicroPDF417 — MicroPDF417
  51. AusPostStandard — Australia Post Standard
  52. AusPostReplyPaid — Australia Post Reply Paid
  53. AusPostRedirect — Australia Post Redirect
  54. AusPostRouting — Australia Post Routing
  55. USPS — USPS Intelligent Mail
  56. CEPNET — Brazilian CEPNet
  57. POSTNET — POSTNET
  58. PLANET — PLANET
  59. KoreaPost — Korea Post
  60. FIM — FIM
  61. RoyalMail4SCC — Royal Mail 4-State
  62. KixCode — Dutch Post KIX
  63. DaftCode — DAFT
  64. Flattermarken — Flattermarken
  65. JapanPost — Japan Post
  66. CodablockF — Codablock-F
  67. Code16K — Code 16K
  68. DotCode — DotCode
  69. GridMatrix — Grid Matrix
  70. Code49 — Code 49
  71. HanXin — Han Xin
  72. VINCode — VIN
  73. RoyalMailMailmark — Royal Mail Mailmark
  74. Ultracode — Ultracode
  75. DPDCode — DPD Code
  76. UPUS10Code — UPU S10
  77. Mailmark2D — Royal Mail Mailmark 2D
  78. DXFilmEdge — DX Film Edge
  79. BC412 — IBM BC412

All readable symbologies

The scanner uses the bundled ZXing.Net reader. The following are the scanner's supported barcode formats; this list is intentionally narrower than the 79 ZintNET generation types.

ZXing result formatReadable barcode symbology
CODABARCodabar
CODE_39Code 39, including Extended Code 39 data where decodable
CODE_93Code 93
CODE_128Code 128 and GS1-128
EAN_8EAN-8
EAN_13EAN-13
UPC_AUPC-A
UPC_EUPC-E
ITFInterleaved 2 of 5 and valid ITF-14
RSS_14GS1 DataBar Omnidirectional / RSS-14
RSS_EXPANDEDGS1 DataBar Expanded / RSS Expanded
QR_CODEQR Code
DATA_MATRIXData Matrix
AZTECAztec
PDF_417PDF417
MAXICODEMaxiCode
Generation and reading are independent: a ZintNET-generated barcode can be valid even when Read() returns Nothing. The scanner is not expected to decode the remaining generation types, including Code One, Code 11, Code 16K, Code 49, Micro QR, Rectangular Micro QR, MicroPDF417, postal symbols, Han Xin, Grid Matrix, DotCode, Ultracode, and specialised industrial symbols.

Export formats

Each save method regenerates the barcode and writes the chosen file. Every save method is available both with and without its trailing rotate90 argument, and enforces the 1–8 module scale range.

  • SavePng(..., outputPath, rotate90) for .png
  • SaveJpeg(..., outputPath, rotate90) for .jpg or .jpeg
  • SaveBmp, SaveGif, SaveTiff, SavePdf, and SaveSvg for their matching extensions
Use the correct extension: each save method validates the output extension. For example, call SavePdf only with a .pdf path. UltraCode preview and PNG output preserve its required coloured modules; the other writers use the plugin's greyscale export path.

Troubleshooting

Unknown type KCG.Barcode.BarcodeGenerator

The package is not installed, is disabled, or Objo Studio has not been restarted after installation.

The barcode cannot be encoded

Check that the selected symbology accepts the supplied characters and length. EAN/UPC, postal, and GS1 symbols have stricter requirements than general formats such as Code 128 or QR Code.

Visual expectations

The renderer produces high-contrast modules on white and includes a quiet zone. UltraCode uses its required coloured modules, while MaxiCode uses its staggered hexagonal grid and central bullseye finder. Optional human-readable labels for linear symbols preserve the supplied data's case. For reliable scanning, do not crop the quiet zone and test the final printed or exported size with the intended scanner.