Barcode 컴포넌트 — sgcHTML | eSeGeCe

Barcode

TsgcHTMLComponent_Barcode — Delphi, C++ Builder 및 .NET에서 모든 ASCII 텍스트로부터 사람이 읽을 수 있는 선택적 캡션을 갖춘 순수 Pascal Code 128 SVG 바코드를 렌더링합니다.

TsgcHTMLComponent_Barcode

Data를 설정한(그리고 선택적으로 Symbology를 설정한) 다음, HTML 속성을 읽습니다.

컴포넌트 클래스

TsgcHTMLComponent_Barcode

렌더링

인라인 SVG Code 128 바코드 + 선택적 텍스트(순수 Pascal 인코더)

언어

Delphi, C++ Builder, .NET

페이로드를 설정하고, 렌더링하기

Data를 설정하고, ModuleWidth/Height를 선택한 다음, HTML을 읽습니다.

uses
  sgcHTML_Component_Barcode;

var
  oBarcode: TsgcHTMLComponent_Barcode;
begin
  oBarcode := TsgcHTMLComponent_Barcode.Create(nil);
  try
    oBarcode.Data := 'ACME-00219841';
    oBarcode.Symbology := bsCode128;
    oBarcode.ModuleWidth := 2;
    oBarcode.Height := 60;
    oBarcode.ShowText := True;

    WebModule.Response := oBarcode.HTML;   // SVG bars + human-readable text
  finally
    oBarcode.Free;
  end;
end;
// includes: sgcHTML_Component_Barcode.hpp

TsgcHTMLComponent_Barcode *oBarcode = new TsgcHTMLComponent_Barcode(NULL);
try
{
  oBarcode->Data = "ACME-00219841";
  oBarcode->Symbology = bsCode128;
  oBarcode->ModuleWidth = 2;
  oBarcode->Height = 60;
  oBarcode->ShowText = true;

  String html = oBarcode->HTML;   // SVG bars + human-readable text
}
__finally
{
  delete oBarcode;
}
using esegece.sgcWebSockets;

var barcode = new TsgcHTMLComponent_Barcode();
barcode.Data = "ACME-00219841";
barcode.Symbology = TsgcHTMLBarcodeSymbology.bsCode128;
barcode.ModuleWidth = 2;
barcode.Height = 60;
barcode.ShowText = true;

string html = barcode.HTML;   // SVG bars + human-readable text

주요 속성 및 메서드

가장 자주 사용하게 되는 멤버.

페이로드

Data는 인코딩할 값입니다. ASCII 0–127만 허용됩니다(범위를 벗어난 문자는 예외를 발생시킵니다).

심볼로지

Symbology는 바코드 표준을 선택합니다. 현재는 Code 128(bsCode128)을 지원하며, 가장 압축적인 인코딩을 위해 서브셋 A/B/C 사이를 자동으로 전환합니다.

바 크기

ModuleWidth는 가장 좁은 바의 픽셀 너비를 설정합니다. Height는 바의 높이를 설정합니다.

가독형 텍스트

ShowText는 인코딩된 Data를 바 아래에 출력합니다.

색상

Color는 바와 텍스트를 칠합니다. BackgroundColor는 그 뒤를 채웁니다.

렌더링

GetSVG(HTML에서도 사용됨)는 sgc-barcode 컨테이너로 감싼 인라인 SVG 마크업을 반환합니다.

계속 살펴보기

온라인 도움말이 찱포넌트의 전체 API 참조 및 사용 가이드입니다.
모든 sgcHTML 컴포넌트80개 이상의 컴포넌트 전체 기능 매트릭스를 둘러보십시오.
무료 체험판 다운로드30일 체험판에는 60.HTML 데모 프로젝트가 포함됩니다.
가격전체 소스 코드가 포함된 Single, Team 및 Site 라이선스.

시작할 준비가 되셨습니까?

무료 체험판을 다운로드하고 Delphi, C++ Builder 및 .NET에서 웹 UI를 구축하기 시작하십시오.