using Leadtools;
using Leadtools.Codecs;
using Leadtools.Forms;
using Leadtools.Barcode;
using Leadtools.ImageProcessing;
public void BarcodeData_GetDataExample()
{
string imageFileName = Path.Combine(LEAD_VARS.ImagesDir, "Barcode2.tif");
// Create a Barcode engine
BarcodeEngine engine = new BarcodeEngine();
// Load the image
using (RasterCodecs codecs = new RasterCodecs())
{
using (RasterImage image = codecs.Load(imageFileName, 0, CodecsLoadByteOrder.BgrOrGray, 1, 1))
{
// Read the first QR barcode from the image
BarcodeData data = engine.Reader.ReadBarcode(image, LogicalRectangle.Empty, BarcodeSymbology.QR);
// Show the barcode data found (if any)
if (data != null)
{
Console.WriteLine("Raw data is:");
byte[] bytes = data.GetData();
if (bytes != null)
{
string text = System.Text.Encoding.UTF8.GetString(bc);
Console.WriteLine(text);
}
else
{
Console.WriteLine("Empty");
}
}
else
{
Console.WriteLine("No barcode found");
}
}
}
}

C#
Console.WriteLine("Attachment name is " + msg.Attachments[0].Name);
VB.NET
Console.WriteLine("Attachment name is " + msg.Attachments(0).Name)C#
Pop3 pop = new Pop3();
// Download entire message
MailMessage msg = pop.DownloadEntireMessage(1);
if (msg.HasAttachments)
{
// The message has at least one attachment
}
VB.NET
Dim pop As New Pop3()
' Download entire message
Dim msg As MailMessage = pop.DownloadEntireMessage(1)
if (msg.HasAttachments) Then
' The message has at least one attachment
End If2017慧都十四周年狂欢搞事情!砸金蛋100%抽现金红包、满额豪送iPhone X、iPhone 8、DevExpress汉化免费送、团队升级培训套包劲省10万元......更多惊喜等您来探索!

试用、下载、了解更多产品信息请点击"咨询在线客服"








using (RasterCodecs codecs = new RasterCodecs())
{
codecs.Options.RasterizeDocument.Load.XResolution = 300;
codecs.Options.RasterizeDocument.Load.YResolution = 300;
RasterImage image = codecs.Load(inputFile);
using (IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.Professional, false))
{
ocrEngine.Startup(null, null, null, @"C:\LEADTOOLS 19\Bin\Common\OcrProfessionalRuntime64");
using (IOcrDocument document = ocrEngine.DocumentManager.CreateDocument())
{
document.Pages.AddPage(image, null);
document.Pages[0].Recognize(null);
IOcrPageCharacters pageCharacters = document.Pages[0].GetRecognizedCharacters();
for (int i = 0; i < document.Pages[0].Zones.Count; i++)
{
IOcrZoneCharacters zoneCharacters = pageCharacters.FindZoneCharacters(i);
if (zoneCharacters != null)
{
foreach (var ocrCharacter in zoneCharacters)
{
OcrCharacterPosition position;
position = ocrCharacter.Position;
if ((position & OcrCharacterPosition.EndOfLine) == OcrCharacterPosition.EndOfLine)
{
Console.Write(ocrCharacter.Code + "\n");
}
else
{
Console.Write(ocrCharacter.Code);
}
}
}
}
}
}
}2017慧都十四周年狂欢搞事情!砸金蛋100%抽现金红包、满额豪送iPhone X、iPhone 8、DevExpress汉化免费送、团队升级培训套包劲省10万元......更多惊喜等您来探索!
