VectorImage AddBarcodeShape
Adds a specified barcode to vector Image.
Overloads
public void AddBarcodeShape(DataMatrixBarcodeShape barcodeShape) |
public void AddBarcodeShape(LinearBarcodeShape barcodeShape) |
public void AddBarcodeShape(QRCodeBarcodeShape barcodeShape) |
public void AddBarcodeShape(MicroQRCodeBarcodeShape barcodeShape) |
public void AddBarcodeShape(PdfBarcodeShape barcodeShape) |
public void AddBarcodeShape(MacroPdfBarcodeShape barcodeShape) |
Return value
void |
Parameters
DataMatrixBarcodeShape | barcodeShape | DataMatrix barcode shape |
LinearBarcodeShape | barcodeShape | LinearBarcode Shape |
QRCodeBarcodeShape | barcodeShape | QR CodeBarcode Shape |
MicroQRCodeBarcodeShape | barcodeShape | Micro QR CodeBarcode Shape |
PdfBarcodeShape | barcodeShape | PDF barcode shape |
MacroPdfBarcodeShape | barcodeShape | Macro PDF barcode shape |
Example
Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);
if (scanDocument != null)
{
VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);
vectorImage.SetMarkSpeed(1000);
vectorImage.SetJumpSpeed(2000);
vectorImage.SetJumpDelay(100);
vectorImage.SetMarkDelay(100);
//Set Laser Delays
vectorImage.SetLaserOnDelay(10);
vectorImage.SetLaserOffDelay(10);
LinearBarcodeShape lnrBarcode = new LinearBarcodeShape();
lnrBarcode.Text = "1234567890";
lnrBarcode.BarcodeType = BarcodeType.Codabar;
lnrBarcode.Height = 5;
lnrBarcode.Width = 10;
LineBarcodeHatchPattern lnrbkdhtch = new LineBarcodeHatchPattern();
lnrbkdhtch.LineSpace = 0.01f;
lnrbkdhtch.Vertical = true;
lnrBarcode.HatchPattern = lnrbkdhtch;
vectorImage.AddBarcode(lnrBarcode);
scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));
try
{
scanDocument.StartScanning();
}
catch
{
}
}