Main menu
Need help ?Are you developer? Can be inform about news, updates? Can you try new versions before official presentation? Not a member yet? Please join us.
Newsletter-subscribeAre you developer? Can be inform about news, updates? Can you try new versions before official presentation? Not a member yet? Please join us.
|
Barcode studio- 1. How I can use Code128 A,B, or C ?
- BarcodeSymbology := bcCode128 only.
TpsBarcodeComponent analyze TpsBarcodeComponent.Barcode property value and automatic optimize for best veraion A,B or C, or when mixed data switch versions dynamically in position where is this needed.
For more information please look to psBarcodeComp.pas, method TpsBarcodeComponent.Code128 ...
Examples :
Input data | Encoded as : |
1234567890 | StartC, and encode as data pairs 12, 23, 56, 78, 90 |
12345 | StartC, encode as pairs 12, 34 , than switch to CodeA or CodeB and encode as simple character digit 5 |
1234ABCabc567890 | StartC, pairs 12, 34, thans automatic switch to CodeB, encode ABCabc and again switch to CodeC and encode 56, 78, 90 .... |
http://psoft.sk | StartB and encoded http://psoft.sk |
A#9b#9C | StartB , encoded B, |
- 2. How can draw barcode on any canvas, form, printer ?
- Use function (located in psBarcodeComp unit)
// paint barcode on the TCanvas
procedure PaintBarCode(C:TCanvas; R:TRect; E:TpsBarcodeComponent);
// paint barcode using device context
procedure PaintBarCodeDC(dc:HDC; R:TRect; E:TpsBarcodeComponent);
// paint barcode using window handle
procedure PaintBarCodeHandle(HWnd:THandle; R:TRect; E:TpsBarcodeComponent);
or (from psBarcode unit)
procedure PaintBarCode(C:TCanvas; R:TRect; E:TpsBarcodeComponent); overload;
procedure PaintBarCode(C:TCanvas; R:TRect; E:TpsBarcode); overload;
procedure PaintBarCodeControl(WinControl:TWinControl; R:TRect;
E:TpsBarcodeComponent); overload;
procedure PaintBarCodeControl(WinControl:TWinControl; R:TRect;
E:TpsBarcode); overload;
procedure PaintBarCodeHandle(HWnd:THandle; R:TRect;
E:TpsBarcodeComponent); overload;
procedure PaintBarCodeHandle(HWnd:THandle; R:TRect;
E:TpsBarcode); overload;
- 3. How export barcode image
- Set psBarcodeComponent.Params.ExportBarcode property, set FileName, Height, Width ...
and then use one from TpsBarcodeComponent methods :
function SaveToFile:Boolean;
function SaveAsBmp:Boolean;
function SaveAsWmf:Boolean;
function SaveAsJpeg:Boolean;
{$ifdef PSOFT_GIF}
function SaveAsGIF:Boolean;
function SaveAsPNG:Boolean;
{$endif}
Note : jpeg, gif, png is depended on your Delphi version ...
If you have TpsBarcode, TpsBarcodeWinControl, TpsDBBarcode (XXX) is same, use TpsXXX.BarcodeComponent : TpsBarcodeComponent;
|